PDA

View Full Version : Deformer evaluation


Buexe
11-18-2011, 07:08 AM
Hi folks,
I am experiencing here something that I dont really understand and was wondering if any kind soul could help me out. Basically I have a mesh with 3 types of deformers. 1 is skin Cluster, the other two are different types of custom deformers, so the history is kind of like this

start of history
intermediate object of mesh_1
deformerTypA_1
skinCluster_1
deformerTypB_1
deformerTypB_2
deformerTypB_3
mesh_1
end of history

Now the weird thing is, even if I just edit attributes on deformerTypB_3 all deformers ( I assume skinCluster as well) get called. Of course this has quite a performance hit. Now, does anyone have an explanation for this? Or did I miss something?
Any help/input appreciated!
Thanks!
Jan

uiron
11-18-2011, 07:48 AM
are deformers 1, 2, 3 something non-standard? there's a possibility someone was not respecting standard maya's DAG rules, e.g., calling cmds.* inside compute, if that's a python plugin, or otherwise accessing/modifying properties upstream in DAG (don't forget time as well).

Buexe
11-18-2011, 12:26 PM
deformerTypA and deformerTypB are custom deformer I wrote using C++ and the API, they are purely C++ no MEL commands are called. The complete evaluation happens when I edit values on any deformer without playback...

uiron
11-18-2011, 07:13 PM
* are you accessing input attributes only through dataBlock.inputValue() ?
* are you setting only values into datablock.outputValue() ?
* are you clearing dirty flag vai datablock.setClean() ?
* no other shenanigans, like graph traverse upwards, lookup properties of other nodes?

Buexe
11-24-2011, 11:14 AM
* are you accessing input attributes only through dataBlock.inputValue() ?
Yes
* are you setting only values into datablock.outputValue() ?
Yes
* are you clearing dirty flag vai datablock.setClean() ?
Yes
* no other shenanigans, like graph traverse upwards, lookup properties of other nodes?
No, the deformer has some input attributesof course, but nothing fancy which could justify the reevaluation of ALL deformers...:cry:

So I tried for quite a while now to get rid of this issue but to no avail. The only thing noteworthy may be that i am using the "compute" instead of the "deform" method, but I need it to output extra info used by other nodes. I am considering to rewrite the node so that I dont need a series of deformers of the same type, but rather will be in one. But thanks for your input uiron!

uiron
11-25-2011, 06:19 AM
do the "rule out the innocent" debug method - delete/comment everything out in our compute, leave only the setClean() call, see if that fixes the problem. then comment some code out, try again. repeat bit by bit until you narrow down to code fragment that causes it. it's slow and painful, but works when nothing else helps.

CGTalk Moderation
11-25-2011, 06:19 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.