PDA

View Full Version : How to copy the state of an object in a future frame.


CerberusC
04-12-2009, 08:33 PM
I mean:

Think that you have a teapot, and you have an animation so the teapot it's big in the frame 20 and small in the frame 40.
So i'm in the frame 30 and i want to make a copy of the teapot in it's state of the frame 40 (all, scale, position, rotation...like an snapshot, but i don't want to move the slider to go to the frame 40 and snapshot it, i has to be dont internally)

Can i?

Thanks to all for your help.

Cheers!

RobGalanakis
04-12-2009, 10:10 PM
tm = at time 40 ($.transform)
at time 30 ($.transform = tm)

Bobo
04-12-2009, 10:13 PM
I mean:

Think that you have a teapot, and you have an animation so the teapot it's big in the frame 20 and small in the frame 40.
So i'm in the frame 30 and i want to make a copy of the teapot in it's state of the frame 40 (all, scale, position, rotation...like an snapshot, but i don't want to move the slider to go to the frame 40 and snapshot it, i has to be dont internally)

Can i?

Thanks to all for your help.

Cheers!

*Create a sphere and animate its radius (or whatever) on frame 100.
*Go to frame 0 and run this:

at time 50 theMesh = snapshotasmesh $Sphere01
TriMesh
newNode = Editable_Mesh()
$Editable_Mesh:Object01 @ [0.000000,0.000000,0.000000]
newNode.mesh = theMesh
TriMesh
select newNode
OK

The resulting snapshot will be a mesh at 0,0,0 with the mesh of the sphere on frame 50.

In general, snapshotAsMesh() returns a triMesh of the geometry object on top of the stack after all modifiers, world space transformations and Space Warps/WSMs.

at time Bla () creates a time context which forces Max to perform the operations inside the block at a specific time different from the current time. This does NOT work for all cases, for example PFlow will not like that since it has special time handling. But it works for most things.

CerberusC
04-12-2009, 10:23 PM
Thanks Bobo, that was exactly what i need, in fact only the command "at time 50" is what i need to know, i did not know that i can do this.

RobGalanakis that was not what i want, what you do is to copy the transform, but what i need is a copy of the mesh whith it's properties, what bobo did, but it helped me too to unedrstand the "at time" command.

Thanks to both of you!

Cheers.

CGTalk Moderation
04-12-2009, 10:23 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.