Texture animation

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
marcin.mat
Posts: 1
Joined: Wed Feb 16, 2011 2:23 pm

Texture animation

Post by marcin.mat »

Hi!
I tried to export model with animated texture (animating texture offset in material editor) but I see no effect in viewer.
Animation via transform of the UVWs doesn't work neither.
Please help. I am using MAX 2009 and Panda exporter.
Bear_130278
Posts: 237
Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation

Post by Bear_130278 »

I think, you'll have to implement such animation by yourself...
It's pretty easy.....
You just need to adjust a texture matrix of the material.
Look

Code: Select all

	if(Time-LastTime>=100)//1/10 second
	{
		LastTime=Time;
		X+=1.0f/32.0f;//There are 32 frames in the animation, the value is from 0.0f to 1.0f
		TONode->getMaterial(1).getTextureMatrix(0).setTextureTranslate(X,0.0f); 

	}
:D
Do you like VODKA???
Image
Image
Post Reply