Page MenuHome

Use the near clipping distance in Cycles panorama camera

Authored by Scott Wu (scwu) on Apr 25 2016, 4:59 PM.



Hi, this is a small change that allows the panorama camera in Cycles to use the near clipping 'plane'. I found this useful for creating spherical environment or reflection maps from an existing scene. The original behavior can be achieved by setting the near clipping to 0 (or as close as allowed).

Diff Detail

rB Blender

Event Timeline

Scott Wu (scwu) retitled this revision from to Use the near clipping distance in Cycles panorama camera.
Scott Wu (scwu) updated this object.
Scott Wu (scwu) set the repository for this revision to rB Blender.
Scott Wu (scwu) added a project: Cycles.

Night be usable indeed. From code side seems fine, will check it a bit more with artists and then commit.

This revision is now accepted and ready to land.Jul 14 2016, 3:48 PM

Friendly reminder to commit this :) (Just going through open but still uncommitted patches)

Ok, so. VR artists are fine with this -- it's not a functional change for them because camera is never close to the wall in their usecases.

Before committing, @Dalai Felinto (dfelinto), can i poke you here to also know your opinion? You kinda the panorama guy ;)

I think this seems harmless (@Brecht Van Lommel (brecht) do you recall why this was neglected in the original panorama implementation?).

That said, it would be nice to have a doversion in the blender side to handle those cases (set to the minimum if camera was pano).

Dalai Felinto (dfelinto) requested changes to this revision.Sep 30 2016, 3:19 PM

Actually, from a closer look I think we will have a problem with the code as it is. I can't see the "context" in this patch (did the author remember to use arcanist?), but I believe for spherical stereo we need to do the clipping later in the code (as we do for perspective lens).

This revision now requires changes to proceed.Sep 30 2016, 3:19 PM

I don't think near clipping was left out intentionally for panorama.

I'm not sure we should use do_versions, setting it to the minimum can also mess up OpenGL display precision. I think the default is small enough for it to not matter much.


Indeed the clipping should be done later. Just moving this whole #ifdef .. #else .. #endif section to the end of the function should work.

This revision was automatically updated to reflect the committed changes.