I want get the effect that every entity is gradually appearing, and the process takes about one second. How to realize it?
Anyone could help me? Great thanks!
How to get the effect?
- areay
- Bugbear
- Posts: 819
- Joined: Wed May 05, 2010 4:59 am
- Location: Auckland, NZ
- x 69
Re: Appearance Of Entity
Manipulate the materials of all the objects you want to fade-in every frame.
Here's a simple method, if your materials all had their diffuse texture as texture 0 and used 'alpha_blend' scene_blend mode.
where you change the variable 'theAmountOfAlphaDestired' each frame.
Here's a simple method, if your materials all had their diffuse texture as texture 0 and used 'alpha_blend' scene_blend mode.
Code: Select all
myEntity->getSubEntity(0)->getMaterial().getPointer()->getTechnique(0)->getPass(0)->getTextureUnitState(0)
->setAlphaOperation(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_TEXTURE, theAmountOfAlphaDestired);
-
- Kobold
- Posts: 36
- Joined: Mon Dec 05, 2011 2:23 pm
- x 1
Re: How to get the effect?
areay,thank u very much!