Cycles: add offscreen dicing scale and dicing camera.

The offscreen dicing scale helps to significantly reduce memory usage,
by reducing the dicing rate for objects the further they are outside of
the camera view.

The dicing camera can be specified now, to keep the geometry fixed and
avoid crawling artifacts in animation. It is also useful for debugging,
to see the tesselation from a different camera location.

Differential Revision: https://developer.blender.org/D2891
This commit is contained in:
2018-01-12 00:50:34 +01:00
committed by Brecht Van Lommel
parent 2dbcc17897
commit cce280dd67
8 changed files with 179 additions and 25 deletions

View File

@@ -920,8 +920,8 @@ static void create_subd_mesh(Scene *scene,
sdparams.dicing_rate = max(0.1f, RNA_float_get(&cobj, "dicing_rate") * dicing_rate);
sdparams.max_level = max_subdivisions;
scene->camera->update();
sdparams.camera = scene->camera;
scene->dicing_camera->update();
sdparams.camera = scene->dicing_camera;
sdparams.objecttoworld = get_transform(b_ob.matrix_world());
}