[ASK] How to get vertex data from animated mesh?

Software: Away3D 4.x

bart_the_13th, Newbie
Posted: 09 January 2013 10:22 AM   Total Posts: 14

Ok, so I have this animated person_holding_gun mesh(md2 file) and want to actually put the gun on his hand. I do can get the current vertex data to get the hand’s vertex position when not animated, but, when the person is animated, the vertex data seems stays unanimated.
So, is there a way to get the vertex data from the animated mesh?

   

Rasterizer, Member
Posted: 09 January 2013 10:29 AM   Total Posts: 69   [ # 1 ]

I think the way this works is that you attach the object to the SKELETON’s HAND, not the mesh itself.

I will be facing this issue soon as well and preliminary research seems to be pointing in that direction.

   

bart_the_13th, Newbie
Posted: 09 January 2013 10:46 AM   Total Posts: 14   [ # 2 ]

Well, I do think using skeleton based animation will be the best solution considering I need to rotate some body part after animating too…
What is the most convenient way to export to skeleton animation mesh from blender(I’m still using the old 2.49 I believe). I have already tried to use md5 exporter but it seems I missed one step or two and still fail to display the mesh on the screen..
But I do still hope that there is some kind of way to do it using vertex animation since I’m already kind of get a hang of it.

   

Rasterizer, Member
Posted: 09 January 2013 10:53 AM   Total Posts: 69   [ # 3 ]

I haven’t tried it, but if I was you, I’d put down index of a chosen vertice, then lookup that vertice’s position and normals at each frame and reposition my object according to it.

   

bart_the_13th, Newbie
Posted: 09 January 2013 11:00 AM   Total Posts: 14   [ # 4 ]

Yup, that’s what I’m currently using
I’m using this

var gunPost:Vertex this.geometry.subGeometries[0].vertexData[handVertexNumber]

to get the vertex position, but it seems that using subgeometries doesn’t take animation into account, so maybe I’m just using the wrong technique.
I do think that the VertexAnimationStates should get the reference to animated vertexData, but I still cant find it.

Oh and I also do applyTransform to put the gun in the world position ( the result was in local position)

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X