2

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

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220

3 Answers3

2

According to the documentation: http://help.autodesk.com/cloudhelp/2016/ENU/Maya-Tech-Docs/Commands/

currentUnit -time "30fps";

Should be:

currentUnit -time "ntsc"; // This is 30 FPS
currentUnit -time "film"; // This is 24 FPS

or similar.

To answer your question, you said the HTC Vive VR Headset requires a minimum of 90 FPS. Why not go at 100 FPS? The ten extra frames will have little difference on whether or not your player will actually see the frame rate. When you get over 90 FPS, the framerate gets so clean that it is usually too difficult for humans to consciously realize there's a difference between, say, 90 and 100 frames.

This is coming from an animator.

That said, you could continue with the same interval and go up to 120 FPS. That'll keep the frame rate ratio in check, as it's a multiple of 30, just like 90 frames.

I hope that helps. Maya isn't made to go off random values, since there are standards for frame rates. 90 is kind of oddball.

SirJames
  • 387
  • 8
  • 27
  • I totally agree that it must be multiple of 30. But if thirty extra frames will have little difference in Preferences, not every computer can play 120 fps game. By the way 75 fps for Oculus is kind of oddball too, although Maya has such a preset. – Andy Jazz Jan 24 '17 at 12:36
  • So 90Hz refers to the displays refresh rate. That's why 90fps. It's strange that Maya has no preset for 90Hz monitors. – Andy Jazz Jan 24 '17 at 12:47
  • But 90 Hz is not always the same as 90 FPS. You can have 20 FPS on a 90 HZ screen, due to game lag, and it won't have any visual glitching outside of the game just being processed slowly. Not to mention, game FPS is variable, it goes up and down with load from the hardware. – SirJames Jan 24 '17 at 12:57
  • Another thing, the FPS in Maya is in relation to animation, not the display of visuals. You can have a lower animation rate, and it won't effect your game, in all honesty. If you're worried about visuals being affected by frame rate, you will want to check the appropriate FPS generated by the game engine, like Unreal or Unity. – SirJames Jan 24 '17 at 12:58
  • I don't know any animators who animate at 100 fps either, it seems excessive, haha. – SirJames Jan 24 '17 at 12:59
  • It's true, FR isn't constant. – Andy Jazz Jan 24 '17 at 13:00
  • 1
    Animation / frame rate-wise, there are old standards that were made for the amount displayed. There's a whole history based off it. But I agree, in this day and age, there are extra things that Autodesk should do to update their software. I will state one thing though, if your animation is properly splined, the FPS will not matter too much. Cheers! – SirJames Jan 24 '17 at 13:04
2

I feel there's some misconceptions of framerates in Maya and how animation is actually done.

The frame rates are there for animators to use their knowledge of frames and timing. However the animation keys can be set to off numbers like 15.62. The frames are there for convenience, but doesn't change the fact the animation is placed on floating points in time.

This means that you could essentially set Maya to 12 fps, and still have the animation be completely smooth in your game-engine, assuming your keys are interpolated.

It may be beneficial for animators to work at 60 fps, but there's nothing preventing you from setting a key at frame 30.5 for instance.

A trick you can use (if your computer is fast enough), is to set the "Playback by" preference to less than 1. So if you for example were animating at 30 fps, but wanted to preview your animation at 60 fps, you could simply set the following options under "Preferences > Time Slider":

  • Playback speed > Playback every frame
  • Playback by > 0.5
  • Max Playback Speed > Real-time

In the way you can do a hardware render with half frames and play it back at twice the speed.

So think of frames as points on a floating timeline...

Example of frame to time at 30 fps

Frame    0      1      2      3      4      5      6      
Time     0.000  0.033  0.067  0.100  0.133  0.167  0.200  etc.

Being an animator myself I would also hate to work at 90 fps. It is simply too many frames to consider for a single second. Rather I would adjust the few points where the animation may not be "snappy" enough when viewed at 90 fps. Usually this can be done by simply tweaking the curves.

Morten
  • 487
  • 2
  • 13
0

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)
Andy Jazz
  • 49,178
  • 17
  • 136
  • 220