Page MenuHome

Cycles and Freestyle - clipping plane / sphere problems
Closed, ResolvedPublic


System Information
Win7, GTX 560 Ti, GTX 970

Blender Version
Broken: 2.72 official 64bit, current buildbot: Hash: 9590e77
Worked: ----------

Short description of error
Currently the Cycles uses clipping sphere instead of clipping plane and Freestyle uses clipping plane as expected but when using Freestyle with Cycles this causes weird behaviour.
I strongly suggest to change the behaviour of Cycles and leave the Freestyle as is, because the clipping plane is far much easier to work with and is also supported in the OpenGL viewport.
You can see the problem in the attached blend. If you render the cube, cycles can't see the monkey inside, but freestyle can. It would be great if cycles coud see inside the box as well...

Exact steps for others to reproduce the error
Open the file and hit Render. You can see that the monkey is partly hidden for the cycles but fully visible for the Freestyle.

Event Timeline

Marek Moravec (marek) set Type to Bug.
Marek Moravec (marek) created this task.
Marek Moravec (marek) raised the priority of this task from to Needs Triage by Developer.

Not quite sure this is a real bug? Let's Cycles and Freestyle guys decide. :)

Bastien Montagne (mont29) triaged this task as Normal priority.

Afair it was always know that cycles uses clipping sphere instead of clipping plane. While plane might be more useful in some cases changing the behavior in clipping might break existing scenes and need to be carefully considered.

It was always known but also manytimes criticized (and even wrongly reported as a bug). The camera clipping plane is extremely useful for interior architecture scenes but the sphere clipping is very problematic and it limits the way how to place the camera in the scene. It is also quite difficult to set up the clipping distance because there is no preview in the openGL viewport and using rendered view is difficult because interiors render usually very slowly and it takes a while to see the clipping effect clearly. Sometimes the clipping sphere clips just the edge of the table which is not very visible in preview (noisy) render but it is quite clear in the final (high-res).
I have to deal with that daily and the change to clipping sphere would be huge for me. I can document some "real-world" examples if needed. In my opinion the positives of this change are worth breaking the old files because the fix is quite simple in most scenes and in some it would not make a visible difference anyway.

Sergey Sharybin (sergey) claimed this task.

I know there are enough circumstances when you want it to really be a plane, not a sphere, Just needed some time to look into historical reasons for that and so.

It appears @Brecht Van Lommel (brecht) initially implemented it this way because it was faster (implementation wise and render-time wise), it also appears i didn't find any render engine which uses sphere for perspective cameras (panorama is a bit more tricky, and probably should stay spheres).

Amazing! Thank you so much!!