Depsgraph: Re-use evaluated mesh across frames and remove time dependency from all CoW components

This commit is a work forward having less updates during playback, which speeds
things up a lot here. The idea is simple: stop update all copy-on-write
datablocks (which implies full re-evaluation actually) on frame change and
re-use existing evaluated meshes as much as possible.

This brings playback speed to 24 fps on the dino test scene here. Performance
drops down a lot when armature is animated tho, but that's because of need of
tangent space calculation which we can't do much about from just a dependency
graph.

Hopefully this doesn't make copy-on-write too unstable, quick tests here are
surviving fine.
This commit is contained in:
2017-07-28 12:27:34 +02:00
parent 9323182e73
commit 50cc0aa0d1
9 changed files with 89 additions and 29 deletions

View File

@@ -107,7 +107,7 @@ struct DepsgraphNodeBuilder {
void begin_build(Main *bmain);
IDDepsNode *add_id_node(ID *id);
IDDepsNode *add_id_node(ID *id, bool do_tag = true);
TimeSourceDepsNode *add_time_source();
ComponentDepsNode *add_component_node(ID *id,
@@ -206,6 +206,7 @@ struct DepsgraphNodeBuilder {
protected:
Main *m_bmain;
Depsgraph *m_graph;
GHash *m_cow_id_hash;
};
} // namespace DEG