Graph editor: how to convert float values to vector

Graph editor: how to convert float values to vector

Thiird
Advocate Advocate
1,504 Views
4 Replies
Message 1 of 5

Graph editor: how to convert float values to vector

Thiird
Advocate
Advocate

Hi

 

Im working on retiming alembic caches, the way I do this is by disconnecting the time node from the alembic one, and manually keyframe the time attribute on the alembic node.

After some test I came to know that the time value MUST be an integer value (81,163,4,0,..): I noticed that after I tried to set the time value to 1 at the start of the animation and 200 at the end (the cache was 200 frames long), there were a lot of pieces flying arounf the scene, because when the time value wasnt an integer the pieces in the sim were flying around the scene just for that frame (see pic 1)

So then I trid to change the interpolation of the two keys to the most appropriate one, wich in this case in this case was the Clamped interpolation...but even with this there are a couple of frame on the 200 total that havent got an integer time value. And if I try to put more than two key the thing is uncontrollable: Any interpolation tipe gives me float value somewhere on the timeline

 

So my question is: How can I have an integer value on every frame of an animation/simulation?

 

There is a way to convert float value to integer ones?

 

 

Thanks

0 Likes
1,505 Views
4 Replies
Replies (4)
Message 2 of 5

Calebos
Advocate
Advocate

Hey,

 

 I dont know if I understand well but have you tried snapping keys? Graph Editor->Edit->Snap(Snap times to multiple of: 1) but you can get slightly offsetting results depending on fps.

BTW: the time attribute is integer calculated with dependency on fps settings in the preferences of scene.

It reminds me this may happen when you have different fps in your current maya scene then that one supposed for the alembic node.

0 Likes
Message 3 of 5

Thiird
Advocate
Advocate

Ehy first thanks for the reply.

 

The frame rate is the same in when caching and when I load the cache file, so that isnt the problem.

Also your others suggestions doesent work: the key are already on "integer" frames, its the output value (the values between the frames) that are float.

I need to figure out how to time warp alembic caches :((

Any ideas?

 

0 Likes
Message 4 of 5

Calebos
Advocate
Advocate

Full scene timewarp, but it will warp all the time in the scene. It is made with warping whole time attribute.

But still I doubt it will help because you need to change time steps in alembic node.

For example if you want to slower down part of animation/dynamic simulation it will look like stepped when you change time length of that part because you need to make bigger time increment between two steps: from 1,2,3,4, etc. ... to(just example): 1,3,5,7, etc. ...

So you need to fill the interpolation between these first and third frame. In keyframe animation you have connection between two frame steps so you can change the interpolation to nonlinear. But the cache is strictly stepped so it is needed(for example in case of motion blur) to save one step not at each frame but at half or less frame part.

 

 I hope I am wrong and I hope somebody more expirienced will bring some more knowledge ...

0 Likes
Message 5 of 5

Thiird
Advocate
Advocate

When I firtstly searched on line I immediatley saw this tweet https://twitter.com/shcmack/status/363008956932689923

 

I tried that but that doesent work.

 

The fact here is that the sim Im talking about is a build demolition (pic 1) so it has a lot of pieces in it, before this sim I tried with sometingh simpler wich is a sim where I have some balls falling onto a little track, and if I try to keyframe the time or the offset attributes , it works (avi 1)

 

So at this point I guess its beacause its a complex scene...

0 Likes