HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

What Exactly ARE global durations?

03-06-2004, 08:21 PM#1
Kojiro
I have no idea what they're used for, if someone could help me, how to set one up, explain to me exactly WHAT you need them for, etc...
That'd be most helpful, thanks.
03-07-2004, 03:59 AM#2
Ari
Global sequences are animation keyframes that ALWAYS run regardless of the current animation. For example, a water elemental has an animated texture that gives it that "flowing" look. Animating that texture used a global sequence so that the water elemental always has that look, independent of the animation (this means there's no transition from one animation to another, at least with respect to the flowing).

If you notice that some models have a "pulsing" aspect that's always on, usually that uses a global sequence. Certain hero glows, for example, use one so that the glow gets slightly larger and smaller in a regular cycle.

A global sequence is used just like any other animation, but it has to be defined immediately below the animations. My advice would be to "reverse engineer" an existing model with a global sequence to get down the syntax and usage. Let me know if you have any specific questions.
03-09-2004, 02:38 AM#3
toxicseaweed3
could you suggest any units with animated textures, i'm already looking at water elemental and i think the fountain of life, i could be wrong, i'm noticing that this stuff doesn't show up in viewer and its a real pain for me to restart editor. Though please a list :)
03-09-2004, 03:02 AM#4
toxicseaweed3
Okay after about 1:30 hours of looking at the water elemental skin and comparing it to various other skins *i can think of no other animated* i've figured out that the

-global sequences are different parts of the animation that constantly run *you already know that*

-under Materials it will specificly define when the animation will run, fact, heres a little snippet
Quote:
Material {
ConstantColor,
PriorityPlane -1,
not sure what constant color is but i'm guessing that priority plane -1 means cover all of or infinite skin.

Quote:
Layer {
FilterMode Blend,
Unshaded,
TextureID 8 {
DontInterp,
GlobalSeqId 0,
0: 0,
83: 1,
166: 2,
249: 3,
332: 4,
415: 5,
498: 6,
581: 7,
}
now i'm new at this and i'm not too sure what Dont Interp and i'm only guessing that GlobalSeqId refers to where the global sequence starts but i'm pretty sure that the part where it lists off the keyframes is where this will initiate, though i'm a little foggy on the numbers to the right of them.

Quote:
TVertexAnimId 0,
Alpha 5 {
Linear,
0: 0.99,
2167: 0.99,
4867: 0.99,
10167: 0.99,
16633: 0.99,
}
}
i'm guessing this part is the keyframes where the animtion will show though again i'm unsure what the numbers to the right of them mean.
Quote:
Layer {
FilterMode Additive,
TextureID 8 {
DontInterp,
GlobalSeqId 2,
0: 0,
55: 1,
110: 2,
165: 3,
220: 4,
275: 5,
330: 6,
385: 7,
}
i'm thinking that blizzard has 2 skins animating simultaneously ontop of eachother so thats why they have 2 of these.
Hmm i'm wondering if the numbers to the right of show what texture to be used at the time, for example.
0: 0,
55: 1,
110: 2,
165: 3,
220: 4,
275: 5,
330: 6,
385: 7,
maybe the numbers are what bitmaps should be showing between those keyframes, now i could be wrong, though that makes sense in my mind, because there are 0 different textures/bitmaps defined in the textures section.
Quote:
TVertexAnimId 0,
Alpha 5 {
Linear,
0: 0.5,
2167: 0.5,
4867: 0.5,
10167: 0.5,
16633: 0.5,
}
}
}
maybe this is just sets how opaque the textures are when the animation reaches this keyframe.

The Global sequencing is a little weird, i know it refers to keyframes but sense i'm pretty new at MDL's i'm not sure what the keyframes exactly mean. Do they show where they start? stop? what defines when they stop if thats the case.


I'm not too sure how to experiment with this, though i hope you'll tell me what you came across. I may try changing textures and copying this into something like a peasant, goodluck :)

oh yeah and can you suggest any other units that have global sequences/animated textures? i can't think of any others besides the water elemental
03-09-2004, 05:53 AM#5
Ari
Perhaps I shouldn't have used the water elemental as an example - although it uses global sequences, it has a number of complicated things going on. It's a nightmare-ish way to introduce yourself to mdl-editing. Let me try to make up a simple example of how global sequences work.

Imagine I have a model that consists of a modified footman with a sphere "orbiting" his head (like an orb of fire, say). I want the sphere to orbit the head at a rate of one revolution per second.

I'll give him two animations, walk and stand:

Sequences 2 {
Anim "Stand - 1" {
Interval { 1, 1000 },
MinimumExtent { -19.5992, -33.1796, -0.28233 },
MaximumExtent { 52.4008, 36.7176, 99.0722 },
BoundsRadius 62.4483,
}
Anim "Walk" {
Interval { 2001, 3500 },
MoveSpeed 215,
MinimumExtent { -47.6727, -53.8232, 0.516667 },
MaximumExtent { 57.0995, 45.488, 107.691 },
BoundsRadius 64.2779,
}
}

The numbers in the "interval" are the "keyframes." These are the references used by the model to define points in an animation. In general, each 1000 frames corresponds to about a second of animation.

Much later in the model are instructions on how bones should be oriented with each "keyframe":

Helper "Bone_Leg2_L" {
ObjectId 28,
Parent 27, // "Bone_Leg1_L"
Rotation 93 {
Hermite,
167: { 0.023193, 0.24944, 0.103678, 0.962545 },
InTan { 0.023193, 0.24944, 0.103678, 0.962545 },
OutTan { 0.023193, 0.24944, 0.103678, 0.962545 },
467: { 0.037152, 0.297553, 0.106925, 0.947971 },
InTan { 0.037152, 0.297553, 0.106925, 0.947971 },
OutTan { 0.037152, 0.297553, 0.106925, 0.947971 },
900: { 0.0571259, 0.365581, 0.111098, 0.922358 },
InTan { 0.0571259, 0.365581, 0.111098, 0.922358 },
OutTan { 0.0571259, 0.365581, 0.111098, 0.922358 },
etc, etc

Although it looks complicated, in this case, it's instructing a "helper" (a structural aspect of the model to rotate in different ways at different times, to create the animation.

I could instruct the "orbiting" sphere I wish to create to orbit according to these keyframes as well. But, imagine what would happen, if I abruptly went from a stand animation to a walk animation. If I were at the midway point in the stand animation the sphere would be half way around. If I abruptly went to the walk animation, the sphere would jump to the other side suddenly.
Another issue would be the walk animation itself. Notice that while the stand animation is 1000 frames long, the walk animation is 1500. So while I can make the sphere orbit evenly in the stand animation, I would have difficulties in the walk animation.

*This* is one of the uses of global sequences. I can create a sequence that plays independant of the animation, and instruct aspects of the model to "loop" continuously:

GlobalSequences 1 {
Duration 1000,
}

I insert this immediately below the regular animation data. Now, when animating the bone or helper that makes the sphere orbit, I refer to this global sequence, rather than the normal sequences:

Rotation 10 {
Linear,
GlobalSeqId 0,
0: { 0.047606, 0, 0.0123121, -0.99879 },
500: { 0.109597, 0, 0.0283441, -0.993572 },
1000: { 0.047606, 0, 0.0123121, -0.99879 },
}
etc.

Now, the sphere will rotate in a loop, ignoring the animation being played. Similarly, the water elemental's skin will cycle though multiple frames regardless of the animation.
03-09-2004, 06:06 AM#6
Ari
Having said all that, let me try to explain the water elemental specific stuff you mentioned (in general, it sounds like you got most of it on the mark):

Layer {
FilterMode Additive,
TextureID 8 {
DontInterp,
GlobalSeqId 2,
0: 0,
55: 1,
110: 2,
(etc)

this indeed tells the material to use different textures at different times. Notice that there are multiple water skins defined in the "textures". Every ~50 ms, the model switches skins, making the flowing effect.

GlobalsequenceID refers to which particular global sequence is refered to here. This is the *3rd* one listed under "global sequences."

Dontinterp stands for "don't interpolate." In the case of motion, it tells the model not to try to smooth out the animation. I'm not entirely sure what it means in this context.

The two layers you alluded to are probably the watery skin and the teamcolor, both of which are present.
03-10-2004, 03:30 AM#7
toxicseaweed3
hhmm thanks, though with this now i still have more questions, I tried to give a militia *less animations than peasant* the water elementals stuff, cept with only 2 textures, though i ran into the problem of what texture to assign the geoset *only 1 not mulitple* I noticed materialID's that don't even make sense in relation with the texuture, maybe the water elemental is really too hard :) though if you got any suggestions for what other models i could take a look at i would be happy :)
03-11-2004, 11:55 PM#8
Kojiro
Hm, I hate to boost this thread any more. And I don't want to, but it wouldn't be polite not to thank Ari for his detailed explanation, perhaps someone could even use this in the tutorials section? Anyway, thanks.