• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Alternating Global Animations?

Status
Not open for further replies.
Level 5
Joined
Mar 6, 2015
Messages
38
I'm wondering if there is any way to make it so that you can swap between 2 global animation sequences on a model in-game using triggers.


A very simple example of this is as follows:
- Let's say you're making a DBZ map. You want Goku to be able to transform from Base->SuperSaiyan->SS2->SS3->SSBlue.
- So you have a Goku model with normal hair/super saiyan hair/SuperSaiyan2/SuperSaiyan3/SSBlue hair.
- For some reason your Goku model has 60+ animations just for his base form. So we can't just use an Illidan-style transformation for each hair, that would go over 255 altogether. And the filesize would become pretty huge!
- Using a medivh model swap would also mean 5 different models and even more filesize than the illidan transformation.
- You also want the hair to be animated. So you can't just have a bald goku and attach the hair via in-game attachments.


In this case, the best solution would be to find some way to exploit globals. Either:
A. Creating 5 globals(one for each hair). Each global sets one hair to visible/normal size while the other four hairstyles are made invisible or scaled to zero.
Then simply use a trigger to change which global will play so that the hair is swapped out for the correct form.
B. Creating 1 global that lasts for 10 seconds. Every 2 seconds in this animation, it swaps to the next hair by making all other hairs invisible/scaled-to-zero.
Then a trigger would simply pause the global sequence at the correct point and stop it from progressing, or constantly loop it between those two seconds that it currently needs.
IE if you're in Base Goku form, it would loop from 0.01~1.99 seconds of the animation. If you're in SuperSaiyan it would loop 2.01~3.99 seconds of the animation, and so on til SSBlue is 8.01~9.99 seconds


This results in a Goku that still only has 60+ animations, still is only 1 model, but has all five forms.
Does anyone know any method of doing either of these?

Obviously my real intention has nothing to do with Goku, it was just the most plausible example I could think of.
 
Last edited:
Level 11
Joined
Jan 25, 2017
Messages
213
This... isnt how model animation editing works. Like not at all. Also i dont think this is the right forum but w/e.

First off- ive never gotten a model with more than 40 animations to behave normally in-game. If you know of a method to do this, please, let me know but otherwise id highly recommend splitting the models into separate files and morphing between them when needed for that many animations :O

2nd- i may be wrong but i highly doubt you can manipulate global animations in the trigger editor and your example has nothing to do with globals anyway. You wouldnt want a character's hair to move during death for example and you'd want it to move in certain ways when going in certain directions (ie more violent swinging about in attack than in stand). Just copy keyframes in mdlvis or bones movement via matrixeater is the best bet.

3rd - theres no reason an attachment model cant have global animations...

4th- if you really neeeded two exclusive globals i would just make a copy of the geoset that is being globalt animated and set visibility when needed (via animation tags) but use just one global sequence (unless you want the timing to be different between the two)

Finally if you were actually doing this crazy dbz model thing i would just look into texture switching via warclub ability as that would solve your problem with no extra (model/animation) filesize
 
Level 5
Joined
Mar 6, 2015
Messages
38
1. I don't know what to tell you on this point except that...The map I'm working on (Warrior Souls II) already has at least two models that use over 50 animations each with absolutely no problem from breaking above 40 animations. They behave the same under 40 as they do over 40. The next version features even more animations and even more models whom also reach 50+ animations, so I believe this is something either that you are personally doing wrong or a problem with the model you're using.

2. I'm not saying using globals for hair movement, but to SWAP OUT the hair that DOES move during other animations.

3. Giving a global animation to an attachment model means that the hair would sway independently of how the body is moving and would always sway in the same way. You would not have the ability to alter the hair to sway WITH the character's attacks.

4. Texture switching wouldn't help if the hairstyle is radically different and requires a different mesh. This is why I used Goku as an example.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
tl;dr this is sadly not possible.

In addition, you will also have to split to different models if you have that many animations per set, since the hardcoded limit wasn't particularly high (although for the life of me I can't remember if it was a byte or something smaller).

The only hypothetical solution I could think of, and which was actually researched, tested, and implemented by TriggerHappy, is to hack textures at real-time so that their blending will cause a geoset from showing or not, rather than global sequences. That is, imagine having an extra material layer above your hair diffuse layer which is always white or always black. Using the appropriate blending mode, this layer will effectively do nothing to the graphics. Now if you dynamically switch it to the opposite color, the blending will hide the diffuse.
This is of course not directly supported by WE or the game.
 
Last edited:
Level 5
Joined
Mar 6, 2015
Messages
38
tl;dr this is sadly not possible.

In addition, you will also have to split to different models if you have that many animations per set, since the hardcoded limit wasn't particularly high (although for the life of me I can't remember if it was a byte or something smaller).
The maximum number of animations any unit can have is 255 iirc. There's a 255animation villager model people appearently use. I personally use two models that each have 60animations in WS1.01 without any problems whatsoever, the next version bumps that number up to almost 70 without issue as well.

The only hypothetical solution I could think of, and which was actually researched, tested, and implemented by TriggerHappy, is to hack textures at real-time so that their blending will cause a geoset from showing or not, rather than global sequences. That is, imagine having an extra material layer above your hair diffuse layer which is always white or always black. Using the appropriate blending mode, this layer will effectively do nothing to the graphics. Now if you dynamically switch it to the opposite color, the blending will hide the diffuse.
This is of course not directly supported by WE or the game.
1. Not directly supported...Does this mean that for a random player on Bnet who is downloading the map for the first time, this would not function correctly at all? Thus from their view the model would have all 5 hairstyles always visible?
2. Assuming the average BNET user would have no problems playing the map without having to download anything other than the map itself...Are there any detriments to this method? I don't mind a difficult task for myself, so long as the players aren't presented difficulties.


I'm bringing this up because the current two models for the fighting game I made take up almost 1mb each before map compression(around 700mb post-compression). This is a size that will increase as the models gains dozens and dozens of new animations, and since this character now has four outfits...That essentially means four times the filesize of any given outfit...And this is just the first character. Adding a second/third/etc character would face the same problem.
 
Level 5
Joined
Mar 6, 2015
Messages
38
No, I just realized that it wouldn't work out simply because: If it's altering the texture via hacking...It would apply to every instance of that model in the map.
Meaning that even if I did merge all four outfits into a single model, player1&player2 couldn't have different outfits via this method if they're both picking the same character.
 
Status
Not open for further replies.
Top