Optimising scene

65 views
Skip to first unread message

Nirmal Kumar

unread,
Aug 17, 2021, 9:42:16 AM8/17/21
to Python Programming for Autodesk Maya
Hello everyone , 
What are all the possible ways we could optimize a scene inside Maya . 
Can we do any part of it using python ? I'd appreciate any code for reference.

Marcus Ottosson

unread,
Aug 17, 2021, 9:58:36 AM8/17/21
to python_in...@googlegroups.com
Great question, but vague question.

Optimise for what? Performance? Disk space? Memory? Marketability? Ease of use? Monetary value? Maximum Facebook friends? Some of those you can achieve with Python.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/e98737c4-0aac-4eab-9040-b163eef82b71n%40googlegroups.com.

Andrew Golubev

unread,
Aug 17, 2021, 10:04:03 AM8/17/21
to Python Programming for Autodesk Maya
Hi!
What actually you would like to optimize? Viewport interactivity? Render time? Animation interactivity? 
What do you have in the scene - is it environment, is it includes heavy rigs, and so on. 
Please provide more information about the problem for us to try to help you.

вторник, 17 августа 2021 г. в 16:58:36 UTC+3, Marcus Ottosson:

Nirmal Kumar

unread,
Aug 17, 2021, 11:03:03 AM8/17/21
to Python Programming for Autodesk Maya

I'm optimizing for performance and for quicker loading up the scene . I'm basically trying to optimize a complex environment.

Marcus Ottosson

unread,
Aug 17, 2021, 11:11:49 AM8/17/21
to python_in...@googlegroups.com
A question of few words, huh. :)

- What does your "complex environment" look like?
- What is performance like currently?
- How long does it take to load already?
- What performance do you hope to achieve?
- What is your computer specs?
- What is your environment, e.g. loading files off a shared network drive, or mounted RAM?
- What have you already tried?
- What worked?
- What didn't work?

At this point, we've spent more time asking you about your question then you have spent asking it haha. Let's turn that around?

Nirmal Kumar

unread,
Aug 17, 2021, 12:15:08 PM8/17/21
to Python Programming for Autodesk Maya
Apologies for being vague. I'm pretty new to optimizing stuff .

I use a  16gb machine , loading the scene from my hard drive and its approximately taking around 2mins to just load , and the frame rate drops as we play the scene.
I've so far tried turning off the visibility of the items as I load and it loads in 45sec , however once I try to turn on the visibility it becomes very slow and I need to have all my GEOs on .

Andrew Golubev

unread,
Aug 23, 2021, 10:34:09 AM8/23/21
to Python Programming for Autodesk Maya
Do you have proxies in your scene? 

If your propses referenced, 
you can use simplified proxy geometries for them, which will be only visible in the viewport, it will increase interactivity and loading times, but during rendering, it will load full geometry (through Maya Proxy Manager).
Also, if you have heavy rigs in the scene it will be a good idea to bake them into a cache, rigs can be very heavy, cached geo will significantly help.


вторник, 17 августа 2021 г. в 19:15:08 UTC+3, nirmal...@gmail.com:

Neil Roche

unread,
Sep 17, 2021, 4:59:56 AM9/17/21
to Python Programming for Autodesk Maya
I would start with optimising any of your reference scenes, there can be a lot of obsolete utility nodes which can build up, I have known scenes to sometimes have thousands. Also if you ever use ngSkinTools always delete the ngSkinLayerData nodes before you reference them into a scene, same with Maya muscles they can have a jiggle cache which if referenced in will make your machine sluggish.  I always start with Delete Unused Nodes which in the Edit menu option in the Hypergraph, it runs a mel command ./autodesk/maya/2018.7/scripts/startup/cleanUpScene.mel which could be pythonised or run though a python mel wrapper.  This is the same script which is run if you also do File->Optimize Scene Size.

Also having different levels of detail in your rigs is a good idea, have a very low poly or rig with proxy geometry for animation to keep you frame rate high, or you can cache rigs out as alembics and use the geo in place of rigs.  If you unreference the rig after importing the geometry it will be non-destructive too, you can swap them in and out as you require.

Hope this helps!
Reply all
Reply to author
Forward
0 new messages