IQM and animating on the QC side

Discuss the creation of various model formats for Quake engines, and related matters to modeling.
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

IQM and animating on the QC side

Post by goldenboy »

Stupid question: When using IQM instead of .mdl (say, using darkplaces), does the animation stuff in the QC look any different?

Has anyone actually tried this?
Handshakes
Posts: 11
Joined: Sun May 30, 2010 6:53 pm
Location: Detroit, MI

Post by Handshakes »

I wondered about this as well. I was going to experiment with it when I had a little time off to see how it works.

I'm getting really tired of putting up with Quake mdls and all the bother that goes with them, so iqm sounds great to me (in theory).
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Post by scar3crow »

I gotta admit, I love the thought of per frame bbox settings...
...and all around me was the chaos of battle and the reek of running blood.... and for the first time in my life I knew true happiness.
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

Do I do this:

$frame shotatt1 shotatt2 shotatt3 shotatt4 shotatt5 shotatt6

void() player_shot1 = [$shotatt1, player_shot2 ] {blah};

or something else?

Maybe we could also compile a list of pros and cons of .mdl vs .iqm for use in a Quake 1 mod.
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Post by leileilol »

Skeletal formats benefit from having lots of frames. Use framegroup files to take advantage of it for better animation. It works best with CSQC.

Read dpextensions.qc down to the FTE_SKELETON_OBJECTS stuff to get an idea what awesome skeleton objects can bring you
i should not be here
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

You can use IQM/ZYM/DPM/PSK/etc the same way you can use MDL/MD2/MD3, yes.

Framegroups arn't supported by all formats, but anyway...

The major advantage of skeletal formats is how they can be blended. And the only sane way to blend sequences is from the client (read: csqc) - this is the only way to twist stuff at the hip.

So you can use them the same as mdl, but if you do the only advantage of skeletal formats is editor support or file/mem size.
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Post by leileilol »

Spike wrote:The major advantage of skeletal formats is how they can be blended. And the only sane way to blend sequences is from the client (read: csqc) - this is the only way to twist stuff at the hip.
So far from my efforts, this is a myth at best... :(
i should not be here
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

Spike: That clears up a lot of it.

If Irritant reads this, I'd like to hear his opinion on IQM vs. (was it .md2?) based on AlienArena's IQM use.
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

leileilol wrote:Skeletal formats benefit from having lots of frames. Use framegroup files to take advantage of it for better animation. It works best with CSQC.

Read dpextensions.qc down to the FTE_SKELETON_OBJECTS stuff to get an idea what awesome skeleton objects can bring you
OK, I read that.

Right now I can't see how this would be useful to what I'm doing, which is making pretty typical monsters. Maybe I'll be enlightened at some later point.

It's cool that you can do something like that, animating models clientside while the game is running, but I don't see the big advantage over creating the animations you want in Blender beforehand and then simply running those.

Practical examples of awesome?
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

twisting at the hip, so the legs always move forwards while strafing.
tilting the torso so your toon can aim up and down.
doing both at the same time.
running while shooting. shooting while standing.
using the same skeleton for details like hats/armour(or like in doom3 - heads).

for monsters, maybe only the last one is relevent. depends how awesome your AI is. :)

theoretically as you have direct control over the bones, you can use twig or something to create ragdoll too, though I'm not sure if this is practical or not due to the extra overhead.
Irritant
Posts: 250
Joined: Mon May 19, 2008 2:54 pm
Location: Maryland
Contact:

Post by Irritant »

goldenboy wrote:Spike: That clears up a lot of it.

If Irritant reads this, I'd like to hear his opinion on IQM vs. (was it .md2?) based on AlienArena's IQM use.
Well .md2 was just horrible for animated meshes(it's fine for static).

You can see the difference between the two formats here, with the .md2 having horrendous vertex deformation:

http://offload1.icculus.org:9090/aliena ... cs/iqm.jpg

The other advantage is, as mentioned, with a skeletal model you can do nice animation tricks, like bending and twisting at the waist:

http://offload1.icculus.org:9090/aliena ... mbend2.jpg

Lastly, with skeletal models you can do much cooler things such as ragdoll physics:

http://www.moddb.com/games/alien-arena- ... 2#imagebox
http://red.planetarena.org - Alien Arena and the CRX engine
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

So

A) it's a superior format - what Irritant (and others) said (vertex drift, loss of precision) seems to point in this direction? Requires IQM support in engines, though.

B) several parts of the skeleton can be animated by different parts of the gamecode at the same time, using different animations - strafing and looking and shooting for example, and this is done in CSQC?

Without needing to actually animate all these possible combinations in Max/Blender, just the basic movements (strafing, looking, shooting)?

This might be nice for player models (multiplayer) or things like strafing grunts, or certain monsters walking and attacking at the same time. It requires CSQC support first, though :-/

Even if this stuff isn't done *now*, someone may want to add it at a later point so having the support might be a good thing.

C) direct control over the bones allows ragdoll physics using TWIG or maybe ODE?


The net gain from this seems to be a more modern model format with the potential for more complex animations and physics.

In Quake, works like .mdl, but CSQC required for the anim tricks, some sort of physics (twig, ODE?) required for ragdoll, and IQM support required in engines.

So it has a lot of potential, but also some steep requirements, which atm only Darkplaces provides. The steepest one is CSQC.

That about right?
Irritant
Posts: 250
Joined: Mon May 19, 2008 2:54 pm
Location: Maryland
Contact:

Post by Irritant »

You don't need CSQC to animate, remember Alien Arena does not use Darkplaces and is not based on Q1 sources. Everything is done in the renderer, with only minor information passed from the client.

I'm guessing darkplaces does this in CSQC to give modders more freedom.
http://red.planetarena.org - Alien Arena and the CRX engine
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

I see. I assume Spike was talking specifically about Quake when he said
The major advantage of skeletal formats is how they can be blended. And the only sane way to blend sequences is from the client (read: csqc) - this is the only way to twist stuff at the hip.
What do engine coders think - is IQM loading easy enough to implement in Quake engines to allow for a broader support, if a mod actually goes and uses IQM?
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

regarding animation, at the end of the day, you need multiple frame sources on a single model. you need legs animation, torso animation, torso twist, torso pitch, some way to say where the legs end and tosro begins, head tilt, head twist, mouth maybe,
And once you have all that, you're maybe on a par with halflife. The original one.
You can either code those in specifically in your protocol, or you can get client-game code to do it, or you can write the values directly into the engine, if your engine is to only ever run a single game/mod.
Or you could send the entire skeleton over the net every frame, and thereby limit yourself to 4 players max.

ragdoll is a much more complicated beast.
Post Reply