[Closed] Bake Modifer Animation onto Bones?
Hi I am trying to bake modifer animation into a bones system… any one have any idea how i would go about this or have a script that already dose this?
Basicaly, I am using the .X exporter for games and mesh animation (like morph etc) is not supported. So I thought if you made a bunch of bones linked to vertexes in the mesh as it deforms you coudl then bake the animation of the bones movment into them…
IS this possible?
So your talking about facial morphs to bones right? I’m guessing something like this:
first off you need a bone or point for each vert
(
local pointArray =#()
slidertime = -1 -- bind pose (frame you skin the mesh too)
with animate on
(
for i = 1 to selection[1].verts.count do
(
p = point()
p.pos = selection[1].verts[i].pos
append pointArray p
)
)
with animate on
(
for f = animationRange.start to animationRange.end do
(
slidertime = f
for p = 1 to pointArray.count do
(
pointArray[p].pos = selection[1].verts[p].pos
)
)
)
)
this is the basics, you could do more too, like building a hierachy etc – i would do something like append an array as a paramblock in the scene with the points/bones.You could then check in the first place if this array is populated with the points/bones and animate them. If not populate it.
You’d have to do this:
[ol]
[li]generate all the animations for the points/bones[/li][li]blow away the morph animation[/li][li]skin to the points/bones[/li][/ol]
yea… i have been doing it manualy sorta like that… but not a scripter… was woudnering if you have any other advise on how to script this.