diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-04-05 00:51:24 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-04-05 15:05:01 +0300 |
commit | 50782df42586a5a038cad11530714371edaa5cd4 (patch) | |
tree | f2f6e3d5c4f07be85efd39e1319fdb49b76d1d2d /source/blender/depsgraph/DEG_depsgraph.h | |
parent | 3fa580866ef5514f6fa7f9c5a369249f69135c78 (diff) |
Render: faster animation and re-rendering with Persistent Data
For Cycles, when enabling the Persistent Data option, the full render data
will be preserved from frame-to-frame in animation renders and between
re-renders of the scene. This means that any modifier evaluation, BVH
building, OpenGL vertex buffer uploads, etc, can be done only once for
unchanged objects. This comes at an increased memory cost.
Previously there option was named Persistent Images and had a more limited
impact on render time and memory.
When using multiple view layers, only data from a single view layer is
preserved to keep memory usage somewhat under control. However objects
shared between view layers are preserved, and so this can speedup such
renders as well, even single frame renders.
For Eevee and Workbench this option is not available, however these engines
will now always reuse the depsgraph for animation and multiple view layers.
This can significantly speed up rendering.
These engines do not support sharing the depsgraph between re-renders, due
to technical issues regarding OpenGL contexts. Support for this could be added
if those are solved, see the code comments for details.
Diffstat (limited to 'source/blender/depsgraph/DEG_depsgraph.h')
-rw-r--r-- | source/blender/depsgraph/DEG_depsgraph.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph.h b/source/blender/depsgraph/DEG_depsgraph.h index 567916fdebe..f7aeca7e75f 100644 --- a/source/blender/depsgraph/DEG_depsgraph.h +++ b/source/blender/depsgraph/DEG_depsgraph.h @@ -139,16 +139,20 @@ void DEG_graph_time_tag_update(struct Depsgraph *depsgraph); void DEG_graph_id_type_tag(struct Depsgraph *depsgraph, short id_type); void DEG_id_type_tag(struct Main *bmain, short id_type); -void DEG_ids_clear_recalc(struct Main *bmain, Depsgraph *depsgraph); - -/* Check if something was changed in the database and inform - * editors about this. - */ -void DEG_ids_check_recalc(struct Main *bmain, - struct Depsgraph *depsgraph, - struct Scene *scene, - struct ViewLayer *view_layer, - bool time); +/* Set a depsgraph to flush updates to editors. This would be done + * for viewport depsgraphs, but not render or export depsgraph for example. */ +void DEG_enable_editors_update(struct Depsgraph *depsgraph); + +/* Check if something was changed in the database and inform editors about this, + * then clear recalc flags. */ +void DEG_editors_update(struct Main *bmain, + struct Depsgraph *depsgraph, + struct Scene *scene, + struct ViewLayer *view_layer, + bool time); + +/* Clear recalc flags after editors or renderers have handled updates. */ +void DEG_ids_clear_recalc(Depsgraph *depsgraph); /* ************************************************ */ /* Evaluation Engine API */ |