animated texture

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
gedimaster
Halfling
Posts: 99
Joined: Sun Sep 11, 2005 6:34 am

animated texture

Post by gedimaster »

i've been looking into the forum posts but couldn't find much info on animated textures. i'm trying to put together an explosion effect using a series of animated textures but there doesn't seem to be an example available.

can anyone point me to somewhere? thanks.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Post by xavier »

Render-to-texture is what you are looking for. A search on "RTT" or "render to texture" should turn up quite a few topics. The Wiki should also have RTT info as well.
gedimaster
Halfling
Posts: 99
Joined: Sun Sep 11, 2005 6:34 am

Post by gedimaster »

not really. i'm thinking of animated texture from a series of texture rather than procedurally generating them like in rtt.

say i have a series of 30 textures of a fire animation and i want to run through them like a repeated video on a billboard, how i can do that in ogre? via the material settings?
User avatar
discipline
OGRE Community Helper
OGRE Community Helper
Posts: 766
Joined: Mon May 16, 2005 12:09 am

Post by discipline »

Look at the DynTex demo.
User avatar
pjcast
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2543
Joined: Fri Oct 24, 2003 2:53 am
Location: San Diego, Ca
x 2
Contact:

Post by pjcast »

or alternatively, you can look at ogreaddons/videplugin/TheoraVideo which plays Theora Movies to a texture. A little overkill for this, but, it should also give you ideas.
Have a question about Input? Video? WGE? Come on over... http://www.wreckedgames.com/forum/
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

gedimaster wrote:not really. i'm thinking of animated texture from a series of texture rather than procedurally generating them like in rtt.

say i have a series of 30 textures of a fire animation and i want to run through them like a repeated video on a billboard, how i can do that in ogre? via the material settings?
See texture_anim in the manual. It does exactly that.
nfz
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 1263
Joined: Wed Sep 24, 2003 4:00 pm
Location: Halifax, Nova Scotia, Canada

Post by nfz »

Why not just use an animated texture? Check out the manual: http://www.ogre3d.org/docs/manual/manual_18.html#SEC58.

An Example:

Code: Select all

material MyAnimatedTexture
{
  technique
  {
    pass
    {
      texture_unit
      {
        anim_texture frame.png 30 1
      }
    }
  }
}
this will cycle through frame_0.png, frame_1.png, frame_2.png... upto frame_29.png in 1 second. So its animating 30 frames per second.

In Azathoth there is a limit of 32 frames for an animated texture. In Dagon there is no imposed limit.

[Edit] ok, wumpus typed faster than me[/Edit]
Post Reply