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

Change Model Texture Using Alternate Animations

Level 22
Joined
Feb 6, 2014
Messages
2,466
Change Model Texture Using Alternate Animations


It is indeed possible to change a model's texture in game whether in object editor or via Triggers without using WAR CLUB ability.

CONTENTS:
1. Pros and Cons
2. Modeling
2.1 Outcome
3. Triggering.
4. Make a unit use different texture without Triggering
5. Sample Map
6. Multiple Destructable Texture one Model (Different Tutorial)

What will I do?
I will make a unit (Jaina Proudmoore) change texture in game whenever she obtained an item. In Normal form, she will use the Holy Mage Texture and when she acquired a certain item, she will change into a Forsaken Jaina. Even users with no experience using Magos War3Model Editor and Retera's Matrix Eater can follow and learn from this tutorial.

Optional Tool


1. Pros and Cons
PROS:
1. Allows Changing of Texture via Trigger and at the same time change animation and particles if necessary.
Example
- Your unit will alternate between fire and ice elemental, the particles on the unit can also be changed)
- Your unit will alternate between normal form and demon form, the demon form can have alternate stand, attack, etc. animation different from normal form.
2. Portrait Model also change.
3. A single model file for 2 different units. Help save file size without importing the same model with only a different texture.
4. Allows up to 3 alternate texture (using "upgrade", "fast", "alternate") if I'm not mistaken.
5. Easy to trigger and does not conflict with War Club Ability.


CONS:
1. Cannot be applied on models in the MPQ. You need to import a new model with modified animations.
2. Increased the model's size depending on the Model's copied animation.


2. Modeling

1. First find the model you will modifiy using Magos War3 Model Editor MPQ Browser
(Go to Windows>MPQ Browser)

2. Save it as an MDL file

145135d1430905978-changing-model-texture-via-trigger-2.jpg



3. Make a copy

145136d1430901782-changing-model-texture-via-trigger-3.jpg



4. Open Retera's Matrix Eater Animation Transfer
(Go to File>Simple Import)

145137d1430901782-changing-model-texture-via-trigger-4.jpg



5. In the Animation Transfer, copy the animation using the MDL file you saved and its copy

145138d1430901782-changing-model-texture-via-trigger-5.jpg



6. Copy all remaining animations, but to do it easier, set the the BASE FILE the same as the OUTPUT FILE.

145139d1430901782-changing-model-texture-via-trigger-6.jpg



7. After all of that is done, you should have something like this
(Go to Windows>Animation Controller)

145140d1430901839-changing-model-texture-via-trigger-7.jpg



8. Now Rename all the animation copies you made by adding the keyword "Alternate" to the animation name and take note of the "Interval From: "
It is best to write them in NotePad like in the screenshot
(Go to Windows>Sequence Manager)

145141d1430901782-changing-model-texture-via-trigger-8.jpg



9. Now Import the New Alternate Texture and take note of how many texture's are there. The ForsakeJaina.blp is the 4th Texture.
(Go to Windows>Texture Manager)

145142d1430901782-changing-model-texture-via-trigger-9.jpg



10. Go to Materials Manager and select each Materials there.
(Go to Windows>Material Manager)

145143d1430901782-changing-model-texture-via-trigger-10.jpg



11. Check the Texture ID Animated, click the Texture ID button and input there the animation key frame of all alternate animations.
In the right, put the texture's sequence number (which is 4)
It is important that the numbers are arranged from lowest to highest.

145144d1430901782-changing-model-texture-via-trigger-11.jpg



12. (OPTIONAL) You can change the default skin to something custom using MDX Pather

145145d1430901782-changing-model-texture-via-trigger-12.jpg



13. Create a Camera for the Portrait. Right-click and select 'View Camera' to show the camera's current view.
(Windows>Camera Manager)

145150d1430901782-changing-model-texture-via-trigger-13.jpg



14. Or you can also edit the Portrait Model. Note that sometimes you have to put all the animation frames in the Texture ID Animation as shown in the Screenshot.

145151d1430901782-changing-model-texture-via-trigger-14.jpg




2.1 Outcome
145147d1430901782-changing-model-texture-via-trigger-21.jpg

145148d1430901782-changing-model-texture-via-trigger-22.jpg



3. Triggering

To change the unit's texture model via trigger, we use this function:

  • Animation - Add the upgrade alternate tag to UNIT
To change back just use
  • Animation - Remove the upgrade alternate tag to UNIT

4. Make a unit use different texture without Triggering

To make a unit use the alternate texture from the start, just edit the:
Art - Required Animation Names to "alternate".
in the Units Tab of Object Manager.


5. Sample Map

Changing Texture.w3x

The sample map has the model and the textures.

CREDITS for the Textures:
Apheraz Lucent
Leopard


6. Multiple Destructable Texture one Model (Different Tutorial)

To use one model file for destructables with more than one texture, check out InfernalTater's How To Change Textures on a Tree or other Doodad (Without importing several models).
 

Attachments

  • 2.JPG
    2.JPG
    39.4 KB · Views: 1,537
  • 3.JPG
    3.JPG
    11.1 KB · Views: 1,484
  • 4.jpg
    4.jpg
    26.4 KB · Views: 1,468
  • 5.JPG
    5.JPG
    29.3 KB · Views: 1,485
  • 6.JPG
    6.JPG
    32.9 KB · Views: 1,491
  • 7.jpg
    7.jpg
    56.4 KB · Views: 1,491
  • 8.JPG
    8.JPG
    75.4 KB · Views: 1,472
  • 9.JPG
    9.JPG
    75.2 KB · Views: 1,475
  • 10.JPG
    10.JPG
    63.7 KB · Views: 1,502
  • 11.JPG
    11.JPG
    60.3 KB · Views: 1,440
  • 12.JPG
    12.JPG
    22.4 KB · Views: 1,432
  • 21.JPG
    21.JPG
    38.4 KB · Views: 1,499
  • 22.JPG
    22.JPG
    39 KB · Views: 1,479
  • 13.JPG
    13.JPG
    56.5 KB · Views: 1,442
  • 14.JPG
    14.JPG
    48.3 KB · Views: 1,439
  • Changing Texture.w3x
    337.6 KB · Views: 619
Last edited:
Level 22
Joined
Feb 6, 2014
Messages
2,466
I have searched for related tutorials and a lot of people wants to change the model's texture via triggers. if i know how to easily copy animations instead of frame by frame, we can have any model in the mpq have alternating texture by copying its animation to an upgrade tag animation. The only downside is to import the model in the map.

In fact, people believed it was impossible according to this post Here
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
That's pretty stupid to say that it's impossible. Just look at Grom Hellscream, he got the red skin and the green one.

However, it's indeed impossible with purely triggers.

Wait, isn't Grom Hellscream have 2 model files? One for the green and one for the red. The post I linked says that it is impossible to have interchanging texture using one model. As Dr SuperGood suggested, he will have to import a separate model file which is not very efficient since it is the same model only with different Texture but it is a working solution to Miles111's problem.
 
Level 30
Joined
Jan 31, 2010
Messages
3,551
@Chaosy, Grom has two models. That's just a morph animation of the green one, you're wrong in there. That example and this system aren't a same thing. Your example is like a Hyppogryph Archer, where a unit HAS to be completely replaced in map. This is something more similar to Druid of the Talon Morph, where the unit changes and holds on to all buffs, items, etc.
All in one, a fantastical and very useful tutorial.
 
Excellent tutorial. Great organization--I love that you added an introduction and the pros/cons list. The method certainly works, and it is great that you added the information on copying the animations & creating the camera.

Approved. I may make some spelling/grammar changes later on, but I'll notify you of them when that time comes. At the moment, it is perfectly readable and well organized, so I'll go ahead and move it. :)

EDIT: I moved it to 3D modeling tutorials since the majority of the tutorial deals with model editing. As for the title, I was thinking: "Change model texture using alternate animations", what do you think?
 
I hope so. It goes great with your tutorial and linking this in your tutorial was a brilliant idea.

Yeah, I thought anyone who was helped by my tutorial would definitely be interested in yours. Thank Purge for his post on my tutorial linking your tutorial and someone else's tutorial while answering someone's post with a question about my tutorial :)vw_death:). You can link mine at the bottom of yours, too, if you want.
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
Yeah, I thought anyone who was helped by my tutorial would definitely be interested in yours. Thank Purge for his post on my tutorial linking your tutorial and someone else's tutorial while answering someone's post with a question about my tutorial :)vw_death:). You can link mine at the bottom of yours, too, if you want.

Yeah I'll link yours too when I'm on my PC.
 
Level 42
Joined
Oct 20, 2010
Messages
2,935
CONS:
1. Cannot be applied on models in the MPQ. You need to import a new model with modified animations.
2. Slightly increased the model's size due to the added animation.

This is sure a useful tutorial some people
but one thing, I personally think the model size will increase alot rather than Slightly, that's just my opinion

But still, Good job :)
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
This is sure a useful tutorial some people
but one thing, I personally think the model size will increase alot rather than Slightly, that's just my opinion

But still, Good job :)
Yeah, animations make up basicly 80% of the model size, so you don't save much with animation duplicates.
But it's great for models with a low number of animations, like vehicles or special effects.
 
Level 42
Joined
Oct 20, 2010
Messages
2,935
Yeah I'll link yours too when I'm on my PC.

Yeah, animations make up basicly 80% of the model size, so you don't save much with animation duplicates.
But it's great for models with a low number of animations, like vehicles or special effects.

yes... Im not sure, but I think animation indeed is the major reasons for the Filesize,

And Yeah... Anim like Vehicle that Don't have too much movement, or Trees, Item, doodad building, wall, ward, and Rocks or Projectile and Such would work perfectly
 
Level 42
Joined
Oct 20, 2010
Messages
2,935
Also, Anyway, A little Trick here, If you want the Model is like a Improved version or Tweaked Version which are meant to replace the existing model, (Like Ujimasa's Model or small edit, or Fixes) and they have separated portrait file, You can Import the Model as the same Filepath as the model you want to replace, and it will use it's portrait file, so that you don't need to import portrait that take up filesize

(Bump this down so that you won't missed this)

Example, A Improved Grunt model, You can Import it as Units\Orc\Grunt\grunt.mdx and It will use Units\Orc\Grunt\grunt_portrait.mdx as portrait
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
Also, Anyway, A little Trick here, If you want the Model is like a Improved version or Tweaked Version which are meant to replace the existing model, (Like Ujimasa's Model or small edit, or Fixes) and they have separated portrait file, You can Import the Model as the same Filepath as the model you want to replace, and it will use it's portrait file, so that you don't need to import portrait that take up filesize

(Bump this down so that you won't missed this)

Example, A Improved Grunt model, You can Import it as Units\Orc\Grunt\grunt.mdx and It will use Units\Orc\Grunt\grunt_portrait.mdx as portrait

But if you only import the model and not the portrait, the model won't fit with the portrait. Example, I import Jaina model to Units\Orc\Grunt\grunt.mdx, her portrait will be Grunt which clearly don't fit with the Jaina model.
 
Level 42
Joined
Oct 20, 2010
Messages
2,935
But if you only import the model and not the portrait, the model won't fit with the portrait. Example, I import Jaina model to Units\Orc\Grunt\grunt.mdx, her portrait will be Grunt which clearly don't fit with the Jaina model.

I mean, If you Make a Small tweak that is Meant to replace the Existing Grunt, For example, A grunt with Better animation or A Better Axe or whatever,

Or maybe, If you have a Mounted Jaina, And you won't be using any Jaina on Foot Model, You can just Import the Mounted Jaina As the Jaina's Path, and it will use that Portrait, (Tho it's pointless if the Model itself already have Portrait Include, Like Catapult or Bristleback)
 

Shar Dundred

Community Moderator
Level 72
Joined
May 6, 2009
Messages
5,862
I hate being the one reviving in this thread, but I got a question:

Is it possible to combine two models the same way, even when they're using different animations? Like the Demon Hunter and its alternate, I mean.

Example:
I'd love to combine the standard Human Barracks model with Ujimasa's several Human Barracks. Problem: Ujimasa isn't using skins, but ingame textures. Also, the models differ slightly in some points.

Is it still possible?
 

Ardenian

A

Ardenian

Yes, but I think it is different than this method. You would add Geoset Animations to hide the whole models not used.

It is the same like the Scout Tower, that is an in-built model. Every upgrade is, like the town halls and so on.
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
This is an excellent tutorial! It is very easy to follow as it explains everything to great detail.
Unfortunately, the model I tried it with, does not work ingame despite showing the correct textures in magos at the end.

Anyway I think this tutorial is very useful! Thank you for sharing!
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
Which model you tried and what went wrong? Let us help :)

How kind of yours! :) Would be great, if you took a look! :D

So, I used the elfenwood pine by Nasrudin and tried to give it a snowy alternate texture.

It worked perfectly up to the magos part, so I can see the pine having a snowy alternate form. Unfortunately, when I change animations ingame, the pine just looses its leaves :( ... I mean, its pretty obvious that I made a mistake somewhere, but I cant find it :/

This is the thread, where I posted this issue originally (last post), and this is the modified pine model with the new snowy texture (and orig texture).

Hope, you can see, what went wrong? :thumbs_up:
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
How kind of yours! :) Would be great, if you took a look! :D

So, I used the elfenwood pine by Nasrudin and tried to give it a snowy alternate texture.

It worked perfectly up to the magos part, so I can see the pine having a snowy alternate form. Unfortunately, when I change animations ingame, the pine just looses its leaves :( ... I mean, its pretty obvious that I made a mistake somewhere, but I cant find it :/

This is the thread, where I posted this issue originally (last post), and this is the modified pine model with the new snowy texture (and orig texture).

Hope, you can see, what went wrong? :thumbs_up:

So you're using it as a unit? And it doesn't work on Magos for me.
If you're gonna use destructable, refer to this tutorial
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
I want to use it as a doodad, and change the animation via the SetDoodadAnimationRect native.
What do you input in the SetDoodadAnimationRect?

Its strange that you cant see it, because in my magos editor, I can see the snowy texture (SnowyPines) on the tree..
Maybe you uploaded the wrong file? Materials doesn't have animated textures ticked and the textures path appears to be the default path.
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
Hi Flux,

thanks for trying to help me with your tutorial about alternate textures.

Unfortunately none of your suggestions helped, but I appreciate you wanted to help anyway :)

I managed to make a few trees use alternate snowy textures now, but despite I do the same to every model, it does only work in around 3 out of 6 cases in game. In 10 out of 10 cases, magos shows the textures though ..

I guess, there must be some little detail, that Wc3 does not like here ..

Anyway, the good thing is, it works sometimes :)
 
Top