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

Model with 100 animations issues.

Status
Not open for further replies.
Level 12
Joined
Jan 30, 2020
Messages
875
Hello there !

Long time ago I made a model to display text on the map floor, using destructables ingame.

The model is a set of 100 planes, each with TVertices pointing to a letter among a 10x10 grid texture.

You can see the texture here : PNG to BLP conversion makes texture 5x bigger !!!

The old version of this model had 81 geosets, animations and a 9x9 grid texture also shown on on the link above.

Now, the old model worked great, but had 81 different animation names, requiring to store them all in an array :
Lua:
    -- Text Panels Letters Animations
    Anim=__jarray("")
    Anim[1]="stand alternate"
    Anim[2]="stand alternateex"
    Anim[3]="stand chain"
    Anim[4]="stand channel"
    Anim[5]="stand complete"
    Anim[6]="stand critical"
    Anim[7]="stand defend"
    Anim[8]="stand drain"
    Anim[9]="stand eattree"
    Anim[10]="stand fast"
    Anim[11]="stand fill"
    Anim[12]="stand fire"
    Anim[13]="stand five"
    Anim[14]="stand flail"
    Anim[15]="stand flesh"
    Anim[16]="stand four"
    Anim[17]="stand gold"
    Anim[18]="stand hit"
    Anim[19]="stand large"
    Anim[20]="stand left"
    Anim[21]="stand light"
    Anim[22]="stand looping"
    Anim[23]="stand lumber"
    Anim[24]="stand medium"
    Anim[25]="stand moderate"
    Anim[26]="stand off"
    Anim[27]="stand one"
    Anim[28]="stand puke"
    Anim[29]="stand ready"
    Anim[30]="stand right"
    Anim[31]="stand severe"
    Anim[32]="stand slam"
    Anim[33]="stand small"
    Anim[34]="stand spiked"
    Anim[35]="stand spin"
    Anim[36]="stand swim"
    Anim[37]="stand talk"
    Anim[38]="stand three"
    Anim[39]="stand throw"
    Anim[40]="stand turn"
    Anim[41]="stand two"
    Anim[42]="walk alternate"
    Anim[43]="walk alternateex"
    Anim[44]="walk chain"
    Anim[45]="walk channel"
    Anim[46]="walk complete"
    Anim[47]="walk critical"
    Anim[48]="walk defend"
    Anim[49]="walk drain"
    Anim[50]="walk eattree"
    Anim[51]="walk fast"
    Anim[52]="walk fill"
    Anim[53]="walk fire"
    Anim[54]="walk five"
    Anim[55]="walk flail"
    Anim[56]="walk flesh"
    Anim[57]="walk four"
    Anim[58]="walk gold"
    Anim[59]="walk hit"
    Anim[60]="walk large"
    Anim[61]="walk left"
    Anim[62]="walk light"
    Anim[63]="walk looping"
    Anim[64]="walk lumber"
    Anim[65]="walk medium"
    Anim[66]="walk moderate"
    Anim[67]="walk off"
    Anim[68]="walk one"
    Anim[69]="walk puke"
    Anim[70]="walk ready"
    Anim[71]="walk right"
    Anim[72]="walk severe"
    Anim[73]="walk slam"
    Anim[74]="walk small"
    Anim[75]="walk spiked"
    Anim[76]="walk spin"
    Anim[77]="walk swim"
    Anim[78]="walk talk"
    Anim[79]="walk three"
    Anim[80]="walk throw"
    Anim[81]="walk turn"

I found this quite unpractical, so for my new model, I decided to give them all a
"Stand - XXX" animation name, XXX being a number between 1 and 100 corresponding to the position of the letter in this string (careful it has a few escaped characters) :

CharMap="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&€$≠≤≥<>+*-/\\=.,:;({[|]})!?%@\'‘’\"«»^# "

I use destructables placed in a line, and the idea is scrolling a given text for the players.

Now, when I look at the model in the Object Editor, I can clearly see all animations and their names.
Of course the model also works perfectly in @Retera Model Studio Reforged hack.

But when I try to set the destructable animation, for example "Stand - 100", the model seems to panic and shows many letters erratically.

When I used the Anim names on the table above with the old version of my model, it all worked fine.


So here is my question :

Why setting the animation with the animation name does not work correctly when the object editor finds them with no issue ?

As for reference, and in case i made a mistake in my MDL Editing, here is an extract of the MDL file I made :

Code:
Version {
   FormatVersion 800,
}
Model "MacadamiaFont" {
   NumGeosets 100,
   NumGeosetAnims 100,
   NumBones 100,
   BlendTime 150,
   MinimumExtent { -64, -64, 0 },
   MaximumExtent { 64, 64, 0 },
   BoundsRadius 0,
}
Sequences 100 {
   Anim "Stand - 1" {
       Interval { 1000, 1133 },
       MinimumExtent { -64, -64, 0 },
       MaximumExtent { 64, 64, 0 },
       BoundsRadius 96,
   }
   Anim "Stand - 2" {
       Interval { 2000, 2133 },
       MinimumExtent { -64, -64, 0 },
       MaximumExtent { 64, 64, 0 },
       BoundsRadius 96,
   }
.............................................................. etc...
   Anim "Stand - 100" {
       Interval { 3000, 3133 },
       MinimumExtent { -64, -64, 0 },
       MaximumExtent { 64, 64, 0 },
       BoundsRadius 96,
   }
}
Textures 1 {
   Bitmap {
       Image "Fonts\MacadamiaFont.png",
   }
}
Materials 1 {
   Material {
       Layer {
           FilterMode Transparent,
           Unshaded,
           Unfogged,
           static TextureID 0,
       }
   }
}
Geoset {
   Vertices 4 {
       { -64, -64, 5 },
       { 64, -64, 5 },
       { -64, 64, 5 },
       { 64, 64, 5 },
   }
   Normals 4 {
       { 1, 0, 0 },
       { 1, 0, 0 },
       { 1, 0, 0 },
       { 1, 0, 0 },
   }
   TVertices 4 {
       { 0, 0 },
       { 0, 0.1 },
       { 0.1, 0 },
       { 0.1, 0.1 },
   }
   VertexGroup {
       0,
       0,
       0,
       0,
   }
   Faces 1 6 {
       Triangles {
           { 0, 1, 2, 3, 2, 1 },
       }
   }
   Groups 1 1 {
       Matrices { 0 },
   }
   MinimumExtent { -64, -64, 0 },
   MaximumExtent { 64, 64, 0 },
   BoundsRadius 96,
   MaterialID 0,
   SelectionGroup 0,
}
Geoset {
   Vertices 4 {
       { -64, -64, 5 },
       { 64, -64, 5 },
       { -64, 64, 5 },
       { 64, 64, 5 },
   }
   Normals 4 {
       { 1, 0, 0 },
       { 1, 0, 0 },
       { 1, 0, 0 },
       { 1, 0, 0 },
   }
   TVertices 4 {
       { 0.1, 0 },
       { 0.1, 0.1 },
       { 0.2, 0 },
       { 0.2, 0.1 },
   }
   VertexGroup {
       0,
       0,
       0,
       0,
   }
   Faces 1 6 {
       Triangles {
           { 0, 1, 2, 3, 2, 1 },
       }
   }
   Groups 1 1 {
       Matrices { 1 },
   }
   MinimumExtent { -64, -64, 0 },
   MaximumExtent { 64, 64, 0 },
   BoundsRadius 96,
   MaterialID 0,
   SelectionGroup 0,
}
............................................. etc..
Geoset {
   Vertices 4 {
       { -64, -64, 5 },
       { 64, -64, 5 },
       { -64, 64, 5 },
       { 64, 64, 5 },
   }
   Normals 4 {
       { 1, 0, 0 },
       { 1, 0, 0 },
       { 1, 0, 0 },
       { 1, 0, 0 },
   }
   TVertices 4 {
       { 0.9, 0.9 },
       { 0.9, 1 },
       { 1, 0.9 },
       { 1, 1 },
   }
   VertexGroup {
       0,
       0,
       0,
       0,
   }
   Faces 1 6 {
       Triangles {
           { 0, 1, 2, 3, 2, 1 },
       }
   }
   Groups 1 1 {
       Matrices { 99 },
   }
   MinimumExtent { -64, -64, 0 },
   MaximumExtent { 64, 64, 0 },
   BoundsRadius 96,
   MaterialID 0,
   SelectionGroup 0,
}
GeosetAnim {
   Alpha 100 {
       DontInterp,
       1000: 1,
       2000: 0,
       3000: 0,
       4000: 0,
       5000: 0,
       6000: 0,
       7000: 0,
       8000: 0,
       9000: 0,
       10000: 0,
       11000: 0,
       12000: 0,
       13000: 0,
       14000: 0,
       15000: 0,
       16000: 0,
       17000: 0,
       18000: 0,
       19000: 0,
       20000: 0,
       21000: 0,
       22000: 0,
       23000: 0,
       24000: 0,
       25000: 0,
       26000: 0,
       27000: 0,
       28000: 0,
       29000: 0,
       30000: 0,
       31000: 0,
       32000: 0,
       33000: 0,
       34000: 0,
       35000: 0,
       36000: 0,
       37000: 0,
       38000: 0,
       39000: 0,
       40000: 0,
       41000: 0,
       42000: 0,
       43000: 0,
       44000: 0,
       45000: 0,
       46000: 0,
       47000: 0,
       48000: 0,
       49000: 0,
       50000: 0,
       51000: 0,
       52000: 0,
       53000: 0,
       54000: 0,
       55000: 0,
       56000: 0,
       57000: 0,
       58000: 0,
       59000: 0,
       60000: 0,
       61000: 0,
       62000: 0,
       63000: 0,
       64000: 0,
       65000: 0,
       66000: 0,
       67000: 0,
       68000: 0,
       69000: 0,
       70000: 0,
       71000: 0,
       72000: 0,
       73000: 0,
       74000: 0,
       75000: 0,
       76000: 0,
       77000: 0,
       78000: 0,
       79000: 0,
       80000: 0,
       81000: 0,
       82000: 0,
       83000: 0,
       84000: 0,
       85000: 0,
       86000: 0,
       87000: 0,
       88000: 0,
       89000: 0,
       90000: 0,
       91000: 0,
       92000: 0,
       93000: 0,
       94000: 0,
       95000: 0,
       96000: 0,
       97000: 0,
       98000: 0,
       99000: 0,
       100000: 0,
   }
   GeosetId 0,
}
GeosetAnim {
   Alpha 100 {
       DontInterp,
       1000: 0,
       2000: 1,
       3000: 0,
       4000: 0,
       5000: 0,
       6000: 0,
       7000: 0,
       8000: 0,
       9000: 0,
       10000: 0,
       11000: 0,
       12000: 0,
       13000: 0,
       14000: 0,
       15000: 0,
       16000: 0,
       17000: 0,
       18000: 0,
       19000: 0,
       20000: 0,
       21000: 0,
       22000: 0,
       23000: 0,
       24000: 0,
       25000: 0,
       26000: 0,
       27000: 0,
       28000: 0,
       29000: 0,
       30000: 0,
       31000: 0,
       32000: 0,
       33000: 0,
       34000: 0,
       35000: 0,
       36000: 0,
       37000: 0,
       38000: 0,
       39000: 0,
       40000: 0,
       41000: 0,
       42000: 0,
       43000: 0,
       44000: 0,
       45000: 0,
       46000: 0,
       47000: 0,
       48000: 0,
       49000: 0,
       50000: 0,
       51000: 0,
       52000: 0,
       53000: 0,
       54000: 0,
       55000: 0,
       56000: 0,
       57000: 0,
       58000: 0,
       59000: 0,
       60000: 0,
       61000: 0,
       62000: 0,
       63000: 0,
       64000: 0,
       65000: 0,
       66000: 0,
       67000: 0,
       68000: 0,
       69000: 0,
       70000: 0,
       71000: 0,
       72000: 0,
       73000: 0,
       74000: 0,
       75000: 0,
       76000: 0,
       77000: 0,
       78000: 0,
       79000: 0,
       80000: 0,
       81000: 0,
       82000: 0,
       83000: 0,
       84000: 0,
       85000: 0,
       86000: 0,
       87000: 0,
       88000: 0,
       89000: 0,
       90000: 0,
       91000: 0,
       92000: 0,
       93000: 0,
       94000: 0,
       95000: 0,
       96000: 0,
       97000: 0,
       98000: 0,
       99000: 0,
       100000: 0,
   }
   GeosetId 1,
}
.................................................................. etc...
GeosetAnim {
   Alpha 100 {
       DontInterp,
       1000: 0,
       2000: 0,
       3000: 0,
       4000: 0,
       5000: 0,
       6000: 0,
       7000: 0,
       8000: 0,
       9000: 0,
       10000: 0,
       11000: 0,
       12000: 0,
       13000: 0,
       14000: 0,
       15000: 0,
       16000: 0,
       17000: 0,
       18000: 0,
       19000: 0,
       20000: 0,
       21000: 0,
       22000: 0,
       23000: 0,
       24000: 0,
       25000: 0,
       26000: 0,
       27000: 0,
       28000: 0,
       29000: 0,
       30000: 0,
       31000: 0,
       32000: 0,
       33000: 0,
       34000: 0,
       35000: 0,
       36000: 0,
       37000: 0,
       38000: 0,
       39000: 0,
       40000: 0,
       41000: 0,
       42000: 0,
       43000: 0,
       44000: 0,
       45000: 0,
       46000: 0,
       47000: 0,
       48000: 0,
       49000: 0,
       50000: 0,
       51000: 0,
       52000: 0,
       53000: 0,
       54000: 0,
       55000: 0,
       56000: 0,
       57000: 0,
       58000: 0,
       59000: 0,
       60000: 0,
       61000: 0,
       62000: 0,
       63000: 0,
       64000: 0,
       65000: 0,
       66000: 0,
       67000: 0,
       68000: 0,
       69000: 0,
       70000: 0,
       71000: 0,
       72000: 0,
       73000: 0,
       74000: 0,
       75000: 0,
       76000: 0,
       77000: 0,
       78000: 0,
       79000: 0,
       80000: 0,
       81000: 0,
       82000: 0,
       83000: 0,
       84000: 0,
       85000: 0,
       86000: 0,
       87000: 0,
       88000: 0,
       89000: 0,
       90000: 0,
       91000: 0,
       92000: 0,
       93000: 0,
       94000: 0,
       95000: 0,
       96000: 0,
       97000: 0,
       98000: 0,
       99000: 0,
       100000: 1,
   }
   GeosetId 99,
}
Bone "Plane 0" {
   ObjectId 0,
   GeosetId 0,
   GeosetAnimId 0,
}
Bone "Plane 1" {
   ObjectId 1,
   GeosetId 1,
   GeosetAnimId 1,
}
........................................................................ etc..
Bone "Plane 99" {
   ObjectId 99,
   GeosetId 99,
   GeosetAnimId 99,
}
PivotPoints 100 {
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
   { 0, 0, 0 },
}
................................................... end

Is there a way to make this work with these animation names ?

It is really strange, as if the game was trying to show all animations at once.
 
Last edited:
Level 16
Joined
Nov 7, 2011
Messages
219
From what I know, naming the sequences as "SequenceName - #" will just make the game recognize all of them as variations of the same animation. Which is why once one of the animations finishes, it just cycles through the others at random.
(Refer to the footman model where one variation of its stand animations is him drinking water which also plays occasionally in-game)

The "erratic behavior" is due to how short your sequences are. They only last around 1/10th of a second. This wouldn't be much of a problem if the animation looped itself over and over, but since you have other "variations" of the stand animation, you end up looking through all the animations really fast as hecc.
 
Last edited:
Level 12
Joined
Jan 30, 2020
Messages
875
Thanks for the reply !!

I forgot to mention that ended up getting the model to work :

I took the 81 animations I posted in the previous post of my old model, and added similar animation names with the "Spell" prefix instead.
Took a while but ended up working fine, as for the model itself.

Alas, my Phtotoshop knowledge is not good enough, and I had a hard time to perfectly alighting the letters (like in the old model, but its was less visible then).

I suppose I still have a lot to learn (guess thats the case for everyone working alone on a project ^^)
 
Status
Not open for further replies.
Top