• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Does anyone have experience with the MDL/MDX formats?

Status
Not open for further replies.
Level 13
Joined
Mar 25, 2004
Messages
28
I'm looking for some pointers on how geosets and geoset animations connects. It seems like there's a N:1 relation from geosetanims to geosets, though it seems correct in most cases there are exceptions.

As an example, look into battlestandard.mdl. There is one geoset and one geosetanimation (shouldn't be any doubt how they are connected, right?). The geoset animation have this alpha track:

Code:
Alpha 4 {
	DontInterp,
	7667: 0,
	7800: 1,
	9500: 1,
	9867: 0,
}

Thus everything after 9867 is 0 (invisible), right?

But looking at the sequences, two of them (stand-1 and stand-2 have the intervals { 16667, 19667 } and { 20333, 23333 }, which is way beyond 9867, thus always invisible, right? How does this work? The animations plays fine (is visible) in warcraft 3, but I just can't see the logic why they are visible! Shouldn't they have alpha = 0?[/code]
 
Level 23
Joined
Mar 29, 2004
Messages
1,979
Actually, 1 is visible, 0 is invisible. The problem here is that in warcraft each sequence considers only the keyframes within the interval; so the geoset's default visibility is 1, and when there is not keyframe changing this at the start of the sequence, it remains visible. So if "9867: 0," is the first frame of a sequence, the geoset becomes invisible for that sequence, until it hits the next key telling it to change. If a different sequence begins after, say at 10000, then the visibility will go back to default because alpha has not been defined within that sequence.

Sorry if that doesn't make any sense :S
 
Level 13
Joined
Mar 25, 2004
Messages
28
Much appreciated, this may solve my problem!

Another follow-up question, if an animation loops do you know how the interpolation is handled when going from the end of the interval to the beginning? Is it a direct jump or is there a proper interpolation form the last node in the interval to the first? (tell me if that sentence makes no sence, or is confusing)
 
Level 13
Joined
Mar 25, 2004
Messages
28
The suggestion above worked 99.9% fine for visibility (for some reason some rare geosets, usually the corpse does not show up sometimes, but that's a minor problem currently).

However, for rotations I'm not as convinced. Consider DivineShieldTarget.mdl:

The animation Stand goes in the interval { 1967, 2667 }.

The surrounding rotation nodes are:
Code:
1625: { 0, 0, 0.413028, 0.910718 },
InTan { 0, 0, 0.407093, 0.913387 },
OutTan { 0, 0, 0.421408, 0.906871 },

2167: { 0, 0, 0.931646, 0.363368 },
InTan { 0, 0, 0.931646, 0.363368 },
OutTan { 0, 0, 0.931646, 0.363368 },

(no more)

The model rotates constantly, but if a default rotation value should be applied between 1625 and 1967 it won't rotate. I then assume that a default rotation value should be applied at 1967 and then all values inbetween be interpolated? But what about after 2167 to 2667?
 
Level 7
Joined
Aug 31, 2005
Messages
120
I have looked closely at it in the model viewer.
The rune-circle preforms a rotation of about 1/8, then back again.

So, the model viewer interprets the rotation instrucktions different from the game engine.

I think the issue is this:
The rotation are never reset. The bone do not remember its initial direction, each rotation are "added" to its direction.

Btw. does anyone know what the four values in rotation movements are? I know that the three values in the translation movement are the {x, y, z} values.
 
Status
Not open for further replies.
Top