pythonmayamelhtc-viveautodesk-stingray

90 fps in Maya for HTC Vive


I'm developing a game in Maya/Stingray 2017 for HTC Vive VR HMD. As we all know Vive runs games at 90fps minimum (we need to use 90fps for getting a robust VR experience and not getting a nausea). But Maya doesn't have 90 fps preset. It supports only these ones: 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 20, 24, 25, 30, 40, 48, 50, 60, 75, 80, 100, 120, 125, 150, 200, 240, 250, 300, 375, 400, 500, 600, 750, 1000, 1200, 1500, 2000, 3000 and 6000 fps.

Here are my executed MEL commands for 90fps and 80fps in Script Editor:

currentUnit -t "90fps"; 
// Warning: line 1: Illegal value entered for -time // 

currentUnit -t "80fps";
// Result: 80fps // 

How to make Maya play my animation exactly at 90 fps using MEL?

enter image description here


Solution

  • Now Autodesk Maya 2020 supports 90 fps frame rate (and now its fps range is 2 to 48000 fps):

    MEL command:

    currentUnit -time "90fps";
    
    # // Result: 90fps // 
    

    Python command:

    import maya.cmds as cmds
    
    cmds.currentUnit(time='90fps')
    
    # // Result: 90fps //
    

    ...then you can query:

    cmds.currentUnit(query=True, time=True)