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

Moving textures

Status
Not open for further replies.
Level 12
Joined
Mar 13, 2012
Messages
1,121
I read the Animated Textures Tutorial but I still cant figure out how to do moving textures as I want.

The problem starts here:
Code:
100: { 0, 0, 0 }
250: { 0, 0.8, 0 } 
251: { 0, -0.8, 0 } 
500: { 0, 0, 0 }

Ok, the first number is the keyframe but what are the next three ones in brackets? I experimented a lot with it but couldnt get it to work on my model (basically just a flat rectangle on the x/y axis)

Is there any indepth tutorial or can you explain me what the numbers mean? If possible for Rotation and Scaling too..
 
Level 8
Joined
Feb 21, 2005
Messages
110
They look like coordinates of some sort, but on the other hand they are called TVertexAnimation... which would require only two coordinates since you can only move in U/V direction, which is also what the first two values seem to do.
I never used this a lot, all material animations I did so far were with nonstatic textures.
Gonna try around a bit.

Edit:
The first number moves the texture in X(or U)-direction, the second number in Y(or V)-direction.
They range from -1 to 1, so if you want to "slide" the whole texture through the geoset make a linear movement from -1 to 1, using the first number in the brackets for horizontal movement and the second for vertical movement.
I tried around with the third one a bit, but I haven't seen any effect on the texture.

Edit 2:
A gif says more than a thousand words.
The model is a simple rectangle with the ping circle texture centralized.
(if anyone tells me how to do spoilers I'll use them, but right now they're not even 1MB together so I hope they aren't too annoying)

TVertexAnim_U_01.gif


TVertexAnim_V_01.gif



If you put these:
Code:
WrapWidth,
WrapHeight,
in the texture information, they fill empty space by repeating the texture.
 
Last edited:
Level 12
Joined
Mar 13, 2012
Messages
1,121
Okay, thanks a lot. My test also didnt show any use of the third number in brackets.

Do you have any information about rotation?
The scheme for rotation is
Code:
0: { 0, 0, 0, 0 }

I tried looking into wc3 models but none seems to use this : (
 
Level 8
Joined
Feb 21, 2005
Messages
110
Yeah I spent a lot of time checking rotations, but I don't know much.
I mostly edit them using trial-and-error, or using some templates I took out of WC3 models (for example a 360° rotation over time which I got from lightning shield.

I am pretty sure that they use quaternions, but I fail to understand how they work.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Okay, I found this here:
http://www.wc3c.net/showthread.php?t=79038

I read it and tried a simple rotation as given there as example but my texture did not move a bit : (

e:when you say you edit them using trial-and-error, can you give me an example that works? I need a very easy rotation..
 
Last edited:
Level 8
Joined
Feb 21, 2005
Messages
110
e:when you say you edit them using trial-and-error, can you give me an example that works? I need a very easy rotation..
Well I just played around with values and checked what happened.
It's actually not too difficult, once you got something moving into the right direction you can just decrease/increase the values until it fits.
Should use linear interpolation for that, of course.

One example would be a "Reaper's Scythe" swing I made:
Code:
Rotation 7 {
		Linear,
		0: { 0, 0, 0, 1 },
		600: { -0.2, 0, -0.4, 1 },
		1200: { -0.4, -0.1, -0.8, 1 },
		1300: { 0, 0, -0.3, 1 },
		1400: { 0, 0, 0.1, 1 },
		1500: { 0.4, -0.1, 0.5, 1 },
		2000: { 0.4, -0.1, 0.5, 1 },
	}

I planned how it should look like, i.e. where it should be at which time, started with the extreme positions like the starting point, the final haul-off-point etc. and interpolated a bit until I was content with it.

Here's what I had in the end (only the scythe without proper materials here, not all the effects and transparency and stuff):
Scythe.gif

(gif doesn't have many frames, looks quite smooth ingame or in the editor)

Looks a bit weird now that I know what the values mean of course... had basically no idea what I was doing back then, as you can see when checking the 4th coordinate.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Ok thank you for the example.

I know now why my rotation didnt work at all. Somehow the Texture animation Id which I can choose in the 'Material Manager' is never the same like the one in the 'Texture Animation Manager'.

Do you know how I can fix this? I know how to convert to mdl and open it.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Hm ok, could you explain what I have to do?

Here my problem in detail:

In 'Material Manager' in the only material I use I can choose as 'Animated Texture ID' the 'TextureAnimation 0165BB98'.

But in the Texture Animation Manager' my actual animation is 'TextureAnimation 0166BB30'


e: wait, what is this? All other example models I use which use translation as texture animation also have different IDs in those two places but work -.-....
 
Last edited:
Status
Not open for further replies.
Top