Registriert: Do Dez 11, 2003 13:23 Beiträge: 25 Wohnort: South Africa
Hi All
I am in the process of implementing a Bone Blending animation class, but I have hit a math snag.
I have gotten to the point of getting all the interpolated matrices from the active animations, but I am unsure how to change them according to the weight of each animation, and then how to merge them.
PS: My math knowledge sucks, so speak to me like i'm a three year old
Any ideas will be greatly appreciated
_________________ Im out of my mind but please leave a message...
www.sulaco.co.za
Nearly. In the MD5 format you need to do 2 things:
First calc the skeleton. Usually there are lots of frames, so you actually don't need any interpolation. However, looks like you somehow managed to do that. Than you have to go through the whole skeleton, and multiply the matrices to get the world-space-matrix of each node. (Dunno, whether you already got that part).
Second thing to do is what Stucuk mentioned:
Code:
for i := 0 to High(Vertices) do
begin
Vertices[i].Position := Vec(0, 0, 0); //At least at MD5 the position is given through the weights and the bones' matrices
Obviously this in only the first part of the process, I stil need to add individual bone weights into the algo to allow for feather blending.
The current code basically allows any number of interpolated frames in several animations to be blended by their influence (Value between 0 and 1)
I had a look at doing all the calculations per vertex, but that seemed way too expensive.(My thoughts: Rather do a 16 * amount of bones calculation then an undefined number of calculations for any number of vertices in the mesh) and then just apply the resulting matrix to the correct verts in the inverted mesh.
It seems that the same theory would apply to individual bone weights, but I'll only know once I have finished that
PS: I'm using the VectorGeometry.pas file from glscene.
_________________ Im out of my mind but please leave a message...
www.sulaco.co.za
Mitglieder in diesem Forum: 0 Mitglieder und 16 Gäste
Du darfst keine neuen Themen in diesem Forum erstellen. Du darfst keine Antworten zu Themen in diesem Forum erstellen. Du darfst deine Beiträge in diesem Forum nicht ändern. Du darfst deine Beiträge in diesem Forum nicht löschen. Du darfst keine Dateianhänge in diesem Forum erstellen.