🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Fade out

Started by
8 comments, last by altair734 24 years, 5 months ago
I was wondering how to do a fade out in DirectX. I am in 8 bpp mode. For some reason I can get it to work when I decrease each palette entry by 1 but then try to get it to go faster it does the 60s! altair altair734@yahoo.com crawlegend.iwarp.com
altairaltair734@yahoo.comwww.geocities.com/altair734
Advertisement
Why not try decreasing by more than one? Or multiplying by 0.9 (or another number) for so many frames? Multiplying by more than 1.0 will get you a fade to white as well.
Well I try decreasing it by 3 or 5 and it just gets all colory. I have no idea what''s wrong.

altair
altair734@yahoo.com
crawlegend.iwarp.com
altairaltair734@yahoo.comwww.geocities.com/altair734
It worked!

altair
altair734@yahoo.com
crawlegend.iwarp.com
altairaltair734@yahoo.comwww.geocities.com/altair734
How are these fades done in HiColor quickly? If you calculate the color values of each pixel it is soooo sloooooow....
(There must be a way to to it faster - i''ve seen it in ''Age of Kings'', for example).
I''m guessing fades in high color are done mostly with alpha effects.
Since I have the fade out now, does anyone know how to do fade ins?


altair
altair734@yahoo.com
crawlegend.iwarp.com
altairaltair734@yahoo.comwww.geocities.com/altair734
Altair: Just the same way. You begin with setting all your colors in the palette to black, paint your image to screen. Now all you have to do is increase the values for your colors until they are right. Note that some colors will stop fading in before others...

Sicrane: I think you are right but wouldn''t it be TERRIBLY slow?
Fading in high color is done with alpha blending. Two things to consider when doing it is one, do all blending in system memory (it''s faster), and two, take advanage of things like mmx. There''s an article on blending the the tuts section of the site.
Write more poetry.http://www.Me-Zine.org
my alpha blending routines blit a 640x480x16 image at 18 fps, not that bad after all? for doing a fade its quite sufficient

This topic is closed to new replies.

Advertisement