Altered Reality@Posted: Mon Sep 24, 2007 5:17 pm :
I already know how to make a basic (static) texture and how to write an item into a .mtr file, to tell the engine what images to use for diffuse, bump and specular. But what about animated textures? Is there any tutorial about how to create one?



rich_is_bored@Posted: Tue Sep 25, 2007 7:03 am :
How you create an animated texture is largely dependent on what your goal is.

Some animation effects can be handled by the engine internally via stage specific keywords like scale, translate, rotate. A good example of this would be scrolling lava.

It's also possible to dynamically alter the parameters of a keyword for a whole range of other effects. Case in point, the burn away effect seen when enemy bodies disappear.

And as a third option you can also use image sequences via ROQ movie files or multiple stages with conditional statements.



Altered Reality@Posted: Tue Sep 25, 2007 8:49 am :
Quote:
And as a third option you can also use image sequences via ROQ movie files or multiple stages with conditional statements.

I'd say this is my case. I want to make a LED panel flashing various phrases. What do you mean with "multiple stages with conditional statements"?



rich_is_bored@Posted: Tue Sep 25, 2007 10:05 am :
Like this...

Code:
shaderdemos/testAnim {
   {
      if ( ( time * 4 ) % 3 == 0 )
      map      gfx/misc/console01.tga
   }
   {
      if ( ( time * 4 ) % 3 == 1 )
      map      textures/base_wall/panel01_d.tga
   }
   {
      if ( ( time * 4 ) % 3 == 2 )
      map      lights/window.tga
   }
}



pbmax@Posted: Tue Sep 25, 2007 1:52 pm :
just look at how id did it.

Code:
textures/particles/flame1
{
   qer_editorimage textures/editor/flame_strip.tga
   noSelfShadow
   translucent
   noShadows
   twosided
   deform tube
   {
      blend add
      map textures/particles/flame_strip.tga
      scale 1 / 32 , 1
      scroll table32[ time * .6 ] , 0
      clamp
   }
}


flame_strip.tga is a single image made up a series of smaller flame images. then every frame or so this material shader shifts the image 32 units over thus making it look animated.



Altered Reality@Posted: Wed Sep 26, 2007 7:28 am :
Thanks a lot.