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

Animation visibility with mdl

Status
Not open for further replies.
Level 4
Joined
Sep 16, 2017
Messages
56
Hey, so i'm looking to add a shooting anim in a little model i made. Problem is that i am using reteras studio and there isn't any animation visibility options as of yet.

The base of the animation is done i just can't figure out the ways of the mdl in order to make geos appear and dissapear during a sprite

Basically i want
- geoset 5(mace) to dissapear at the beggining
- then geoset 13(back crossbow) do the same as the unit stretches his arm to his back
- then have geoset 14(shooting crossbow) appear as his arm pulls back down.
- After he switfly shoots the bolt and returns the bow to his back i want geoset 13(back crossbow) and geoset 5(mace) to reappear

Also please make geoset 14 (shooting crossbow) invisible to all anims except the sequence mentioned above

If none of you wants to help then can anyone explain how animation visibility works in the mdl? I found an old post but it wasn't much help because it lacked context
 

Attachments

  • soldercross.mdx
    121 KB · Views: 93
Level 29
Joined
Jul 29, 2007
Messages
5,174
I've never used Retera's model studio, but I am pretty sure it supports alpha animations in geoset animations?

Regardless, geoset animations are your tool, and this model already contains a geoset animation for every geoset, and each one of them already has an alpha animation.
That is, when alpha is 0, the geoset is invisible, when alpha is 1, the geoset is visible.
Simply add 0s and 1s at the relevant frames.
 
Last edited:
Level 4
Joined
Sep 16, 2017
Messages
56
Thanks for responding!
I checked out the mdl, counted the geoset anims and all and what i gather is that each id (for example 139167 is also the beggining of the timer for the crossbow anim) is basically the visibility of the object during the corresponding animation.
I 0-ed geoset 14(shooting crossbow) and it does indeed not appear in all anims now. Problem is i want specific timer appearances and dissapearances between the objects. I don't really understand how to do that using the mdl but i guess it has something to do with keyframes? i'm a little lost

Edit: Hm... Geoset 13 (back crossbow) now also dissapears, geoset 14 is a duplicate of that are they somehow connected? Maybe i needed to import it instead of duplicating
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Animations are defined as an interval of frames.
For example the "Stand - 1" animation in this model starts at frame 300, and ends at frame 1800.
So if you were to want a geoset to not be visible in this animation, for example, you can have a single alpha keyframe at frame 300 with a value of 0.
The keyframes in the case of alpha look like
Code:
Frame: Value
So in this example it would be
Code:
300: 0

Let's poke at geoset 14 - there's geoset animation 14 which points to it, and has the following:
Code:
GeosetAnim {
   Alpha 3 {
       DontInterp,
       17267: 1,
       77267: 0,
       78867: 0,
   }
   GeosetId 13,
}
This tells us it has an alpha animation which has 3 keyframes, and no interpolation.
The first keyframe's frame is the starting frame of "Decay Flesh", and the value is 1, meaning that geoset 14 (first geoset is 0, so GeosetId 13 is the 14th geoset) will be visible for the entirety of "Decay Flesh".
The next keyframe's frame is the ending frame of "Decay Flesh", with a value of 0, which means geoset 14 will turn invisible at the end of the animation (technically I don't think this keyframe is needed?)
Similarly, the third keyframe's frame is the starting frame of "Decay Bone", so the geoset will be invisible for the entirety of the animation.

Add keyframes as you like, taking into consideration the frames they are at, and the values.
For example you can make a geoset turn visible/invisible also in the middle of an animation.
You can also use interpolation and have smooth transitions between different alpha values, and so on.

If you do this manually, you'll have to also update the number of keyframes at the start.
Also ensure that the keyframes are actually ordered. You can't have a keyframe at frame 1000, followed by a keyframe at frame 300, for example.
 
Status
Not open for further replies.
Top