• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

MDL Parsing animation

Status
Not open for further replies.
Level 1
Joined
Aug 8, 2008
Messages
3
Hello All. I'm writing a parser in C++ to render mdl files in opengl.
I've managed to render the model staticaly.
Now i'm messing around with animations. I don't fully understand how things are related like VertexGroups, Matrices, Faces, Groups, to PivotPoints, adn Bones/Helper.

Which transformations have I to apply on vertex, in which order etc...

If someone could explain.

P.S I've read the source of the War3ModelEditor but I'm quite lost... I've searched the forum and saw a thread but it don't go far enough for me :cry:

Thankx a lot in advance
 
Well in Wc3campaigns there are good MDL tutorials.

Lets see.

Vertex Groups point to a matrix, like Vertexgroup 0 points to the First Matric, VG 1 points to the Second Matrix, and so on.

Matrixes point to multiple MDL Objects {8,5,6} points to MDL Objects with Object Id 8, 5, and 6. What does this mean? The vertex will inhirate the 33% of the transformations(translation, rotation, scale) of each of this MDL Objects. If the matrix would be of 2 {0,1}, the vertex inherites 50% of the transformations. If its of 1 object {0}, then the vertex inherites 100% of the transformations.

Now MDL Object is anything that isn't Geosets or Camera, they have different functions. Bones Associete Geosets with GeoAnims and with Helpers, if there aren't GeoAnims, then the Bones will act as the Helpers. Helpers are only used for doing transformations to their children.

Other MDL Objects are: Lights, Attachments, Particle Emitters1 [Based on 3dsmax's Super Spray, They can emit Geometry], Particle Emitters2, Ribbon Emitters, EventObjects and Colission Shapes.

Pivot Points: Pivot Points are the positions of each MDL Object, An MDL Object with objectId 0, points to the first pivot point. an Mdl Object with objectId 1, points to the second one and so on.

When MDL Objects doesn't have ObjectIds, they are shorted by order of appearence.
 
Level 1
Joined
Aug 8, 2008
Messages
3
Thank You for your quick answer.
I now understand better the problem.

I have another questions.
Let's say I render a Geoset.
I go through all faces in bucket a 3.

The values refers to an indice of my array of vertices of the geoset (so vertexGroup in the same place ....).

Which matrix (so helper/bone in the final) do i use if the 3 vertices are'nt related to the same matrix?
 
Level 1
Joined
Aug 8, 2008
Messages
3
OK i understand now. I hopped that just transformation would do the job.
Never the less a huge thankx to you:thumbs_up:
 
Status
Not open for further replies.
Top