diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-01-16 17:13:37 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-01-16 17:13:37 +0400 |
commit | 92764260d7050800572c9d5b8a80f954572e9a0f (patch) | |
tree | fe2f6821b5dd93e0cb49cc2ae1f78c4e04235df6 /intern/cycles/render/mesh.cpp | |
parent | 3123ad12a395031a1bf5a964582762a3831e9b1c (diff) |
Cycles: add option to cache BVH's between subsequent renders, storing the BVH on
disk to be reused by the next render.
This is useful for rendering animations where only the camera or materials change.
Note that saving the BVH to disk only to be removed for the next frame is slower
if this is not the case and the meshes do actually change.
For a render, it will save bvh files to the cache user directory, and remove all
cache files from other renders. The files are named using a MD5 hash based on the
mesh, to verify if the meshes are still the same.
Diffstat (limited to 'intern/cycles/render/mesh.cpp')
-rw-r--r-- | intern/cycles/render/mesh.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp index 5d65ce69a00..cd533f24058 100644 --- a/intern/cycles/render/mesh.cpp +++ b/intern/cycles/render/mesh.cpp @@ -586,6 +586,7 @@ void MeshManager::device_update_bvh(Device *device, DeviceScene *dscene, Scene * bparams.top_level = true; bparams.use_qbvh = scene->params.use_qbvh; bparams.use_spatial_split = scene->params.use_bvh_spatial_split; + bparams.use_cache = scene->params.use_bvh_cache; delete bvh; bvh = BVH::create(bparams, scene->objects); |