Planetside Software Forums

General => Terragen Discussion => Topic started by: agent unawares on November 30, 2017, 03:33:20 PM

Title: Is there a way to render for 360 VR from Terragen?
Post by: agent unawares on November 30, 2017, 03:33:20 PM
Normally when rendering an image that's supposed to be viewed in 3D, you can just space two cameras at the distance of human eyes (or further-closer if you want to muck with the sense of scale). This catches the scene the same way your eyes would and works fine.

But if you try to do this with two spherical cameras it doesn't work. Why? Because a spherical camera effectively rotates around itself to capture the entire scene. Imagine for a moment your eyes doing that. When they look forward, your depth perception is normal. When they've rotated completely to the left, they're essentially looking through each other and your depth perception is gone. When they've rotated to look behind you, your depth perception is as strong as looking forward, but inverted.

The way to solve this when you can't render directly for 360 VR is to position two spherical cameras at the distance of human eyes, render only a very small portion of the scene directly in front of them, say 10 degrees, with a little bit for overlap, then rotate the cameras around the center point between them, the same way your eyes would move if you kept looking forward but your head turned, then render the next section, rotate them again, render another section... and when you're done stitch all these together for both eyes.

This is, obviously, a nightmare, especially since the smaller the sections you render at a time, the more accurate the result gets. If you could render infinitely small sections at a time there would be perfect accuracy and no stitching required, but it would take an infinite amount of work. So camera setups that render for 360 VR just do this all at one time with math.

Does Terragen have any way to do this yet? I know there was a big competition about rendering for VR but I got the impression at the time it was still about big flat 360 environments like you normally get from a spherical camera.
Title: Re: Is there a way to render for 360 VR from Terragen?
Post by: cyphyr on November 30, 2017, 04:32:16 PM
There is no internal automatic Terragen way too do this but you could easily set up a pair of cameras in an external app (I use Lightwave) and import them and render slices of a 360 deg as you suggest.
Title: Re: Is there a way to render for 360 VR from Terragen?
Post by: Hetzen on December 01, 2017, 05:04:20 AM
I remember Matt saying that the perspective shift in a TG 360 stereo camera works just as  the OP was asking. ie those infinite slices.
Title: Re: Is there a way to render for 360 VR from Terragen?
Post by: agent unawares on December 01, 2017, 04:32:22 PM
Quote from: Hetzen on December 01, 2017, 05:04:20 AM
I remember Matt saying that the perspective shift in a TG 360 stereo camera works just as  the OP was asking. ie those infinite slices.

Oh good lord I never thought of adding "stereo" to my searches and I never noticed this setting. This should work exactly right, I think. Thanks.