• 🏆 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!

How to change HP Bar Height on Models?

Status
Not open for further replies.
Level 9
Joined
Feb 17, 2009
Messages
291
I've got two models one it is too low - at the origin point in fact - and another, the HP bar is way too high up. I'm sure this is an extremely novice question but nothing I've tried has fixed em. Please help, will rep~!
 
Usually it is an issue with the model's extents.

If you open the model in Magos' model editor (found in our tools section), and go to Edit -> Recalculate Extents.

If that still doesn't do the trick, I remember Anvil mentioning a neat hack around it. You can create a box as tall or as wide as you want your extents to be, but leave it untextured/invisible. You can recalculate the extents and the hp bar should move appropriately.
 
Level 9
Joined
Feb 17, 2009
Messages
291
Usually it is an issue with the model's extents.

If you open the model in Magos' model editor (found in our tools section), and go to Edit -> Recalculate Extents.

If that still doesn't do the trick, I remember Anvil mentioning a neat hack around it. You can create a box as tall or as wide as you want your extents to be, but leave it untextured/invisible. You can recalculate the extents and the hp bar should move appropriately.

Ok cool, that fixed it just nicely for one of them. The model I figured would be an issue happens to be one with an alternate set of anims for flight. The extents method did not work for this one. I thought it might be smart to just increase the Z of the model but that messes up all the bones and such I guess.

I haven't tried creating vertices before (and for some reason I feel very clumsy at it already), I assumed the health bar being too high was something to do with the fact I'm using Hover movement for this unit. Is that trick still the only solution for this?
 
Level 21
Joined
May 29, 2013
Messages
1,567
Ok cool, that fixed it just nicely for one of them.
Is the other one still too high or too low?
I assumed the health bar being too high was something to do with the fact I'm using Hover movement for this unit. Is that trick still the only solution for this?
I don't think movement types can change the height of the HP bar, independently of the unit's height.
 
Last edited:
Level 21
Joined
May 29, 2013
Messages
1,567
I'd guess it's about 200ish too high.
If the model has a built-in portrait, the geoset with the portrait background often causes the HP bar to be too high up, since "calculate extents" considers the top of the portrait background to be the highest point of the model, instead of considering the top of the unit's head as the highest point.
Is that trick still the only solution for this?
You could try this :fp:Go to to Windows-->Sequence Manager. Open an animation, and lower the Z value in Maximum Extents. Do the same thing for all animations. I'm not sure if this solves the problem, but I guess it's worth a shot.
 
Level 9
Joined
Feb 17, 2009
Messages
291
If the model has a built-in portrait, the geoset with the portrait background often causes the HP bar to be too high up, since "calculate extents" considers the top of the portrait background to be the highest point of the model, instead of considering the top of the unit's head as the highest point.

You could try this :fp:Go to to Windows-->Sequence Manager. Open an animation, and lower the Z value in Maximum Extents. Do the same thing for all animations. I'm not sure if this solves the problem, but I guess it's worth a shot.

Well, this model had a camera (even though it uses an external portrait model, so idk) and I removed it. No dice. It's not using a geoset for it either. I also tried the sequence manager trick and that did nothing too :( I'm really confused because both those ideas seemed like they'd fix it for sure.
 
Level 21
Joined
May 29, 2013
Messages
1,567
Hmm.. Try to scale the model's mesh (in Model Editor) down to 70% (or something) of it's original size. Use pivot point (0,0,0) when you scale it. After that, calculate extents. Then scale it up to it's original size and save.
EDIT: I've tested this on a random model, and it works.
ScrnShot.png

Just make sure you scale it properly:
Scale downScale up
0.91.111
0.81.25
0.71.42857
0.61.666
 
Last edited:
Level 9
Joined
Feb 17, 2009
Messages
291
Hmm.. Try to scale the model's mesh (in Model Editor) down to 70% (or something) of it's original size. Use pivot point (0,0,0) when you scale it. After that, calculate extents. Then scale it up to it's original size and save.
EDIT: I've tested this on a random model, and it works.

Just make sure you scale it properly:
Scale downScale up
0.91.111
0.81.25
0.71.42857
0.61.666

Aha! That was a clever idea you had there, that did it! Thanks for the scaling list, too. I'll definitely have to make a note for how to fix this from here on. <3

EDIT: Btw due to the site restrictions I'll give you rep when I'm allowed to again XD
 
Level 21
Joined
May 29, 2013
Messages
1,567
Aha! That was a clever idea you had there, that did it! Thanks for the scaling list, too.
I'm glad I could help.:)

By the way, if the list confused anyone reading this, it's just basic math:
If you want to lower the height of the HP bar to e.g. 90% of it's current height -> 100/90=1.111
You can do the same thing to increase the height to e.g. 125% of it's current height -> 100/125=0.8 When increasing the height, you obviously first need to enlarge the model, then calculate extents and scale it down to it's previous size.
 
Status
Not open for further replies.
Top