The 3D model has different frames depending on how it is implemented....ㅠㅠㅠ

Is there anyone who can help me?

  1. animation frame
    “3D model frame” and “sandbox frame” are different.
    “sandbox frame” and “scene frame” are different.
    => 3D model frame ≠ sandbox frame ≠ scene frame
    but!! They all have the same 3D model

(Maya) 3D model Max current frame 7723
(Babylon Sandbox) sandbox Max current frame 7742.2503
(My Babylon project) Max current frame 129.167

NOTE Image 1, 2, 3
Image 1.


Image 2.

Image 3.

//------------------------------------------------------------------------------------------------------

  1. animation control
    There are several animations in one animation clip, but is there a way to separate them and save them as variables and execute them separately?
    ex)
    idle : 20 ~ 150 frame
    walk : 170 ~ 250 frame
    run : 270 ~ 350 frame

//------------------------------------------------------------------------------------------------------

  1. animation frame controll
    Is there a way to run animationcrip by specifying the start frame and the end frame?
    I tried “animationCript.start(false,1,0,4.39);”.

I hope @PatrickRyan can help with that, but I am sure providing the model will be very helpful.

1 Like

Let me go through your points:

One important thing to take into consideration here is what is the FPS (frames per second) of each application. I’m not sure what Maya uses, but as of 5.0, Babylon will load frames at 60 FPS by default. Previously, it loaded them at 1 FPS. Since the Sandbox and your application show different results, I suspect your project is using an older Babylon version? If so, you can set the GLTF loader to load at 1 FPS with this code snippet:

BABYLON.SceneLoader.OnPluginActivatedObservable.add(function (loader) {
        if (loader.name === "gltf") {
            loader.targetFps = 1;
        }
    });

Yes, there is. There are some examples of this in:
Advanced Animation Methods | Babylon.js Documentation (babylonjs.com)

5 Likes

@qkrxotn7287 the point brought up by @carolhmj is likely the culprit. The default frame rate in Maya is 24fps. You can change this in the preferences menu under Time Slider:

The red box shows the default frame rate for Maya. Note that changing this will almost always refactor your keys onto partial frames - i.e. a key may sit in frame 10.125 depending on the conversion. To make sure that you are seeing your animation correctly, ensure that the Playback speed matches your frame rate - i.e. 60 fps x 1 to play at the specified frame rate. If you set this parameter to Play every frame the software will play your timeline as fast as your computer resources will allow, which will likely mean a much faster frame rate for a simple scene and a slower frame rate for a complex scene.

It’s always best to change the frame rate for your Maya scene to 60fps as your first task for any file that you will send into Babylon.

1 Like

Thank you for the good answer!
In Maya, it became sandbox = Maya at 60fps.
But FPS is still different in my project.
Maya = 7500
Sandbox = 7500
My project = 129
My project is Babylon 4.2v.
Please understand that I can’t show you the model due to security…ㅠㅠ

Thank you for the good answer!
I have to do something else right now, so I’ll finish it quickly and run the code you answered! Thank you.

Oh, that’s what I imagined. The targetFps property doesn’t exist in 4.2, so it will always load at 1 FPS. If you want the animation to be at 60 FPS to match with the sandbox, then you need to retarget it after loading. Or you can just leave it as it is.

2 Likes

Can I run one animation clip in duplicate?

ex)
human Animation clip

  1. Raise left hand : 0 ~ 50
  2. Lower left hand : 60 ~ 110
  3. Raise right hand : 120 ~ 170
  4. Lower right hand : 180 ~ 230
    this one animation clip

Yep, you can! You can select the range of the animation clip to play, so you can just play the 0-50 and 120-170 ranges simultaneously :slight_smile:

1 Like