Darkplaces MD3 mod [For learning]?

Discuss the creation of various model formats for Quake engines, and related matters to modeling.
Post Reply
Mexicouger
Posts: 514
Joined: Sat May 01, 2010 10:12 pm
Contact:

Darkplaces MD3 mod [For learning]?

Post by Mexicouger »

Can anyone point to me a good Darkplaces or Quake mod that uses MD3 model format as a base, and has the source included so I can study and learn how it functions in both Code AND blender?
Or could anyone be as sweet as to explain it to me? I have been wanting to learn how to use more advanced model formats than basic(Crap) Mdl, but it is complete hell for me. So I would very much appreciate(Very very much) some aid.

Thanks!
Ace12GA
Posts: 56
Joined: Sat Jan 28, 2012 12:08 am

Re: Darkplaces MD3 mod [For learning]?

Post by Ace12GA »

I can't provide links to finished mods with source code, but I can give you some information from the perspective of someone that very recently coded 5 new view weapon models with complex animations into a mod for Darkplaces.

The more modern formats are coded the same way as the original, essentially by iterating through the raw frame numbers. You precache the mesh, and assign it the same way you would a quake mdl file. You call the animation by frames. I used the .dpm format, because I like skeletal animation, and because the tools to convert half life smd's is pretty easy to use. I was able to use .framegroup files for my models to simplify my animation calls. So my framegroup file for my akimbo pistol model is as follows:

Code: Select all

2 40 15 1 // Idle
42 41 15 1 // Idle Empty Right
83 41 15 1 // Idle Empty Both
124 11 30 0 // Fire Right
135 11 30 0 // Fire Right Empty
146 11 30 0 // Fire Left
157 11 30 0 // Fire Left Empty
168 41 25 0 // Reload
209 16 30 0 // Draw
225 11 30 0 // Holster
This is great in that I make a call to the framegroup from code, and it plays the full animation. E.g.:

Code: Select all

self.weaponframe=0 // calls the Idle animation.
self.weaponframe=3 // calls the Fire Right animation.
This was a lot nicer than:

Code: Select all

void() fire_right1 = [ 124, fire_right2 ] { ... some code ... };
void() fire_right2 = [ 125, fire_right3 ] { ... some code ... };
void() fire_right3 = [ 126, fire_right4 ] { ... some code ... };
void() fire_right4 = [ 127, fire_right5 ] { ... some code ... };
void() fire_right5 = [ 128, fire_right6 ] { ... some code ... };
void() fire_right6 = [ 129, fire_right7 ] { ... some code ... };
void() fire_right7 = [ 131, fire_right8 ] { ... some code ... };
void() fire_right8 = [ 132, fire_right9 ] { ... some code ... };
void() fire_right9 = [ 133, fire_right10 ] { ... some code ... };
void() fire_right10 = [ 134, fire_right11 ] { ... some code ... };
void() fire_right11 = [ 135, idle1 ] { ... some code ... };
That code is actually wrong, but you get the idea of why frame groups are cool.

There may be some specific quirks to md3, but the principles are the same, and actually require little to no modification in how you do things in QuakeC.
DusterdooSmock
Posts: 170
Joined: Thu Aug 19, 2010 9:58 pm

Re: Darkplaces MD3 mod [For learning]?

Post by DusterdooSmock »

Sorry for stealing this topic, but is there a way to use framegroups with normal Quake MDLs? And is there any documentation on it?
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Darkplaces MD3 mod [For learning]?

Post by leileilol »

I'm going to be on topic and suggest Urre's weird md3 box player mod which is attachment powered.
i should not be here
Ace12GA
Posts: 56
Joined: Sat Jan 28, 2012 12:08 am

Re: Darkplaces MD3 mod [For learning]?

Post by Ace12GA »

DusterdooSmock wrote:Sorry for stealing this topic, but is there a way to use framegroups with normal Quake MDLs? And is there any documentation on it?
Quake MDL's can contain framegroups natively, however according to this source, you can use a .framegroup file with Quake MDL files.

http://dpwiki.slipgateconstruct.com/ind ... ing_for_DP
Ace12GA
Posts: 56
Joined: Sat Jan 28, 2012 12:08 am

Re: Darkplaces MD3 mod [For learning]?

Post by Ace12GA »

leileilol wrote:I'm going to be on topic and suggest Urre's weird md3 box player mod which is attachment powered.
That is a neat little mod, I must admit.

http://forums.inside3d.com/viewtopic.ph ... e+md3#p373
Post Reply