Play and pause of animation that is done in Blender and imported to Nvidia

Hello,

I am struggling a bit for the animation which is done in blender and imported into nvidia omniverse. I want to know how can we play and pause the BLENDER model animations with click of a button that is created in action graph.

I tried the following approaches for this:

  1. Tried to stop the animation using action graph where I created a button and by using ‘on widget clicked’ and connected it to the ‘Timeline(stop)’ input but this didn’t work for me. I even tried it with the ‘stage’ event to stop the animation while playing but even this didn’t work.

  2. Secondly we didn’t have any animation data to access and take control of the animation(play and pause it). Wanted to know how can we access the animation of the objects if the animation is done in blender not in omniverse.

  3. Tried converting the prims having animation to “USD TimeSamples to curves” i connected ‘on_tick’ as well as ‘On_Playback_Tick’ to the timeline node after converting but still it doesn’t work. Seems like it is not referring to the timeline.

I just want to play and pause a animation of an object that is done in blender.
I am pretty new to Nvidia Omniverse, thus I need help with this.
Looking forward to your suggestions.

zipped the images images.zip (469.6 KB)

@vivek.chaini can you please share the USD file to take a look on what’s the real problem you are facing?

Here is the USD
Collected_AnimationTestGraph.zip (224.5 KB)

If you do know how to program a customized node, you may play around with the omni.timeline API in your node and then stop/play the time. If you don’t. We may address this type of issue in the next release. But in this release. I offer you some tricks to do so.


Step 1

Step 2

2 Likes


Step 3

1 Like

Thanks @jiayuan I will try this out. Great explaination.

So I have some points that I have @jiayuan @mukundang:

  1. Having some issues with the animation where I see the prims having animation floats around the scene after i converted them to USD curve and those parts that are floating around comes back to the default positions when it those prims specifically starts showing the animation like here when the car come to the arms the parts of the arms comes to the default pos. Here are the screenshhots

  1. And also there are many animation data in the push graph that got generated after converting because of the quantity of prims got converted that are there in the scene i dont have the exact numbers but it seems it has 50+ like this so i am just manually attaching the timecode variable to the time. Is there any workaround to this faster? It is very much harder to connect nodes like this because of the lag and many times it just shows not responding.

Screenshots:
MicrosoftTeams-ima45ge.zip (3.6 MB)

  1. The conversion from timeSamples to sparse keyframe is not a loss-free conversion. There might be some small error introduced. You may reduce the Error tolerance value to make it closer to the original animation. You may even uncheck the Sparse Curve option so that it is not a sparsed curve but a dense timesample. There will be some performance loss for this dense timesample, though it is obvious more accurate.
    convert
  2. Every animated mesh comes with an animationData prim and graph nodes. Maybe we can consider using script to connect the timecode variable to those nodes in one batch.

Hello @jiayuan so in my project total length of the animation is 4500 but in the curve editor when i click timeline it shows upto 240. Now if i play by clicking custom start button the animations are playing for a while then stops i dont know why that is happening.
If i click the animation data under the timeline it goes upto 4500 in curve editor.

your timeline shows upto 240 frames because you set so. In your timeline prim, you set the length to 10.0 while the framerate to be 24, that’s 24*10.0(seconds)=240 frames. If your animation is 4500 frames, and you want to start playingback the animation with your keyboard input, you’d construct a 4500 frames curve in your timeline prim. That is you set the length to 4500/24.0 = 187.5 seconds then select the second key and set its value from (240.0, 240.0) to (4500.0, 4500.0)

1 Like