Blender Git Loki
Git Commits -> Revision 3fb7eed
Revision 3fb7eed by Sergey Sharybin (depsgraph_refactor) December 19, 2014, 14:07 (GMT) |
Depsgraph: Initial support for skipping invisible IDs update General idea is quite simple here: - Store layers in the IDDepsNode (same as we did in the old dependency graph). This layer would correspond to ID layers themselves plus layers of nodes which depends on it. Here's where first tricky part begins: i'm not sure how we could flush layers between nodes. Basically because it's totally unclear how do we perform full DFS nowadays. Previously it was simple because of having root node and knowing for sure nodes which doesn't have dependencies. Would need to think a bit how to do it now. - We keep track of currently visible layers. Here's where tricky parts continues. basically the question is: where do we store currently visible layers? Evaluation context comes in mind, but that'd be wrong idea. basically because evaluation context is shared between scenes and since it's possible to have two different scenes visible we can not store single value. So for now we store visible layers in the depsgraph itself. This way we're decoupling visible layers between scenes. This is temporary solution for until we'll have some more centralized storage. Should be easy to move stuff around anyway, so wouldn't be so much fussed about this. Another tricky part here is the render engines. Currently there's no visibility check performed for render engine update. So after all it seems we'll need to store visible layers somewhere and pass what layers we're currently interested in to the depsgraph evaluation, making it so we can easily use the same graph for viewport and render engine and perform all the visibility checks we want. - We don't schedule invisible IDs during evaluation. We instead put them to the "to be updated when becoming visible list". Now, this list is a bit of an overkill, would be better to have some sort of legacy (ID->flag & ID_NEEDS_UPDATE) flag, but since we're currently not really sure what the storage for such a flags would look like we'll keep a temp list for now. Again, it'll be easy to change in the future, so wouldn't be fussed here as well. - When visibility changes depsgraph updates visible layers and re-schedules updates of previously invisible objects. TODOs: - Implement layers visibility flush. - Make sure set scenes works all nice. - Move temp storage to somewhat final storage (well, implement that final storage first :) |
Commit Details:
Full Hash: 3fb7eedb78f997881dd253ba685cff2260999782
Parent Commit: e372d27
Lines Changed: +153, -14
12 Modified Paths:
/source/blender/blenkernel/intern/depsgraph.c (+10, -0) (Diff)
/source/blender/depsgraph/DEG_depsgraph.h (+4, -1) (Diff)
/source/blender/depsgraph/intern/depsgraph.cpp (+72, -1) (Diff)
/source/blender/depsgraph/intern/depsgraph.h (+21, -0) (Diff)
/source/blender/depsgraph/intern/depsgraph_build.cpp (+7, -0) (Diff)
/source/blender/depsgraph/intern/depsgraph_build.h (+1, -1) (Diff)
/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp (+6, -3) (Diff)
/source/blender/depsgraph/intern/depsgraph_eval.cpp (+16, -4) (Diff)
/source/blender/depsgraph/intern/depsgraph_queue.h (+1, -1) (Diff)
/source/blender/depsgraph/intern/depsgraph_tag.cpp (+9, -2) (Diff)
/source/blender/depsgraph/intern/depsnode.h (+3, -0) (Diff)
/source/blender/makesrna/intern/rna_depsgraph.c (+3, -1) (Diff)
/source/blender/depsgraph/DEG_depsgraph.h (+4, -1) (Diff)
/source/blender/depsgraph/intern/depsgraph.cpp (+72, -1) (Diff)
/source/blender/depsgraph/intern/depsgraph.h (+21, -0) (Diff)
/source/blender/depsgraph/intern/depsgraph_build.cpp (+7, -0) (Diff)
/source/blender/depsgraph/intern/depsgraph_build.h (+1, -1) (Diff)
/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp (+6, -3) (Diff)
/source/blender/depsgraph/intern/depsgraph_eval.cpp (+16, -4) (Diff)
/source/blender/depsgraph/intern/depsgraph_queue.h (+1, -1) (Diff)
/source/blender/depsgraph/intern/depsgraph_tag.cpp (+9, -2) (Diff)
/source/blender/depsgraph/intern/depsnode.h (+3, -0) (Diff)
/source/blender/makesrna/intern/rna_depsgraph.c (+3, -1) (Diff)