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 10-28-2004, 06:07 AM   #1
Alfred
User
 
Alfred's Avatar


Respected User
 
Join Date: May 2003
Posts: 840

Submissions (6)

Alfred is on a distinguished road (17)

Send a message via MSN to Alfred
Default Adding of Animated Textures

How it works
You take or 'rip' a tvertexanim from a model (for instance: Water Elemental).
Then you apply it to a mesh, in which it will be the 'layer' of animated texture.

Tools needed:
Notepad/Wordpad
YobGuls' Fileconverter Get it here
One model with animated texture in which you want to 'rip' from
... and some patience if you want a layer of animated texture which is above the original geoset.

How it can be done
Convert the 2 models(one with animated texture, one you want to add on) to MDLs. In this tut, we will rip
the tvertexanim from water elemental(Of course, there are different models with different movement of
the texture.) We will call the model you want to add animated texture on as model A, and the other one
as model B, which will be a Water Elemental.
Now open model B.
Code:
TextureAnims 2 {
	TVertexAnim {
		Translation 2 {
			Bezier,
			GlobalSeqId 1,
			0: { 0.0997751, 1.72412, -0.0260519 },
				InTan { 0, 0, 0 },
				OutTan { 0.0665167, 1.14942, -0.0173681 },
			2767: { 0, 0, 0 },
				InTan { 0.0332584, 0.574708, -0.00868383 },
				OutTan { 0, 0, 0 },
		}
	}
	TVertexAnim {
		Translation 2 {
			Bezier,
			GlobalSeqId 12,
			0: { 0, 0, 0 },
				InTan { 0, 0, 0 },
				OutTan { -0.107482, -0.210476, 1.13849 },
			3333: { -0.322445, -0.631428, 3.41546 },
				InTan { -0.214963, -0.420952, 2.27698 },
				OutTan { 0, 0, 0 },
		}
	}
}
Now look for this, then copy the entire section.
Open model A, then paste this below the materials section
Code:
			}
		}
	}
	Material {
		Layer {
			FilterMode Blend,
			static TextureID 4,
		}
	}
}
TextureAnims 2 {
	TVertexAnim {
		Translation 2 {
			Bezier,
			GlobalSeqId 1,
			0: { 0.0997751, 1.72412, -0.0260519 },
				InTan { 0, 0, 0 },
				OutTan { 0.0665167, 1.14942, -0.0173681 },
			2767: { 0, 0, 0 },
				InTan { 0.0332584, 0.574708, -0.00868383 },
				OutTan { 0, 0, 0 },
		}
	}
	TVertexAnim {
		Translation 2 {
			Bezier,
			GlobalSeqId 12,
			0: { 0, 0, 0 },
				InTan { 0, 0, 0 },
				OutTan { -0.107482, -0.210476, 1.13849 },
			3333: { -0.322445, -0.631428, 3.41546 },
				InTan { -0.214963, -0.420952, 2.27698 },
				OutTan { 0, 0, 0 },
		}
	}
}
So it looks somewhat like that. Now you will remove one tvertexanim away, so making only
one tvertexanim in the section.
Code:
TextureAnims 2 {
	TVertexAnim {
		Translation 2 {
			Bezier,
			GlobalSeqId 1,
			0: { 0.0997751, 1.72412, -0.0260519 },
				InTan { 0, 0, 0 },
				OutTan { 0.0665167, 1.14942, -0.0173681 },
			2767: { 0, 0, 0 },
				InTan { 0.0332584, 0.574708, -0.00868383 },
				OutTan { 0, 0, 0 },
		}
	}
}
Now, make a duplicate of the mesh in which you want animated texture on. As for the crypt fiend,
it will be the main body, aka mesh 1 and 2. So CnP the ENTIRE of the 2 geosets and put them as
the last 2 geosets(Just above the set of geosetanims)
Code:
	MaterialID 3,
	SelectionGroup 0,
} < Press enter here to create a new line and paste omg.
GeosetAnim {
	Alpha 8 {
		DontInterp,
		40267: 1,
		100100: 0,
		113600: 0,
		176667: 1,
		177667: 0,
		178000: 0,
		180000: 0,
		180033: 1,
	}
	GeosetId 0,
Now, create 2 new materials(One for the duplicate of 1st mesh, one for the other.) below the last
material.
Code:
Materials 4 {
	Material {
		Layer {
			FilterMode None,
			TwoSided,
			static TextureID 0,
		}
	}
	Material {
		Layer {
			FilterMode None,
			Unshaded,
			static TextureID 1,
		}
		Layer {
			FilterMode Blend,
			TwoSided,
			static TextureID 0,
		}
	}
	Material {
		Layer {
			FilterMode Transparent,
			static TextureID 2,
			Alpha 7 {
				Linear,
				40267: 0,
				47100: 0,
				48933: 1,
				100267: 1,
				113600: 1,
				171933: 1,
				173600: 0,
			}
		}
	}
	Material {
		Layer {
			FilterMode Blend,
			static TextureID 4,
		}
	}
	Material {
		Layer {
			FilterMode None,
			TwoSided,
			static TextureID 0,
		}
	}
	Material {
		Layer {
			FilterMode None,
			TwoSided,
			static TextureID 0,
		}
	}
}
I CnP the first material in this case, so I have a template to start with. Now, change the filtermode
to AddAlpha, or Additive. (Since I'm guessing the effect you want should be 'magical' kind.) Then add
the TvertexAnim ID x by CnPing from the Water Elemental's materials, and change the value to 0.
Code:
	Material {
		Layer {
			FilterMode Additive,
			TwoSided,
			static TextureID 0,
			TVertexAnimId 0,
		}
	}
	Material {
		Layer {
			FilterMode Additive,
			TwoSided,
			static TextureID 0,
			TVertexAnimId 0,
		}
	}
Once this is accomplish, now choose a texture you want. In this example, we will make a fire effect.
The path of such texture is Textures\EQ_Rock2.blp. You can also make new textures yourself, but to save
space, I usually use textures in war3. Give it the wrapwidth and height values, like the water elemental's.
Code:
Textures 5 {
	Bitmap {
		Image "units\Undead\CryptFiend\CryptFiend.blp",
	}
	Bitmap {
		Image "",
		ReplaceableId 1,
	}
	Bitmap {
		Image "Textures\gutz.blp",
	}
	Bitmap {
		Image "Textures\Dust5A.blp",
	}
	Bitmap {
		Image "ReplaceableTextures\Splats\BurrowSplat.blp",
	}
	Bitmap {
		Image "Textures\EQ_Rock2.blp",
		WrapWidth,
		WrapHeight,
	}
}
Now detect what nth position is the new texture added. It is the 6th texture in this case, so we will
minus one to it, since counting starts from 0 in MDL. Enter 5 to the 2 new materials you made to their textureIDs.
Code:
	Material {
		Layer {
			FilterMode Additive,
			TwoSided,
			static TextureID 5,
			TVertexAnimId 0,
		}
	}
	Material {
		Layer {
			FilterMode Additive,
			TwoSided,
			static TextureID 5,
			TVertexAnimId 0,
		}
	}
Now create some GlobalSequence by adding a new section. Right after the animation names, and before the textures,
CnP from the water elemental its GlobalSequence section. Then remove all except one. Then replace its value as 3333.
This affects the speed because the longer time you take to travel the same distance = slow speed, shorter time in
same distance = fast speed. I choose 3333 as it is moderate.
Code:
GlobalSequences 20 {
	Duration 3333,
}
Textures 5 {
	Bitmap {
		Image "units\Undead\CryptFiend\CryptFiend.blp",
	}
	Bitmap {
		Image "",
		ReplaceableId 1,
Now go to the TvertexAnim you had, and update its information to
Code:
TextureAnims 2 {
	TVertexAnim {
		Translation 2 {
			Bezier,
			GlobalSeqId 0,
			0: { 0.0997751, 1.72412, -0.0260519 },
				InTan { 0, 0, 0 },
				OutTan { 0.0665167, 1.14942, -0.0173681 },
			3333: { 0, 0, 0 },
				InTan { 0.0332584, 0.574708, -0.00868383 },
				OutTan { 0, 0, 0 },
		}
	}
}
Time to update your 2 geosets, change their material IDs to 4 and 5 respectively. (I made 2 materials so you can add
different stuff to each materials next time).
Apply new geosetanims to the 2 new geosets. So they:
1) will not appear on decay
2) will be orange by applying vertex coloring(that would look like fire)
3) are a must for a REAL MDL edited model.
CnP the first 2 geosetanims(Since they refer to the first 2 geosets, and we have 2 copies of those geosets.) and put
them as the last geosetanims. Change their IDs to 4 and 5 respectively. Now CnP
Code:
	GeosetId 5,
so you can get the 'spaces' which are created by tab right. Then delete that value, leaving the 'spaces' then enter
Code:
	static Color { 0, 0.5, 0.9 },
This is the vertex coloring, in BGR form. Do that to both of the geosetanims.
So you get
Code:
GeosetAnim {
	Alpha 8 {
		DontInterp,
		40267: 1,
		100100: 0,
		113600: 0,
		176667: 1,
		177667: 0,
		178000: 0,
		180000: 0,
		180033: 1,
	}
	static Color { 0, 0.5, 0.9 },
	GeosetId 4,
}
GeosetAnim {
	Alpha 8 {
		DontInterp,
		40267: 1,
		100100: 0,
		113600: 0,
		176667: 1,
		177667: 0,
		178000: 0,
		180000: 0,
		180033: 1,
	}
	static Color { 0, 0.5, 0.9 },
	GeosetId 5,
}

You are done! Now for the little addition, you can make the geoset bigger so it appears as a seperate layer above
the original mesh(like Cookie's Fire Infernal). Go to both of the geosets, Add 3 to EVERY coordinates of every vertices.
If the value is negative, make it -3, so they will go further from the origin by 3 units in xyz axis. That will 'enlarge'
the model. It is tedious and time consuming, I know. That is why patience is needed! :) I've done this before so many times
lol. So anyways here's an example
From
Code:
	Vertices 455 {
		{ 96.2245, -29.1532, 69.6575 },
		{ 89.1451, -22.9421, 74.3438 },
		{ 95.8924, -29.1638, 61.5637 },
		{ 91.8675, -22.9966, 61.723 },
		{ 24.1103, 0.37503, 84.9669 },
		{ 24.7768, 0.37503, 94.0652 },
		{ 31.6054, 9.09599, 79.764 },
		{ 42.4421, 17.8187, 95.3328 },
		{ 21.3428, 0.37503, 105.891 },
To
Code:
	Vertices 455 {
		{ 99.2245, -22.1532, 72.6575 },
		{ 92.1451, -25.9421, 77.3438 },
		{ 98.8924, -32.1638, 64.5637 },
		{ 94.8675, -25.9966, 64.723 },
		{ 27.1103, 3.37503, 87.9669 },
		{ 27.7768, 3.37503, 97.0652 },
		{ 34.6054, 12.096, 82.764 },
		{ 45.4421, 20.8187, 98.3328 },
		{ 24.3428, 3.37503, 108.891 },
and apply it to every vertices. Now you are truly done!

I've added the finished product, so you can use it as reference. :) Yes, the Chaos Spider in RoTD was done this way.

Here's a screenie of it:



And my old avatar, with TToR's crystal dragon done the same way:



EDIT 19/2/08:

If you want a smooth texture animation, then you can use a Linear translation. Example:

Code:
	TVertexAnim {
		Translation 2 {
			Linear,
			GlobalSeqId 0,
			0: { -1, -1, 0 },
			7000: { 0, 0, 0 },
		}
	}

1 will be basically the largest X or Y coordinate in your image, while -1 will be the outside of the image (if you imagine your image being tiled up), opposite of 1. Etc a 0.5 on a 256x256 image will be the 128 of X or Y in it, while -0.5 will be -128.
The translation basically moves ALL coordinates in the TVertex (the unwrapping) by the amount it states. I'm not sure if rotation will work or not, never tried it before.

EDIT 21/2/08:

It's tested that Rotation works as well. I've only tested rotating around the Z axis (because that's the only one that's useful, assuming you unwrapped your mesh flat down.)

Code:
	TVertexAnim {
		Rotation 2 {
			Linear,
			GlobalSeqId 0,
			0: { 0, 0, 0, 1 },
			1750: { 0, 0, 0.707107, 0.707107 },
			3500: { 0, 0, 1, 0 },
			5250: { 0, 0, 0.707107, -0.707107 },
			7000: { 0, 0, 0, -1 },
		}
	}

This will rotate the texture 360 degrees (around).
Thanks to Oinkerwinkle for the calculator to get the angles :P.
__________________

Last edited by Alfred : 02-21-2008 at 09:33 AM.
Alfred is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 10-28-2004, 06:29 AM   #2
RodOfNOD
Da Rodinator
 
RodOfNOD's Avatar


User Project: GrŁesome
 
Join Date: Jan 2003
Posts: 394

Submissions (1)

RodOfNOD will become famous soon enough (51)RodOfNOD will become famous soon enough (51)

Approved Map: Wartego

Default

Extremely cool shit. One minor thing is there are 3 tiny places both the top/inside of spideys knees and just the right/back side appear to have been missed.

Once again though COOL SHIT!
RodOfNOD is offline   Reply With Quote
Old 10-28-2004, 12:47 PM   #3
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


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

Submissions (37)

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

Hero Contest #3 - 2nd Place

Default

Oh no!, now everyone will know the secret!
__________________
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 10-29-2004, 03:37 AM   #4
BlinkBoy
User
 
BlinkBoy's Avatar


Respected User
 
Join Date: Dec 2003
Posts: 835

Submissions (4)

BlinkBoy has a spectacular aura about (97)BlinkBoy has a spectacular aura about (97)BlinkBoy has a spectacular aura about (97)BlinkBoy has a spectacular aura about (97)

Outstanding Tutorial

Default

Quote:
Originally Posted by Lord Vexorian
Oh no!, now everyone will know the secret!

well i alrdy knew it and actually i'm trying to make a program to add them, to bad i can get the proper codes in visual basic to do that.
__________________
Tools:
NeoDex - a Gmax and 3ds Max modeling Toolset for Wc3!

Learn to animate! check out my: Basic Animation Tutorial!

Currently working at a sequel to my animation tutorial.
BlinkBoy is offline   Reply With Quote
Old 10-29-2004, 07:46 AM   #5
Alfred
User
 
Alfred's Avatar


Respected User
 
Join Date: May 2003
Posts: 840

Submissions (6)

Alfred is on a distinguished road (17)

Send a message via MSN to Alfred
Default

Quote:
Originally Posted by BlinkBoy
well i alrdy knew it and actually i'm trying to make a program to add them, to bad i can get the proper codes in visual basic to do that.

Well great achievement then. I knew this thing like in november last year.
__________________
Alfred is offline   Reply With Quote
Old 10-29-2004, 08:44 AM   #6
Armel
User
 
Armel's Avatar
 
Join Date: Oct 2003
Posts: 661

Submissions (1)

Armel will become famous soon enough (27)

Default

That's one of the few things in mdl editing I had never tried to learn, thank you very much, this is cool. Just one suggestion: for the rescaling, use Oikerwinkle's vertex modify program: this should make it easier (use of markers + scaling). Moreover, as you can see on the cryptfiend, there are bugs in some parts, mainly the legs: the new and old ones don't overlap in the right way. So I suggest using vertex modify to finis it so as to make a perfect job.
One question: I'm working on a jellifish, what material effect do you suggest I use (the one I used makes it look too much like a ghost).
Armel is offline   Reply With Quote
Old 10-30-2004, 01:36 PM   #7
Alfred
User
 
Alfred's Avatar


Respected User
 
Join Date: May 2003
Posts: 840

Submissions (6)

Alfred is on a distinguished road (17)

Send a message via MSN to Alfred
Default

Probably a blend material with a static alpha value of 0.5 perhaps?
__________________
Alfred is offline   Reply With Quote
Old 11-01-2004, 07:39 PM   #8
Armel
User
 
Armel's Avatar
 
Join Date: Oct 2003
Posts: 661

Submissions (1)

Armel will become famous soon enough (27)

Default

I'll try this, thanks
Armel is offline   Reply With Quote
Old 06-30-2006, 09:08 PM   #9
Jarock
User
 
Jarock's Avatar
 
Join Date: Mar 2006
Posts: 37

Jarock has little to show at this moment (2)

Send a message via AIM to Jarock
Default Can't access page

Hey I can't access that page with the program converter.

"YobGuls' Fileconverter Get it here"

It says do not have promission to access page.

How do I get it?
__________________
Jarock

Working on: Conker Live N Reloaded
Jarock is offline   Reply With Quote
Old 08-12-2006, 09:17 AM   #10
BertTheJasser
xyzi - our universe
 
BertTheJasser's Avatar
 
Join Date: May 2005
Posts: 742

Submissions (2)

BertTheJasser has a spectacular aura about (111)BertTheJasser has a spectacular aura about (111)BertTheJasser has a spectacular aura about (111)BertTheJasser has a spectacular aura about (111)

Default

Same problem, plx update the link. Thx.
__________________
Note: Bye... I had a lot of fun here!
Special thanks to Vexorian who helped me learn jass, the real jass and always helped me when problems occured, I would call him somehow my mentor. Pipedream, who made amazing Grimoire and helped me acclerating my map (currently at 99% finished, no developement atm).

Vote for Linux Ports in general of Blizzard products: http://www.PetitionOnline.com/ibpfl/
BertTheJasser is offline   Reply With Quote
Old 05-13-2007, 08:49 PM   #11
TheSecretArts
Galaxy Scripter
 
TheSecretArts's Avatar
 
Join Date: Mar 2007
Posts: 1,077

Submissions (2)

TheSecretArts will become famous soon enough (38)TheSecretArts will become famous soon enough (38)

Send a message via AIM to TheSecretArts Send a message via MSN to TheSecretArts Send a message via Yahoo to TheSecretArts
Default

this will help me with my Ragnaros im making . GJ!
__________________
I have officially moved exclusively to Starcraft 2 mapmaking.
Project: Escape Velocity: Nova Reloaded
Don't expect me to finish this project lol...
TheSecretArts is offline   Reply With Quote
Old 02-19-2008, 12:41 PM   #12
Alfred
User
 
Alfred's Avatar


Respected User
 
Join Date: May 2003
Posts: 840

Submissions (6)

Alfred is on a distinguished road (17)

Send a message via MSN to Alfred
Default

Updated, but obviously link isn't fixed yet.
__________________
Alfred 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 09:43 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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