A file suddenly stopped to cache on the GPU (maya 2018.5 and win 10)

27 views
Skip to first unread message

Daniele Dolci

unread,
May 4, 2020, 12:33:51 PM5/4/20
to Python Programming for Autodesk Maya
Hi guys! This is not strictly python related but it is a technical issue which I hope you can help me to solve. I am developing some rigging tools and I am making sure everything goes onto the gpu. At some point I realized that wasn't happening, so I went back to the last working file and comapred against the first not working one. I couldn't really figure out the problem so I started removing the changes one by one until the two files would be the same and it was still not caching on the gpu. So I started to delete stuff back and forth and helping myself with the maya profiler etc and I found out the problem to be a blendshape. In this screenshot you see the blendshape with a few pose interpolators going in as input:



If I delete those connections the blendshape will work on the gpu. The thing is that those connections are also in the working file so that is not a difference. If I check the profile the only substantial difference is that on the working file, before calling the GPU Skincluster matrices it is also calling the MPxGPUBlendShape. I find it very weird because there is really no difference in the network of nodes so it must somehow be a bug but I can't understand it. I attach also a couple of screenshots of the profiler

Capture.PNG

Capture.PNG



If you have any idea on what I can try to do I would really appreciate it a lot!

Cheers,



Luiz Amaral

unread,
May 4, 2020, 4:12:06 PM5/4/20
to Python Programming for Autodesk Maya
Hello there,

I had a similar problem and I found out that one of the blendshape’s targets had an intermediate shape on it when it was applied.

Maya creates an intermediate shape on any mesh that has a deformer applied to it and even after you clear the history the intermediate shape remains.

I feel that whenever Maya sees the intermediate shape on any of the targets it assumes it has a deformer on it and flags the blendshape deformer to not go to gpu.

Anyways cleaning the intermediate shapes on all targets before applying them to the blendshape solved the issue for me.

Another thing I found out was that sometimes after creating and connecting a blendshape by code the scene had to be saved and re opened in order for the mesh to go to gpu.

Hope this helps.

Cheers,

Luiz


Daniele Dolci

unread,
May 5, 2020, 7:16:46 AM5/5/20
to Python Programming for Autodesk Maya
Hi!

Thanks for the reply! this actually helped but I still have some problem. Let me explain. I save all the targets in a different file so that when I rebuild the rig I can apply them. Indeed on some targets there were orig shapes. I removed them and now when I build the rig through my script it caches correctly on the gpu. However, as soon as I save the file and I reopen it then it won't cache it on the gpu anymore. I tried to turn it on/off, I tried to switch between smooth preview and not etc. The result doesn't change. 

Then I had kind of an epiphany, and I saved the file as .mb rather than .ma and all the problems are gone. Everything works as expected. However the client will need the .ma as well so I still have to figure this out. Also I noticed that now when reopening the file, whether it is .ma or .mb after you open the file and the viewport is loaded (so the rig appears) maya stays frozen  keep loading stuff for a couple of minutes (it is like is loading the outliner since that doesn't show anything during this freezing time), before it would only take few seconds. I feel like this is related to the gpu problem. 

Thanks again! 

Luiz Amaral

unread,
May 5, 2020, 1:59:11 PM5/5/20
to Python Programming for Autodesk Maya
OK,

Happy you are moving forward :)

The freezing issue happened to me as well but it was something else. I don’t know how your rig is setup but what solved the freezing for me was to hide most of the nodes from the history by setting the attribute “isHistoricallyInteresting” to 0.

This prevents Maya from showing a giant list of connected nodes on the channel box which in my case was causing the freezing.

Try setting this attribute off for every node as a post rig function just to see if the freezing stops, if it does then set that back to 1 only on the few nodes you want to see in the channel box (like skincluster, blendshape and whatever else you need visible in the output of a shape).

Be careful to set this off for EVERY node, including multiplyDivides, plusMinusAverage and other math, matrix and utility nodes.


Hope this helps,

Cheers

Luiz

Reply all
Reply to author
Forward
0 new messages