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

Scaling a texture ( Texture Animation) ?

Status
Not open for further replies.

Ardenian

A

Ardenian

I thought it would be neat to add a Stand 2 animation to my Spectrum Analyzer with a scaling texture,
simulating a change of the amplitude and such.

However, if I enter values to the Texture Animation's slot Scaling, nothing happens, scaling-wise.

I entered, for example:
Code:
1: { 1, 1, 1 }
500: { 1, 0.75, 1 }
1000:  { 1, 1, 1 }
 
Level 18
Joined
Aug 13, 2007
Messages
1,584
You have to edit both the X and Y values (the first two) and set interpolation to Linear. Don't remember having seen a model with scaling texture animation, though. Or rotation, for that matter. But translation works fine.
 

Ardenian

A

Ardenian

Aight, seems Magos cannot preview texture scaling.
It works now, thank you!
Though you don't need to set x and y, only y works, too.
 

Ardenian

A

Ardenian

There are rare cases where you would need or use it, I guess.
 
Level 18
Joined
Aug 13, 2007
Messages
1,584
Magos disassociates texture animation from the material layer upon saving. That is, you must save the model as mdx, open it in notepad, find the material and the particular layer and assign the texture animation manually. Then convert with MDLXConv.
 

Ardenian

A

Ardenian

Yup, NhazUl, I had to learn that the hard way. One can open it in the notepad after converting it to mdl though, adding 'TVertexAnimId 0' to the wished material layer, as seen here: http://www.wc3c.net/showthread.php?t=86737
Then, after opening it in Magos, Texture Translation is shown and saved properly, forever.

Thanks, General Frank! ( nice example by the way!)
 
The "All material layers must use the same texture animation" problem is one I've known for a long time, but one of my models actually had this part:
Code:
Material {
		Layer {
			FilterMode AddAlpha,
			Unshaded,
			static TextureID 11,
		}
		Layer {
			FilterMode Additive,
			static TextureID 12,
			static Alpha 0.200000,
		}
		Layer {
			FilterMode Additive,
			static TextureID 7,
			static Alpha 0.080000,
		}
		Layer {
			FilterMode AddAlpha,
			static TextureID 9,
			TVertexAnimId 0,
			static Alpha 0.200000,
		}
		Layer {
			FilterMode AddAlpha,
			static TextureID 10,
			TVertexAnimId 0,
			static Alpha 0.200000,
		}
	}
And guess what, that material managed to have exactly the 2 topmost layers animate and leaving the rest static in-game. I honestly don't know what black magic was involved in that. This was supposed to be impossible. I tried to replicate in a different model and I couldn't get that kind of texture animation to work again.
As a matter of fact, I've attached the model so you can examine it.
 

Attachments

  • Cloudy night sky with moon.mdx
    3.5 KB · Views: 37
Last edited:
Well, TVertexAnimID is the ID of the texture animation. 3 of your layers just don't have one assigned.
What I meant is, it's supposed to be impossible to have 3 static layers and 2 moving layers in one material get separate animations in-game, but the model I attached somehow managed to get it working.
 
Again, why would that be impossible? how does the number of layers change anything, each layer is its own thing.
Not that it's impossible in the sense that it will give an error when you load WC3, but that the game won't display texture animations properly in that case. The graphics engine couldn't handle it I guess.
 
Status
Not open for further replies.
Top