Archived

This topic is now archived and is closed to further replies.

SmiLeY1k2k

fading splash screens.

Recommended Posts

hooded_paladin    122
I don''t think so, but there is just a basic idea. Check out a tutorial on blending. To fade between two textures, you would problably blend them together, the old one going from full opacity to none and the new going the opposite way. As in, the opacity for the first one goes from 1 to 0, etc. If this is still over your head I''ll try to explain blending quick to you...


To make sure teen mothers don''t just dump their babies in trash cans-
We''re going to let them kill them instead.

Share this post


Link to post
Share on other sites
omega_001    122
To do transitional fading you need two things your first image and then your second image

start your first image with an opactity of 1.0f in glColor4f()
and your second image with an opactity of 0.0f

every frame minus 0.01f off your first images opactity and add 0.01f opactity to your second image.

Do this until your second image has reached 1.0f. The result being a faded scene

p.s. remember to enable blending

Share this post


Link to post
Share on other sites
NaliXL    120
Should be fairly simple, I think : You take the RGB value of every pixel of both images, and for each R, G, and B value, you take the difference with the value of the other image. Divide that value by the number of steps you want to take to fade ''em. Add that value every step to the pixel.

Hope I did make myself clear...

Share this post


Link to post
Share on other sites
Buster    100
Hey man, you don''t need a Fading Splash Screen, you need a Flaming Logo!

Flaming Logo >> Fading Splash Screen

Share this post


Link to post
Share on other sites
smart_idiot    1298
quote:
Original post by Buster
Hey man, you don't need a Fading Splash Screen, you need a Flaming Logo!

Flaming Logo >> Fading Splash Screen


It's 'Flaming Logo > Fading Splash Screen', bitshifting doesn't make any sense.

Don't use two variables, use one, and write glColor4f(1.0f,1.0f,1.0f,val); for one, and glColor4f(1.0f,1.0f,1.0f,1.0f-val); for the other.

I think you can write glColor4b(0xff,0xff,0xff,val); and glColor4b(0xff,0xff,0xff,~val); if you're using bytes (unsigned char), instead.

On second though, the back image should be solid, and just the front one should fade. Whatever. Have fun.

[edited by - smart_idiot on March 20, 2002 11:30:07 AM]

Share this post


Link to post
Share on other sites