Question about DG evaluation

Question about DG evaluation

jmreinhart
Advisor Advisor
666 Views
3 Replies
Message 1 of 4

Question about DG evaluation

jmreinhart
Advisor
Advisor

So I have been doing some speed testing and I've run into a result that I don't understand. My understanding of how Maya decides what to compute is that when you dirty a plug all the dependent downstream plugs become dirty.

Then if the viewport/UI/getAttr calls for one of those dirty plugs, it recomputes the upstream plugs that are marked dirty, but when it reaches a node whose output is not dirty, it doesn't re-compute it, it just uses the existing value. 

 

Below is a simple scene to reproduce the weird result I was getting. I modified cluster2 so the downstream nodes were marked  dirty. Then because the viewPort requested the outMesh for the sphere geo it recomputed cluster3, cluster2 but then for some reason it also computed the upstream nodes as well.

jonahrnhrt_0-1604960769031.png

jonahrnhrt_1-1604961433438.png

I feel like I'm going crazy, because this is different from everything I've seen before.

 

Accepted solutions (1)
667 Views
3 Replies
Replies (3)
Message 2 of 4

jmreinhart
Advisor
Advisor

I did some more testing and it seems like having a mesh node in the middle of that chain of deformers makes it work the way I would expect. Is input/outputGeometry just not stored the same way as other numerical data?

Message 3 of 4

jmreinhart
Advisor
Advisor

https://forums.cgsociety.org/t/mfnmesh-gets-slow/1574420/22

another person who has run into the same issue. Unfortunatly no solution.

0 Likes
Message 4 of 4

jmreinhart
Advisor
Advisor
Accepted solution

jonahrnhrt_0-1607130432302.png

This explanation of caching on the MFnAttribute documentation page explains it. inputGeometry happens to be noncached, which makes sense since deformers would normally be constantly evaluating during a real animation scene.