Print at Dec 17, 2025, 5:21:24 PM

Posted by qythyx at Oct 12, 2017, 4:56:10 AM
Re: Generating 360 degree stereoscopic images
So, I managed to hack together a fix. I added two new camera types to Sunflow, the raytracer used to generate the images. They are "Spherical Left" and "Spherical Right". They're very similar to the default spherical camera, but as they render the image the adjust the eye position accordingly.

The code change for this was actually quite simple, it just took me a while to find the right place to make the change. Still, not bad for a few hours work.

Here is an example using these new cameras. This seems to fix the problem and now gives good depth perception in all directions.

Next I need to:

  • Confirm the correct distance between eyes. I used 6, but in Sunflow I'm not sure of the unit. Is that 6 cm, or 6 what? In my SW3D plan I use cm, but I'm not sure what that is in Sunflow. Using 6 seems to work ok, but if someone else uses inches I want to make sure that works too. Also I should make this configurable in preferences or something.
  • My changes work for the builtin image render UI, but they don't work for the plugins that give more control over rendering. The problem is that the drop down box that lists the camera doesn't include my new cameras in those plugin windows. I need to fix this.
  • Figure out how to submit my changes to SH3D code base so everyone can take advantage of them.
  • Ideally I'd like to make this simpler to use. Currently you need to render the image twice, once with the left camera and once with the right. That's annoying. It would be better if that was automated so that it rendered both automatically and saved both.