wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Tutorials > MDL Editing
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 03-19-2005, 09:01 AM   #1
linuxdog
User
 
Join Date: Dec 2003
Posts: 9

Submissions (1)

linuxdog has little to show at this moment (0)

Default Remove Hero Glows: Concise method

Disclaimer
I am a newb playing around with things, so I really don't know as much as say Ari does about animations and geosets in MDL's (you can find his awesome tutorial here http://www.wc3campaigns.com/showthre...move+hero+glow) but I hope to one day learn some more. To tell you the truth I am quite satisfied that I found out how to effectively and completley remove hero glows, even when the hero attacks, casts, etc. Even Ari's somewhat comprehensive tutorial does not accomplish this.



Tools you will need:
  1. Notepad
  2. YobGul's badly programmed MDX->MDL converter
  3. WorldEdit
  4. MPQ extractor
If you don't have either Worldedit or notepad I don't know what you are even reading this for, you either shouldn't care about WC3 if you don't have WE, or you are a totally clueless sheep in this world if you don't have notepad. The Yobgul's converter you can find here: showthread.php?t=78916 The last item on the list is the MPQ extractor which will help you get your hands on the MDX model files you need to edit. This tutorial assumes that you know how to use an mpq extractor to extract the desired MDX file of the hero you want to edit from either war3.mpq or war3x.mpq -- the former being the ROC mpq archive and the latter being the TFT mpq archive.

This tutorial starts off assuming that you are at the step where you have a MDX hero file on your harddisk that is not compressed somewhere in a god-forsaken MPQ.

1. Fire up Yobgul's file converter. You should receive NO errors at this point. Hit the "Load MDX file" and browse to your hero.MDX. Hit the "Convert to MDL" and you should receive an alert saying conversion was succesful. Open up the MDL with notepad. The MDL is a seperate file located in the same folder as the MDX with the same name except the MDL extension instead of the MDX extension. Close YobGul's. You should receive an error at this point. It is a result of bad programming and does not affect anything in WC3. Ignore it.

2. You should have an open MDL in notepad on your desktop, assuming you are using Windows of course, Mac's use something else and Linux, well you could be doing all this in terminal in linux and if your using linux then you don't need me anyways, your smart enough to figure out this on your own. Back to the tutorial, we will leave Windows bashing till late ;) Hit Ctrl+F, this will bring up a search prompt. Into the search prompt, type in "Alpha 1" without the quatation marks. This should bring you up to something that looks similar too:

...
Textures 4 {
Bitmap {
Image "units\Human\Jaina\Jaina.blp",
}
Bitmap {
Image "",
ReplaceableId 1,
}
Bitmap {
Image "ReplaceableTextures\Weather\Clouds8x8.blp",
}
Bitmap {
Image "",
ReplaceableId 2,
}
}
Materials 3 {
Material {
Layer {
FilterMode Transparent,
static TextureID 0,
}
}
Material {
Layer {
FilterMode None,
Unshaded,
TwoSided,
static TextureID 1,
}
Layer {
FilterMode Blend,
TwoSided,
static TextureID 0,
}
}
Material {
Layer {
FilterMode Additive,
Unshaded,
static TextureID 3,
Alpha 1 {
Linear,
3333: 0.75,
}
}
}
}
Geoset {
Vertices 468 {
{ 2.64418, -16.7716, 38.0223 },
{ 2.77655, -13.3378, 37.228 },
{ -2.84511, -7.62934, 34.9388 },
{ 2.54801, 4.35593, 96.3666 },

...
If you are an ernest reader of the WC3 campaigns forums then you have probably come across Ari's Hero Glow tutorial (link can be found in disclaimer.) If not, then I will just say that Ari, at this point in the tutorial, says to remove the Hero Glow you simply have to erase the whole section:
Alpha 1 {
Linear,
3333: 0.75,
}
and replace it with:
Alpha 0
THIS IS WRONG: you will come across many problems, one is that you will not be able to convert your file back to MDX, another is that if you get it working, it will do nothing.

The right way is a bit more complex.

First let us consider the headings importance. By heading I am refering to the line that says:
Materials 3
Materials is just a generic identifier of the objects using the textures found earlier in the Model file. The significant part is the number 3 in:
Materials 3
The number signals that there are ONLY 3 Materials in the model file. Each Material is given an identification automatically so that it can be refered to later on iin the model file. By automatic identication I mean that there are no lines in the file that specifiy the ID of each material, instead, MaterialID's are given based on the order they appear in the file, with the first one in the array given the ID of 0, the second given the ID of 1 and so on. This means that, in our example above, even though the number 3 signals 3 Materials, the highest MaterialID is in fact 2 and the lowest MaterialID is infact 0. What does all this mean? Well first let us examine what each MaterialID actually refers to. There are blocks of code in the file that look like:
Material {
Layer {
FilterMode Additive,
Unshaded,
static TextureID 3,
Alpha 1 {
Linear,
3333: 0.75,
}
}
These are two layer blocks that refers to one Material:
Material {
Layer {
FilterMode None,
Unshaded,
TwoSided,
static TextureID 1,
}
Layer {
FilterMode Blend,
TwoSided,
static TextureID 0,
}
}
We know now that each Material is given an ID based on its order, so we should expect that each Texture is given an ID based on its order also. This is in fact true. We know that the texture we are interested in should be "replacable" since we know that the hero glow changes color in each game. "Replacable" textures cannot be found in one specific file, but instead in a directory. Looking at our code we see two such textures:

Bitmap {
Image "",
ReplaceableId 1,
}
and

Bitmap {
Image "",
ReplaceableId 2,
}
Looking at the order these textures are found:

Textures 4 {
Bitmap {
Image "units\Human\Jaina\Jaina.blp",
}
Bitmap {
Image "",
ReplaceableId 1,
}
Bitmap {
Image "ReplaceableTextures\Weather\Clouds8x8.blp",
}
Bitmap {
Image "",
ReplaceableId 2,
}
}
We know texture 1 has TextureID 1 and texture 2 has TextureID 3.
Looking at our Materials, we can see now why I recommended to search for "Alpha 1":
Material {
Layer {
FilterMode Additive,
Unshaded,
static TextureID 3,
Alpha 1 {
Linear,
3333: 0.75,
}
}
The block refers directly to our TextureID 3, which is one of the replacable textures.
This is, IN FACT, the texture and material that we are interested in. The other replacable texture identified earlier as texture 1, defines the color that the clothes and armor of a hero take on based on what player they are controlled by. This is, in fact, how people get the "ghost" effect. I can write another short addon to this tutorial describing the "ghost"effect if I see that people are interested.

3.
Replace:
Material {
Layer {
FilterMode Additive,
Unshaded,
static TextureID 3,
Alpha 1 {
Linear,
3333: 0.75,
}
}
with
Material {
Layer {
FilterMode Additive,
Unshaded,
static TextureID 3,
Alpha 0 {
Linear,
3333: 0.00,
}
}
4. If you were to finish with editing the MDL at this point you will find a weird effect, your hero will have no glow when standing, but when doing any action he will have a glow. This is because we still haven't changed our animation information in the model file.

This part of the tutorial is much more specific to the type of model your hero has but the general strategy to prevent this weird effect is to DELETE the animation information PERTAINING to the MaterialID of the Material that SPECIFIES your hero's glow effect covered in steps 2 & 3 of this tutorial.

How do we do this? First look at your MaterialID, in the example:
Materials 3 {
Material {
Layer {
FilterMode Transparent,
static TextureID 0,
}
}
Material {
Layer {
FilterMode None,
Unshaded,
TwoSided,
static TextureID 1,
}
Layer {
FilterMode Blend,
TwoSided,
static TextureID 0,
}
}
Material {
Layer {
FilterMode Additive,
Unshaded,
static TextureID 3,
Alpha 0 {
Linear,
3333: 0.00,
}
}
}
}
Clearly, the MaterialID is 2. Ctrl+F to bring up your search prompt. Type in your MaterialID. In the example case it is MaterialID 2. It should bring up only 1 match. In the case of the example it brought up this:

Geoset {
Vertices 12 {
{ -121.188, -112.982, 7.00546 },
{ 104.102, -112.982, 7.00546 },
{ -121.188, 112.308, 7.00546 },
{ 104.102, 112.308, 7.00546 },
{ -135.395, -127.189, 15.7892 },
{ 118.31, -127.189, 15.7892 },
{ -135.395, 126.516, 15.7892 },
{ 118.31, 126.516, 15.7892 },
{ -103.209, -95.003, 25.4689 },
{ 86.1231, -95.003, 25.4689 },
{ -103.209, 94.3292, 25.4689 },
{ 86.1231, 94.3292, 25.4689 },
}
Normals 12 {
{ 0, 0, 1 },
{ 0, 0, 1 },
{ 0, 0, 1 },
{ 0, 0, 1 },
{ 0, 0, 1 },
{ 0, 0, 1 },
{ 0, 0, 1 },
{ 0, 0, 1 },
{ 0, 0, 1 },
{ 0, 0, 1 },
{ 0, 0, 1 },
{ 0, 0, 1 },
}
TVertices 12 {
{ 0.000499785, 0.000499547 },
{ 0.000499547, 0.9995 },
{ 0.9995, 0.000499785 },
{ 0.9995, 0.9995 },
{ 0.000499785, 0.000499547 },
{ 0.000499547, 0.9995 },
{ 0.9995, 0.000499785 },
{ 0.9995, 0.9995 },
{ 0.000499785, 0.000499547 },
{ 0.000499547, 0.9995 },
{ 0.9995, 0.000499785 },
{ 0.9995, 0.9995 },
}
VertexGroup {
0,
0,
0,
0,
1,
1,
1,
1,
2,
2,
2,
2,
}
Faces 1 18 {
Triangles {
{ 0, 1, 2, 3, 2, 1, 4, 5, 6, 7, 6, 5, 8, 9, 10, 11, 10, 9 },
}
}
Groups 3 3 {
Matrices { 0 },
Matrices { 1 },
Matrices { 2 },
}
MinimumExtent { -140.338, -132.132, 7.00546 },
MaximumExtent { 123.252, 131.458, 25.4689 },
BoundsRadius 186.614,
Anim {
MinimumExtent { -140.338, -132.132, 7.00546 },
MaximumExtent { 123.252, 131.458, 25.4689 },
BoundsRadius 186.614,
}
Anim {
MinimumExtent { -140.338, -132.132, 7.00546 },
MaximumExtent { 123.252, 131.458, 25.4689 },
BoundsRadius 186.614,
}
Anim {
MinimumExtent { -140.338, -132.132, 7.00546 },
MaximumExtent { 123.252, 131.458, 25.4689 },
BoundsRadius 186.614,
}
Anim {
MinimumExtent { -140.338, -132.132, 7.00546 },
MaximumExtent { 123.252, 131.458, 25.4689 },
BoundsRadius 186.289,
}
Anim {
MinimumExtent { -140.338, -132.132, 7.00546 },
MaximumExtent { 123.252, 131.458, 25.4689 },
BoundsRadius 186.614,
}
Anim {
MinimumExtent { -140.338, -132.132, 7.00546 },
MaximumExtent { 123.252, 131.458, 25.4689 },
BoundsRadius 186.614,
}
Anim {
MinimumExtent { -140.338, -132.132, 7.00546 },
MaximumExtent { 123.252, 131.458, 25.4689 },
BoundsRadius 186.614,
}
Anim {
MinimumExtent { -140.338, -132.132, 7.00546 },
MaximumExtent { 123.252, 131.458, 25.4689 },
BoundsRadius 186.614,
}
MaterialID 2,
SelectionGroup 0,
Unselectable,
}
You can delete this WHOLE Geoset block of code, it just defines the animation of the hero glows. In the case of the example, the whole text above would be deleted.

5. Save the model file, you are almost done. Open up Yobgul's file converter. Load the MDL file and convert it to MDX. Your new MDX file has no hero glow, but you need to get it into your map.

6.Load up WorldEditor. Create a new SMALL TEST MAP. USe the import manager to import your new MDX file. Now the Model is available to you in the object editor. If you want this MDX to replace the MDX found in the war3.mpq, you must change the location of the MDX using import manager to the same location of the same name MDX found in war3. So for example, if I want to replace all Paladin Models in my map, I would change the location of the imported MDX from:
war3Imported/HeroPaladin.mdx
to
Units\Human\HeroPaladin\HeroPaladin.mdx
You may still see the hero glow in WorldEditor. To test the model to be 100% sure, you must test the Map and Actually PLAY it!


Last edited by linuxdog : 03-19-2005 at 09:12 AM.
linuxdog is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 03-19-2005, 07:08 PM   #2
linuxdog
User
 
Join Date: Dec 2003
Posts: 9

Submissions (1)

linuxdog has little to show at this moment (0)

Default

I have decided that the length of this tutorial might be overwhelming for someone who just wants to learn how to remove a hero glow quickly. I am going to write a summary. The danger in this is that people will not understand what they are doing and just will follow the steps, so if you find yourself in that situation please read the above post for more details.
  • Convert Hero.MDX -> Hero.MDL
  • Open Hero.MDL with notepad
  • Search for "Alpha 1"
  • Replace:
    Material {
    Layer {
    FilterMode Additive,
    Unshaded,
    static TextureID 3,
    Alpha 1 {
    Linear,
    3333: 0.75,
    }
    }
    }
    with:
    Material {
    Layer {
    FilterMode Additive,
    Unshaded,
    static TextureID 3,
    Alpha 0 {
    Linear,
    3333: 0.00,
    }
    }
    }
  • Look at the Material order in the MDL and find out your Glow MaterialID
  • Use Notepad to search for the Glow MaterialID
  • Delte the Geoset block that contains the Glow MaterialID
  • Save, convert back to MDX
  • Import into Worldedit and use, Please note that you may have to test the map in order to see the effect
linuxdog is offline   Reply With Quote
Old 03-21-2005, 04:30 PM   #3
flamesforzuljin
back from the dead
 
flamesforzuljin's Avatar
 
Join Date: Aug 2003
Posts: 1,466

flamesforzuljin will become famous soon enough (31)flamesforzuljin will become famous soon enough (31)

Send a message via ICQ to flamesforzuljin Send a message via AIM to flamesforzuljin Send a message via MSN to flamesforzuljin
Default

awesome stuff. good thing you included the summary for the less-than-patient people like me. well written and worded. ill move this to the mdl forum.

do we have an mdhell forum? i have no clue. i havent visited the tut section in a long time. ill see where it ends up.

[MOVED] to somewhere.

good job.
__________________
Can't we find the minds to lead us
Closer to the heart?

flamesforzuljin is offline   Reply With Quote
Old 04-14-2005, 06:28 PM   #4
StealthFox
User
 
StealthFox's Avatar
 
Join Date: May 2004
Posts: 132

Submissions (1)

StealthFox is on a distinguished road (21)

Default

There is an easier way - open up Vertex modify and find the geoset that contains glow. Delete all but three vertices and shrink them to nothingness. Done.
__________________
StealthFox is offline   Reply With Quote
Old 04-14-2005, 08:08 PM   #5
flamesforzuljin
back from the dead
 
flamesforzuljin's Avatar
 
Join Date: Aug 2003
Posts: 1,466

flamesforzuljin will become famous soon enough (31)flamesforzuljin will become famous soon enough (31)

Send a message via ICQ to flamesforzuljin Send a message via AIM to flamesforzuljin Send a message via MSN to flamesforzuljin
Default

actually you dont have to not delete 3 verticies. you can delete it all, then save it. if you have oinks new vertex modify, itll just get rid of that geoset...
__________________
Can't we find the minds to lead us
Closer to the heart?

flamesforzuljin is offline   Reply With Quote
Old 01-26-2006, 06:03 PM   #6
IPEONRUSH-SHIP
User
 
Join Date: Jan 2006
Posts: 46

IPEONRUSH-SHIP has little to show at this moment (8)

Default

Great tutorial Linux. Been wanting to remove some hero glows off of some weapon mdls. Thanks for your contribution to the wc3 community.
__________________
The Golden Age of Pirates - The Original 13attleships community.
http://www.thegoldenageofpirates.com
IPEONRUSH-SHIP is offline   Reply With Quote
Old 03-08-2006, 04:06 PM   #7
malice
User
 
malice's Avatar
 
Join Date: Mar 2006
Posts: 6

malice has little to show at this moment (4)

Send a message via ICQ to malice
Idea new way... maybe...

well.. i think i've found easier way for erasing glow color, if you don't like
all that add/remove/replace-string thing.. no editing in notepad or converting
.mdx to .mdl.. assuming that you have world editor, you only need War3 Model
Editor, which can be found in HERE. after you downoad it and unzip it, start War3
Model Editor and open your .mdx file.. in menu click on window, and then open
geoset manager and material manager. geoset manager should content something
like this:

Geoset 00DDBBA0
Geoset 00E14C70
Geoset 00E14E78
Geoset 00E20D60
Geoset 00E70238
Geoset 00E70440

and material manager like this:

Material 00E29008
Material 00E29078
Material 00E332C0
Material 00E33820
Material 00E34AA8
Material 00E34FF0
Material 00E35060

geoset and material names on some model are temporary, and they change each time
you load (same) model, so i think this is the only way to know which geoset is
which. and the way is:

each geoset represents a part of a model (head, weapon, glow...), and if you
double-click any geoset, you'll see that each geoset uses one material. when
you open any material, new window will pop-up with material layers (usualy one).
double-click on that layer will show you it's properties, and the texture it
uses.. what you need to do is - open every material (and it's layer) and find the
one that uses Replaceable ID 2 texture (this texture is always the hero glow).
if that material is (example) "Material 00E35060", then you have to find geoset
that uses this "Material 00E35060" and simply delete it..

so, at the end:

Replaceable ID 2 > MaterialLayer00E432C0 > Material00E35060 > Geoset00E14E78

when you erase Geoset 00E14E78, heero glow will dissappear..

i hope this helps, i don't think i've explained this very well, so, i'm sorry,
i'm just a stupid foreigner..
__________________
All animals kill. And the animals that don't kill are stupid ones. Like cows and turtles and stuff...
malice is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 04:02 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services