Blender Git Commit Log

Git Commits -> Revision fe73168

Revision fe73168 by Sergey Sharybin (master)
September 25, 2014, 17:28 (GMT)
Cycles: Add support for cameras inside volume

Basically the title says it all, volume stack initialization now is aware that
camera might be inside of the volume. This gives quite noticeable render time
regressions in cases camera is in the volume (didn't measure them yet) because
this requires quite a few of ray-casting per camera ray in order to check which
objects we're inside. Not quite sure if this might be optimized.

But the good thing is that we can do quite a good job on detecting whether
camera is outside of any of the volumes and in this case there should be no
time penalty at all (apart from some extra checks during the sync state).

For now we're only doing rather simple AABB checks between the viewplane and
volume objects. This could give some false-positives, but this should be good
starting point.

Need to mention panoramic cameras here, for them it's only check for whether
there are volumes in the scene, which would lead to speed regressions even if
the camera is outside of the volumes. Would need to figure out proper check
for such cameras.

There are still quite a few of TODOs in the code, but the patch is good enough
to start playing around with it checking whether there are some obvious mistakes
somewhere.

Currently the feature is only available in the Experimental feature sey, need
to solve some of the TODOs and look into making things faster before considering
the feature is ready for the official feature set. This would still likely
happen in current release cycle.

Reviewers: brecht, juicyfruit, dingto

Differential Revision: https://developer.blender.org/D794

Commit Details:

Full Hash: fe731686fb31b6c3781867d93219b8e0a3a55824
Parent Commit: ccc5983
Lines Changed: +235, -18

10 Modified Paths:

/intern/cycles/blender/blender_camera.cpp (+2, -0) (Diff)
/intern/cycles/kernel/kernel_bake.h (+1, -1) (Diff)
/intern/cycles/kernel/kernel_path.h (+2, -2) (Diff)
/intern/cycles/kernel/kernel_path_state.h (+2, -2) (Diff)
/intern/cycles/kernel/kernel_types.h (+1, -1) (Diff)
/intern/cycles/kernel/kernel_volume.h (+87, -6) (Diff)
/intern/cycles/render/camera.cpp (+114, -0) (Diff)
/intern/cycles/render/camera.h (+10, -0) (Diff)
/intern/cycles/render/scene.cpp (+7, -6) (Diff)
/intern/cycles/util/util_boundbox.h (+9, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021