Page MenuHome

Geometry Node: Smart Scene Time update relations
AbandonedPublic

Authored by Iliya Katueshenock (Moder) on Nov 25 2022, 6:11 PM.

Details

Reviewers
None
Summary
NOTE: It same for Self Object and Collection Info, just now need to solve problem: Where is to call deg tag updates?

Diff Detail

Event Timeline

Iliya Katueshenock (Moder) requested review of this revision.Nov 25 2022, 6:11 PM
Iliya Katueshenock (Moder) created this revision.

If we talk specifically about this patch (not taking into account the problems of other nodes with complex dependencies), then it makes sense to also check the preview node (I did not find a quick way to get it, so I will add it later)

The last part of this patch looks like a general improvement, at least when there are many nodes that aren't connected to the group output.
I'm not convinced by the first part though, it feels a bit too generic and not worth doing at the moment.

Does it still work (as in-- are the relations still proper) when you mute the link coming out of the scene time node?

source/blender/blenkernel/intern/node_tree_update.cc
1083

I don't think tagging an update for depsgraph relations every time a link is changed is the right solution. It's fast for simple scenes but it can be slow for complex files.

source/blender/modifiers/intern/MOD_nodes.cc
342

Just a more standard variable name for this

347–349

else after return is unnecessary

Yes, I forgot about the muted link.

source/blender/blenkernel/intern/node_tree_update.cc
1083

I have an idea of a more general way of doing such updates. But so far I haven't done it. It looks like an oversized system for the sake of 2-3 nodes. Since basically such dependencies are delegated to sockets. There are not so many nodes that have such dependencies. But I'll try.

source/blender/modifiers/intern/MOD_nodes.cc
347–349

This return is needed if there is no group exit, but if there is one, everything below should be executed.

Iliya Katueshenock (Moder) planned changes to this revision.Nov 25 2022, 7:34 PM
source/blender/modifiers/intern/MOD_nodes.cc
347–349

Oops, of course, sorry. I was skimming that too quickly

Iliya Katueshenock (Moder) marked 2 inline comments as done.Nov 25 2022, 7:39 PM

My current version looks like this:

  1. Cache of all used nodes in the tree cache. Taking into account the influence of muted links. Ignoring rerouts and frames. No duplication.
  2. Node tree cache - dependency flags (on time, transformations, ...).
  3. All flags are evaluated under the condition that child groups do not have positive flags.
  4. Updating the node tree: parallel traversal of all used nodes, depending on the tag, to check their necessary dependencies. Here is the dependency graph tag.
  5. Returning this data for the modifier in an easy way.