Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Screen Fading/Transition Effects w/DX8?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Chango
Neophyte

5 Posts

Posted - Aug 26 2005 :  1:53:15 PM  Show Profile  Reply with Quote
Hello,

I am currently looking for a way to make the screen fade to black as a transition effect between screens using VB6 and DirectX8.1

I have looked for tutorials regarding this subject and the closest thing I could find was the 'gamma ramp' tutorial at gpwiki. Unfortunatly this example use DX7, not DX8. (this method dosen't seem to be supported by DX8 anyway)

I'm thinking that the answer has something do do with alpha blending the entire backbuffer surface, but other than that I'm unfortunatly rather clueless about how to implement this.

If anyone has any code or suggestions, that would be rather helpful

Thanks,

Chango

Eric Coleman
Gladiator

USA
811 Posts

Posted - Aug 27 2005 :  08:40:58 AM  Show Profile  Visit Eric Coleman's Homepage  Reply with Quote
Just render a black square over the entire window, and then slowly transition from 0 to 1 or 1 to 0 for the alpha component to either fade to and from black. Of course, you can change the color of the square to fade to any color you want.

Go to Top of Page

Spodi
Warrior

USA
142 Posts

Posted - Aug 28 2005 :  12:14:06 PM  Show Profile  Visit Spodi's Homepage  Send Spodi an AOL message  Click to see Spodi's MSN Messenger address  Send Spodi a Yahoo! Message  Reply with Quote
Another method would to take 4 triangles, and make them open/close over the screen. Say this is your screen:

_______
|........|
|........|
|_____|

Hardcore, huh? To create a triangle-close, create a triant at each side. 2 of the points will be the complete distance of the side, and the 3rd point (the peak) will be right in the middle. Now have the middle point on all 4 sides move to the center at a predefined rate - simple. :) To create a triangle-open effect, just go from the end to beginning.

It is totally up to your imagination. Something that I always thought would be fun would to, when you exit a map via the side (in this case, up), copy the whole screen as a new texture (to prevent losing any of the view, and for simplisity sake) then stop rendering the normal game - just render this texture over the screen (kind of like a screenshot). Move it down until it reaches the bottom on the screen and out of sight. Now for the next part, just draw the NEW map onto another texture, and do the same thing but pull it down from the top.

Again, it's all up to your imagination. :)

vbGORE
Go to Top of Page

Threshold
Squire

USA
44 Posts

Posted - Sep 24 2005 :  10:36:49 PM  Show Profile  Reply with Quote
I like to do what Eric posted (I've never done Spodi's transition, but it sounds cool). I usually have a graphic that is simply a 1x1 white pixel. Then I stretch it and color it and fade it to suit my needs all over the place: health bars, selection boxes, fading effects, backgrounds, etc.

Life is short. They say "don't waste it, have fun." They're right, don't waste it...but DO redefine "fun."
Go to Top of Page

Chango
Neophyte

5 Posts

Posted - Oct 14 2005 :  1:26:48 PM  Show Profile  Reply with Quote
Thanks, that all actually helped out quite a bit. I chose to go with a triangle close effect that looks just awesome.

Thanks,

Chango
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.09 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.