Crossfade transitions

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
crimsoncipher
Posts: 4
Joined: Thu Sep 08, 2005 3:16 am

Crossfade transitions

Post by crimsoncipher »

Has anybody been able to successfully do a crossfade/dissolve between two scenes in Irrlicht? I am rendering one scene to a texture and then modifying the alpha values on the vertices of a quad and rendering the quad (with the render-to-texture) over the other scene. The problem arises when I draw the quad. If I use EMT_TRANSPARENT_ADD_COLOR, the quad is always 50% transparent, no matter the alpha values on the vertices. If I use EMT_TRANSPARENT_VERTEX_ALPHA, there is much more of a fading effect, but it looks like the world is plunging into the sun (ie, its extremely bright). None of the other material types seem to help much, altho I haven't tried them all. I'm presuming that in the first case, the problem is that the rendering is done with A1R5G6B5 color format. I tried changing a few values in the irrlicht source code to A8R8G8B8 color format, but no use, even though I am creating the device in 32 bit mode. In the second case, It appears that the problem is that the color from the quad is "added" to the color value of the underlying scene, thus making everything look ultrabright. Does anybody have any suggestions, particularly ones that don't involve much irrlicht-source modification?
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Don't know maybe this helps: irr::gui::IGUIInOutFader
Fade out your 1 scene to black, then fade in your 2 scene...
dorvo
Posts: 2
Joined: Thu Dec 09, 2004 7:56 pm

Post by dorvo »

Now, if I wanted to make a fading effect like VALve did when you activated the menu, where the scene was only partially faded, would I have to render the scene to a texture and then apply a certain color at a specific intensity? Or would there be some way to use IGUIInOutFader for that?
sRc
Posts: 431
Joined: Thu Jul 28, 2005 1:44 am
Location: Salt Lake City, Utah
Contact:

Post by sRc »

niko mentioned in his TODO list on the CVS server that that's one of the things he wants to implement

EDIT: specifically it says:
-material for fading out scene nodes.
The Bard sRc

Blog | Twitter
Post Reply