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 12-28-2005, 10:17 AM   #1
olofmoleman
Baron Grunwald is.
 
olofmoleman's Avatar


Texturing Moderator
 
Join Date: Nov 2005
Posts: 2,541

Submissions (106)

olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)

Approved Map: Jurassic ExplorationSmiley contest 1st, 2nd and 3rd place.Skinning Competetion #4 - FallenSkinning Competetion #4 - Atoned

Default The Crystal Effect

In this tutorial I will tell you how to make the crystal effect used in Mc!'s Crystal Golem and my Crystal Dragon

Tools Needed
Warcraft 3 TFT (ROC also possible but I use a TFT ingame skin)
Notepad or Wordpad
War3Fileconverter
Warcraft3 Viewer or/and Magos' model editor
Vertex modifier (or another modeling program)

Knowledge Needed
basic model exporting knowledge
basic mdl editing knowledge
basic modeling knowledge

Getting started
First you need to find a model you want to make in to a crystal one
in this tutorial we'll use the frog model, because it has only one geoset and is a very simple model, but the technique works the same with every other model, it's just more work with more complex models

Note: remember to save your files regularly

First, extract the frog model from the Mpq file.
Then you use the file converter to convert the .mdx frog model in to an .mdl file.

Mdl Editing
Now, open the .mdl file, the first thing we do, is change the path of the skin so it uses the crystal texture.
This is what it looks like
Code:
Textures 1 {
 Bitmap {
  Image "units\Critters\Frog\FrogSkin.blp",
 }
}

Change it to
Code:
Textures 1 {
 Bitmap {
  Image "Textures\CrystalOpaque.blp",
 }
}

Now for the model to really look like crystal the textures, materials and geosets have to be copied and make them work propperly, since this model only has one texture, one material and one geoset, thats not going to be that difficult, with more textures, materials and geosets it's just the same, only more copieng work to do.

Copying the textures
Copy this and put it right below it
Code:
 Bitmap {
  Image "Textures\CrystalOpaque.blp",
 }
Then the texture part should look like this:
Code:
Textures 1 {
 Bitmap {
  Image "Textures\CrystalOpaque.blp",
 }
 Bitmap {
  Image "Textures\CrystalOpaque.blp",
 }
}

Copying the Materials
it's almost the same with the materials
copy this:
Code:
 Material {
  Layer {
   FilterMode None,
   static TextureID 0,
  }
 }
and put it below it like this:
Code:
Materials 1 {
 Material {
  Layer {
   FilterMode None,
   static TextureID 0,
  }
 }
 Material {
  Layer {
   FilterMode None,
   static TextureID 0,
  }
 }
}
once you've copied it, you need to change a few things in the code, change it to:
Code:
Materials 1 {
 Material {
  Layer {
   FilterMode None,
   static TextureID 0,
  }
 }
 Material {
  Layer {
   FilterMode Additive,
   static TextureID 1,
  }
 }
}
as you can see, I only changed the "FilterMode" and the "TextureID" on one material, I left the first material unchanged.

Copying the Geosets
By copying the geosets and changing what kind of material ID it should use you can create the overlaying transparent look that makes it look like crystal.
Since the geoset code is really long I'll only copy a small part in to this tutorial
the geoset begins with this:
Code:
Geoset {
 Vertices 157 {
  { -12.3964, 1.52395, 0.31411 },
  { -0.52003, 2.88477, 0.33941 },
  { -5.1976, 4.42178, 3.53995 },
  { -13.4577, 4.11941, 0.31442 },
  { -8.1316, 10.2445, 0.33869 },
  { -3.29927, -0.21647, 3.66749 },
  { -5.1976, 4.42178, 3.53995 },
  { -0.57432, 7.25025, 10.4476 },
  { 6.04609, 6.50425, 11.3752 },
and it ends with this:
Code:
  Matrices { 10, 11 },
  Matrices { 11 },
  Matrices { 12, 13 },
  Matrices { 12, 13, 14 },
  Matrices { 13, 14 },
  Matrices { 14 },
 }
 MinimumExtent { -28.2479, -14.3093, -9.09061 },
 MaximumExtent { 19.7491, 27.7945, 46.2399 },
 BoundsRadius 28.6633,
 Anim {
  MinimumExtent { -28.2479, -14.3093, -3.77587 },
  MaximumExtent { 19.7491, 15.0309, 46.2399 },
  BoundsRadius 26.3345,
 }
 Anim {
  MinimumExtent { -17.6841, -10.6745, -0.0313365 },
  MaximumExtent { 11.7315, 10.2365, 20.4019 },
  BoundsRadius 18.3231,
 }
 Anim {
  MinimumExtent { -19.204, -10.68, -9.09061 },
  MaximumExtent { 12.7842, 27.7945, 32.1506 },
  BoundsRadius 24.6313,
 }
 MaterialID 0,
 SelectionGroup 0,
}
It's a lot of numbers and stuff, but it's all needed, make sure you copy the whole geoset, then paste it directly below it so the first part of the second geoset and last part of the first geoset look like this:
Code:
 }
 Anim {
  MinimumExtent { -17.6841, -10.6745, -0.0313365 },
  MaximumExtent { 11.7315, 10.2365, 20.4019 },
  BoundsRadius 18.3231,
 }
 Anim {
  MinimumExtent { -19.204, -10.68, -9.09061 },
  MaximumExtent { 12.7842, 27.7945, 32.1506 },
  BoundsRadius 24.6313,
 }
 MaterialID 0,
 SelectionGroup 0,
}
Geoset {
 Vertices 157 {
  { -12.3964, 1.52395, 0.31411 },
  { -0.52003, 2.88477, 0.33941 },
  { -5.1976, 4.42178, 3.53995 },
  { -13.4577, 4.11941, 0.31442 },
  { -8.1316, 10.2445, 0.33869 },
  { -3.29927, -0.21647, 3.66749 },
  { -5.1976, 4.42178, 3.53995 },
  { -0.57432, 7.25025, 10.4476 },
  { 6.04609, 6
Now you go to the very bottom of the second geoset and change the "MaterialID" from 0 to 1. Like this:
Code:
 }
 MaterialID 1,
 SelectionGroup 0,
}
Now the mdl editing part is done, so if you convert the .mdl file back to .mdx, this is what it should look like:

(this is a screenie take with magos model editor, in the wc3 viewer it looks different)

Model editing in vertex modifier
One of the geosets has to be resized to get that overlapping transparent look.
Since this is a really simple model, this part is about the easiest, but with a complex model like the Crystal Dragon it's much harder.

Open the vertex modifer, and open the .mdl frog model. You'll get a popup window that asks you wich geoset you want to open, because only the second geoset has been modified (the materialID) we are going to open that one

there are two ways to make that crystal effect, you simply make one geoset bigger then the other (like Mc! did with his Golem), or you could make it bigger piece by piece (like I did with my Dragon), this takes much more time, but the result can be more detailed, and less messy, but the frog model it a really simple one, so it won't really matter if we just resize one geoset, once you have resized it a bit, save it and convert it back to .mdx
it should now look like this:

If it does, then you're finished!

Finishing up
Some times you have to tweak the model a little bit to make it look just right
there are also a few things you can do to change the look of the crystal effect a bit
You can brighten the transparent part by making it twosided
this is how you do that in the mdl file
Change this:
Code:
Materials 1 {
 Material {
  Layer {
   FilterMode None,
   static TextureID 0,
  }
 }
 Material {
  Layer {
   FilterMode Additive,
   static TextureID 1,
  }
 }
}
To this:
Code:
Materials 1 {
 Material {
  Layer {
   FilterMode None,
   static TextureID 0,
  }
 }
 Material {
  Layer {
   FilterMode Additive,
   TwoSided,
   static TextureID 1,
  }
 }
}
In the code I added "TwoSided,", that makes it twosided (duh), but the "T" and the "S" should be spelled with capitals, if you don't do this, it will not work. when you saved the .mdl file and converted it to .mdx you can see the differance if you compare them

NormalTwosided
the differance isn't that noticable, but with models where the layers overlap eahc other more you can see a great differance, my Crystal Dragon uses a twosided outside, and Mc!'s Crystal Golem doesn't
Here below you can see the examples

My Crystal Dragon

Mc!'s Crystal Golem
Zoom (requires log in)

Have fun with making your own crystal creatures!

And special thanks for Mc! for teaching me how to make this effect.
__________________

Olof Moleman AKA Lord Trilobite
My Wc3c Resources


I'm not doing requests, don't pm me about it


~The Arch-enemy of Mc!~
Quote:
Originally Posted by Rao Dao Zao
Olof always speaks true.
olofmoleman is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 12-28-2005, 02:05 PM   #2
Taur
#8 in posting (nolifeftw)
 
Join Date: Jul 2005
Posts: 4,027

Taur is a jewel in the rough (215)Taur is a jewel in the rough (215)Taur is a jewel in the rough (215)Taur is a jewel in the rough (215)

Default

While it is a very nice looking effect, you have to keep in mind somethings. This is wc3, a subtle effect like that might not be very noticed. It also can almost double your poly count, and seeing as how your example is a WoW model, that'll be a nearly unusable model. It has over 5k polies!

It is possible to do the same with particles, my fav example is the fel warlock spell animation (doesn't it look soo uber :P ) , I'm not an expert at it, but you should try and experiment

nonetheless good for low poly models, rep given good tut
Taur is offline   Reply With Quote
Old 12-28-2005, 02:08 PM   #3
olofmoleman
Baron Grunwald is.
 
olofmoleman's Avatar


Texturing Moderator
 
Join Date: Nov 2005
Posts: 2,541

Submissions (106)

olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)

Approved Map: Jurassic ExplorationSmiley contest 1st, 2nd and 3rd place.Skinning Competetion #4 - FallenSkinning Competetion #4 - Atoned

Default

Well, you'll be surprized how small that Crystal Dragon file is, it's just ove 500 kb, and yes the poly count is very high, but I didnt have any problems with it, and it wasn't meant as a normal unit, more as a boss or something.
but anyway, thanks for the rep.
__________________

Olof Moleman AKA Lord Trilobite
My Wc3c Resources


I'm not doing requests, don't pm me about it


~The Arch-enemy of Mc!~
Quote:
Originally Posted by Rao Dao Zao
Olof always speaks true.
olofmoleman is offline   Reply With Quote
Old 12-28-2005, 02:12 PM   #4
Taur
#8 in posting (nolifeftw)
 
Join Date: Jul 2005
Posts: 4,027

Taur is a jewel in the rough (215)Taur is a jewel in the rough (215)Taur is a jewel in the rough (215)Taur is a jewel in the rough (215)

Default

I think the size is a big problem, the general agreed upon size for a b.net game is about 1 mb or so, if you take half of it up to import a dragon...

and polies should really be taken more seriously, I mean these days 1k polies is okay, but 5k? That really pushes it, it's higher than the rocking arthas model (which generates a lot of lag for me). I though sear implemented a no model over 3k polies rule, simply because models over 3k were unusable.

It's a good tut, but pay attention to the polies!

and np
Taur is offline   Reply With Quote
Old 12-28-2005, 02:39 PM   #5
olofmoleman
Baron Grunwald is.
 
olofmoleman's Avatar


Texturing Moderator
 
Join Date: Nov 2005
Posts: 2,541

Submissions (106)

olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)

Approved Map: Jurassic ExplorationSmiley contest 1st, 2nd and 3rd place.Skinning Competetion #4 - FallenSkinning Competetion #4 - Atoned

Default

maybe the Crystal Dragon thread is a better place to discuss this...
__________________

Olof Moleman AKA Lord Trilobite
My Wc3c Resources


I'm not doing requests, don't pm me about it


~The Arch-enemy of Mc!~
Quote:
Originally Posted by Rao Dao Zao
Olof always speaks true.
olofmoleman is offline   Reply With Quote
Old 12-28-2005, 02:53 PM   #6
Uberleetpwnage
User
 
Uberleetpwnage's Avatar
 
Join Date: Dec 2005
Posts: 45

Submissions (7)

Uberleetpwnage is on a distinguished road (10)

Default

Quote:
Originally Posted by olofmoleman
Well, you'll be surprized how small that Crystal Dragon file is, it's just ove 500 kb, and yes the poly count is very high, but I didnt have any problems with it, and it wasn't meant as a normal unit, more as a boss or something.
but anyway, thanks for the rep.

'Just'? Was that sarcasm? :P 500 kB is high for a model.
Polycount in a model won't be a problem when you play the game most of the time, but it matters when the game ends. One or two of those high poly-units spawned in a map is okay, but if it's used as a massed-type unit, then you'll experience some lag before the game ends.

Quote:
Originally Posted by Taur
This is wc3, a subtle effect like that might not be very noticed.

I had made some crystal stuff before, with a layer of animated textures. Tell me that it's a subtle effect:

<___<
Uberleetpwnage is offline   Reply With Quote
Old 12-28-2005, 03:01 PM   #7
olofmoleman
Baron Grunwald is.
 
olofmoleman's Avatar


Texturing Moderator
 
Join Date: Nov 2005
Posts: 2,541

Submissions (106)

olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)

Approved Map: Jurassic ExplorationSmiley contest 1st, 2nd and 3rd place.Skinning Competetion #4 - FallenSkinning Competetion #4 - Atoned

Default

Quote:
'Just'? Was that sarcasm? :P 500 kB is high for a model.
No it wasn't sarcasm, yes thats very samll compared to the original base model, that was 1.6 mb...
__________________

Olof Moleman AKA Lord Trilobite
My Wc3c Resources


I'm not doing requests, don't pm me about it


~The Arch-enemy of Mc!~
Quote:
Originally Posted by Rao Dao Zao
Olof always speaks true.
olofmoleman is offline   Reply With Quote
Old 12-28-2005, 03:03 PM   #8
Taur
#8 in posting (nolifeftw)
 
Join Date: Jul 2005
Posts: 4,027

Taur is a jewel in the rough (215)Taur is a jewel in the rough (215)Taur is a jewel in the rough (215)Taur is a jewel in the rough (215)

Default

well that's a WoW model, WoW is okay since you don't have to DL files b4 playing. but in b.net, dling a 500kb dragon could be annoying
Taur is offline   Reply With Quote
Old 12-28-2005, 04:39 PM   #9
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Uberleetpwnage: You made that crysta Dragon Spawn model? I always wanted to know who made that . It appeared in Grater's avatar I think?
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 12-28-2005, 05:51 PM   #10
olofmoleman
Baron Grunwald is.
 
olofmoleman's Avatar


Texturing Moderator
 
Join Date: Nov 2005
Posts: 2,541

Submissions (106)

olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)

Approved Map: Jurassic ExplorationSmiley contest 1st, 2nd and 3rd place.Skinning Competetion #4 - FallenSkinning Competetion #4 - Atoned

Default

That's alfred from wc3sear.ch
__________________

Olof Moleman AKA Lord Trilobite
My Wc3c Resources


I'm not doing requests, don't pm me about it


~The Arch-enemy of Mc!~
Quote:
Originally Posted by Rao Dao Zao
Olof always speaks true.
olofmoleman is offline   Reply With Quote
Old 12-29-2005, 05:50 AM   #11
Uberleetpwnage
User
 
Uberleetpwnage's Avatar
 
Join Date: Dec 2005
Posts: 45

Submissions (7)

Uberleetpwnage is on a distinguished road (10)

Default

Quote:
Originally Posted by olofmoleman
That's alfred from wc3sear.ch

Correct. Vexorian, mind checking my email address? :P
EDIT: Gif was made by Skizot, because my computer sucks and lags when I use video capture programs. That Dragonspawn model was inspired by a Might and Magic VIII monster, and since RightField had Crystal Golems updated by me with the same effect.... So I decided to make this.
Was this the avatar?

Last edited by Uberleetpwnage : 12-29-2005 at 06:03 AM.
Uberleetpwnage is offline   Reply With Quote
Old 12-29-2005, 02:53 PM   #12
Nasrudin
User


Respected User
 
Join Date: Dec 2005
Posts: 932

Submissions (31)

Nasrudin is just really nice (327)Nasrudin is just really nice (327)Nasrudin is just really nice (327)

Default

Quote:
Originally Posted by Taur
It is possible to do the same with particles, my fav example is the fel warlock spell animation (doesn't it look soo uber :P )

That effect was made with billboarded planes, not particles.
Nasrudin is offline   Reply With Quote
Old 01-01-2006, 01:42 PM   #13
Whitehorn
SPOON!
 
Whitehorn's Avatar


Respected User
 
Join Date: Sep 1983
Posts: 4,900

Submissions (114)

Whitehorn is a name known to all (510)Whitehorn is a name known to all (510)Whitehorn is a name known to all (510)Whitehorn is a name known to all (510)Whitehorn is a name known to all (510)

Default

Olof. There is no need to have two identical Textures. Just point both materials at the same texture.
__________________
My Wargame

Be excellent to each other.
Whitehorn is offline   Reply With Quote
Old 01-08-2006, 09:43 AM   #14
olofmoleman
Baron Grunwald is.
 
olofmoleman's Avatar


Texturing Moderator
 
Join Date: Nov 2005
Posts: 2,541

Submissions (106)

olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)olofmoleman has a brilliant future (953)

Approved Map: Jurassic ExplorationSmiley contest 1st, 2nd and 3rd place.Skinning Competetion #4 - FallenSkinning Competetion #4 - Atoned

Default

Quote:
Originally Posted by Whitehorn
Olof. There is no need to have two identical Textures. Just point both materials at the same texture.
hmm, yeah you'r probably right, but it aslo works this way...
__________________

Olof Moleman AKA Lord Trilobite
My Wc3c Resources


I'm not doing requests, don't pm me about it


~The Arch-enemy of Mc!~
Quote:
Originally Posted by Rao Dao Zao
Olof always speaks true.
olofmoleman is offline   Reply With Quote
Old 01-22-2006, 02:29 AM   #15
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

hmnn, this goes to mdl editing I think
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian 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 12:31 PM.


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