Bake vertex position from modifier stack

31 votes
Version: 
1.0
Date Updated: 
04/22/2010

I was wondering on how I could achieve a footstep-like effect on a mesh without some fancy softbody/physics/plugin-action, and I came up with this script. It basically bakes the vertex position from the modifierstack on each frame to a keyframed editable_poly object. It keyframes only the modified part of the mesh, and does not change it back, hence the "track-effect". See the example image:

example

 

The first rectangle shows a standard editable_poly with volume select and  push modifiers applied to it. The volume select is connected to the sphere floating around. The next three rectangles are the result from applying the bake script, just with different modifiers applied to it after the baking.

Some quick info:

- It only applies to the object's vertex selection, so if you have no vertices selected, the script bakes the whole object.

- The object must be an editable_poly.

- It is kinda slow.

 

If anything is unclear or you have suggestions to the script, drop me a line!

You could produce some really cool effects using this script, hope you like it : )

Ps. If there is another easy way to produce footsteps, let me know ; )


Version Requirement: 
Tested on max2010

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
redddrum's picture

PathDeform Modifier Trick

Hi,
I know it'a bit old but, i experienced the same with PathDeform modifier.
In my case, I 've all baked to a PointCache and load the xml in again and collapse the stack under it.
Allowing me to add the EditPoly on top, sub-select all vertex and launch this awesome script.
It worked very well through this process !!
As a side note, i think there is just a weird thing about timeline length :
My animation and timeline were both 0-60.
Executing the script as is, produced the baked keys from 0 to 35 only.
So the fast way for me was to extend the original timeline end to 120, then the script processed the entire 0-60 section i originally wanted.
I finally bring the timeline end back to 60 and this is all good now.
Hope this can help someone else !

note: i'm using 3dsMax 2014

LaSauvage's picture

How slow is it?

I downloaded the script, tried it
I used a pathdeform modifier, so I couldn't add the edit poly on top but I added it beneath instead
It seemed to work, selecting the vertex and everything, and clicking bake, but now I've been staring at the progress bar for an hour or so, and it's still only halfway filled and in the background my modifier is gone and I don't see any keyframe having been made...

Sooo wondering if I messed up somewhere?

michaelwbell's picture

Fantastic!

This script worked great! Can't believe it isn't possible to do this in Max already - unless i'm wrong?

-Download link is gone, but if you copy the link found in the 'download URL' of this page into the "Wayback Machine" (google it), you can download the script!

Usage instructions:
1) make sure your timeline is starting from frame 0 to whatever frame you need.
2) add an EDIT POLY modifier on top of your object's modifier stack (on top of the skin, etc)
3) go into the vertex mode of the EDIT POLY modifier and select all vertices
4) open the script
5) Select the "object" in the script (click on your object)
6) hit bake!

Thanks for this great script!

RhinoMan's picture

New DL Location?

Hello,
This seems to be just what I need right now, but the download location doesn't work.
Does anyone have an updated DL location, or can someone maybe send me the file?

superhoha's picture

Sorry. Sth to ask. First, why

Sorry. Sth to ask.

First, why do you need to add a edit mesh mod to the plane for soft selection if the volume select have soft selection already?

Second, when I bake the vertex, it doesnt keep the soft selection, is it normal?

Very nice sript btw. handy for things like footstep or trail, way better than use softbody plugins.

mark pigott's picture

Hi! I set up a 200x100 grid,

It will work on Max 6 if BOTH the plane AND the sphere are editble polys,

It Removes the Volume Select
ande Push ()in my case) but it does not remember the effect.
Nothing is printed on the max listener.

Electro Magnetic's picture

about fbx

hi man your script is perfect
really really im looking for somthing like that for long time ago
But.......!

after make simple cloth then bake animation
script make keyframes good

when export fbx file
sure check on animation export and bake animation on propety window

after import sam file i have only 1 frame all keyframes script created lost

any help ?
thx man
wating for you

haavards's picture

If you read the description

If you read the description of this script you will see "The first rectangle shows a standard editable_poly with volume select and push modifiers applied to it." Wink

GustavoXX's picture

I need to do exactly the same

I need to do exactly the same of the first rectangle.
I have my sphere animated and a "floor" that i need to be modified by this sphere...How can i do it??

haavards's picture

Thanks for testing! Do you

Thanks for testing!
Do you get an error message? What does the listener say?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.