Forum Discussion
Afuerg
12 years agoHonored Guest
Coin3D Integration - WIP
Hi, I'm trying to get the Rift view working with Coin3D, based on an "old" example by jherico. Basically I'm building a simple Coin scene with a perspective camera, light and cube that I render wi...
veelo
11 years agoHonored Guest
I am making progress (finally -- after a week of hard work) with rendering a Coin scene for the Rift using the 0.3.1 SDK preview, using SDK rendering. Using the OffscreenRenderer for starters, which does not produce sufficiently high framerates as you mentioned. But getting something rendered at all is promissing.
I am seeing these issues as well, and I have an idea why. Coin renders equally much left and right of the line of sight, i.e., the line of sight is in the middle of the rendered texture. However, that is not what the SDK requires. I printed the values of the FoV for left and right eyes, and get
So the line of sight should not be centered in the texture, but offset towards the nose.I have yet to find out how to adjust the camera appropriately, maybe I will have to subclass the camera. This is accomplished by using a SoFrustumCamera for each eye. Then set the nearDistance to 1.0f and use the above values for the top, bottom, left and right fields. It works :-)
To increase the frame rates I guess I will have to follow your example, or use Client Distortion with SoSceneTexture2 (although the power-of-two requirement on the texture size may be a problem). Done, the git repository below now works using frame buffer objects.
Bastiaan Veelo.
"Afuerg" wrote:
Also I'm setting the heightAngle, aspectRatio, nearDistance and farDistance of the camera, according to the values used in the example.
Unfortunately this doesn't create the results I was hoping for. Coins Cube is too wide apart so the two images won't align properly when viewed through the rift.
I am seeing these issues as well, and I have an idea why. Coin renders equally much left and right of the line of sight, i.e., the line of sight is in the middle of the rendered texture. However, that is not what the SDK requires. I printed the values of the FoV for left and right eyes, and get
Left UpTan: 1.75 Right UpTan: 1.75
Left DownTan: 1.75 Right DownTan: 1.75
Left LeftTan: 1.725 Right LeftTan: 0.970739
Left RightTan: 0.970739 Right RightTan: 1.725
So the line of sight should not be centered in the texture, but offset towards the nose.
Bastiaan Veelo.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 6 years ago
- 6 years ago
- 1 year ago