Hi, I want to present 360 degree images (captured by 360 degree cameras) in VR and have subjects be able to explore it by rotating their head.
I was wondering if this is possible in PTB and if so whether there is any tutorial or demo file for it.
Yes, this would be possible. I would (having not tried it out) assume you could do something like texture map the image to a sphere, then have the persons head inside the sphere. The sphere pose could be yoked to the persons head. That would be a basic way to do it.
I am not sure of any specific demos that do exactly that, or something different to achieve the same thing. I know there are the standard VR demos in PTB and also demos showing texture mapping.
The following demo on my site shows basic texture mapping, so could be used as a basis.
I am in the process of making for VR demos also, so will add this to my list.
P
Dear Prof. Scarfe,
Thank you so much for your reply. I will try to follow your advice. And I look forward to learning from your VR demos, I have learnt a lot from your website in past.
My primary concern is that if the projection to a sphere (which is an external projection) will be visible/ or presented accurately when viewed internally from the center of the sphere. I will try to experiment with it and see if it works.
MinimalisticOpenGLDemo.m, which shows the method described by Peter to draw the textured world globe, also has some code to demonstrate the same with a textured cylinder (cfe. line 560, gluCylinder()
). Principle is the same. Obviously the shape of whatever you put around your observer in VR should reasonably match the imaging geometry of your 360 degree camera, or whatever your post-processing software for the camera pictures can output. This might be a sphere, or a cylinder, or something more complex. The principle is always the same.