Is there an easy way to define/use an animated material in OGRE? I've looked through the discussions I could find on the topic, and the only way I've noticed is to use a controller to change the image as needed.
Ultimately, I'm going to be implementing many particle emitters. I could write them with normal non-animated materials, but for at least some of the emitters it would be useful to have animated particles (e.g. small explosions, etc.).
Thanks for your time.
Animated Materials Topic is solved
-
OberleutnantDan
- Gnoblar
- Posts: 5
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Milwaukee, Wisconsin, USA
anim_texture
Yes, There is support for this. Its all documented in the tutorials found on the Ogre main page.
Here is a link to the .material format.
http://ogre.sourceforge.net/Tutorials/1 ... im_texture
hope that helps
--Dan
Here is a link to the .material format.
http://ogre.sourceforge.net/Tutorials/1 ... im_texture
hope that helps
--Dan
-
SpannerMan
- Gold Sponsor

- Posts: 446
- Joined: Fri May 02, 2003 10:05 am
- Location: UK
I also have a question concerning animated materials, so I thought I'd post it in here.
I have an overlay with an animated texture. The texture and animation (a simple scroll_anim) are defined in a material file. I do not know exactly what processes go on in the background to keep these material's animated, but basically my material is no longer scrolling!
The only change made to my code (a rather big change, really) is that I moved my main game loop from a framelistener to a standard loop in a new class. This new class does not deal with an event time like it used to when it was in a framelistener. I wonder, could my materials animation cease working because I am not running any framelisteners?
It seems unlikely to me that this is the case. It's just strange how my overlays and all the materials are being displayed fine, but my material scrolling has stopped. Does any body have any ideas why this might be happening?
I have an overlay with an animated texture. The texture and animation (a simple scroll_anim) are defined in a material file. I do not know exactly what processes go on in the background to keep these material's animated, but basically my material is no longer scrolling!
The only change made to my code (a rather big change, really) is that I moved my main game loop from a framelistener to a standard loop in a new class. This new class does not deal with an event time like it used to when it was in a framelistener. I wonder, could my materials animation cease working because I am not running any framelisteners?
It seems unlikely to me that this is the case. It's just strange how my overlays and all the materials are being displayed fine, but my material scrolling has stopped. Does any body have any ideas why this might be happening?
-
cTh
- Halfling
- Posts: 81
- Joined: Wed Dec 11, 2002 10:47 am
- Location: Moscow/Russia
you must 'feed' the controller manager manualy if u dont use a frame listener, this code should help :
just fill the FrameEvent (mEvent.timeSinceLastEvent and mEvent.timeSinceLastFrame) structure with your timmings...
Hope this helps...
Code: Select all
SharedPtr<ControllerValue> ftc = ControllerManager::getSingleton().getFrameTimeSource();
FrameTimeControllerValue *cv = (FrameTimeControllerValue *)ftc.getPointer();
cv->frameStarted(mEvent);
Hope this helps...
-
SpannerMan
- Gold Sponsor

- Posts: 446
- Joined: Fri May 02, 2003 10:05 am
- Location: UK
-
dennis
- Gremlin
- Posts: 157
- Joined: Mon Nov 11, 2002 4:21 pm
- x 4
-
SpannerMan
- Gold Sponsor

- Posts: 446
- Joined: Fri May 02, 2003 10:05 am
- Location: UK
-
koushiro
- Gnoblar
- Posts: 5
- Joined: Sat Aug 28, 2004 3:57 pm
-
:wumpus:
- OGRE Retired Team Member

- Posts: 3067
- Joined: Tue Feb 10, 2004 12:53 pm
- Location: The Netherlands
- x 1