3d & 2d, full & window fade?

Blitz3D Forums/Blitz3D Beginners Area/3d & 2d, full & window fade?

LamptonWorm(Posted 2007) [#1]
Hi,

I've been searching the forums and code archives and found a few 2d and 3d fade routines, and one 3d over 2d.

But I'm after one that does 2d over 3d (e.g. simple scene one cube with text command used to say hello world), and it fades everything in/out (i.e. not just 3d), and works in window and full screen mode.

Any ideas?

Cheers,
LW.


chwaga(Posted 2007) [#2]
I'm not quite understanding you, do you mean, like place a black colored sprite directly in front of the screen, and increase its alpha for a fade effect? vise versa could be 2d to 3d.


LamptonWorm(Posted 2007) [#3]
Hi,

Basically if I've got a mixture of 2d draw, text and 3d entities on screen, is there is single 'best' way to fade everything on the screen in/out?

The methods I tried seem to only do just 2d or just 3d, the one that did both used CameraClsMode iirc but that meant 2d rendered 'behind' 3d, not much good for displaying your score etc.

I guess summing this up I need 'gamma' type behaviour for windowed app :)

Cheers,
LW.


Kev(Posted 2007) [#4]
SetGamma and UpdateGamma should do what you need, theres an example that comes with blitz on there use.


LamptonWorm(Posted 2007) [#5]
Hi,

I thought the Gamma commands only worked in fullscreen? I'm after an all-round solution if there is such a beast :)

Cheers,
LW.


JazzieB(Posted 2007) [#6]
Draw your game screen, then the quad to fade this, and then your score and other stuff you don't want to fade last. You can switch from 3D to 2D back to 3D as many times as you need to.


LamptonWorm(Posted 2007) [#7]
Sorry for being a pain guys, but I want everything to fade, so 2d text over 3d objects, everything fade to black (paint it black, cue guitar), the whole screen. Save as setting gamma, but needs to work in window mode also.


chwaga(Posted 2007) [#8]
well, I don't know how fast this would be, but you could read every pixel on the screen, and subtract n from each RBG, and have n increase every fade loop. Prabably be uber-slow, but "/shrug".


Buggy(Posted 2007) [#9]
There's always the idea of having 2D text actually be 3D sprites, in which case the 3D-big-sprite-in-front-of-camera idea would work.

Alternatively, couldn't you also have a big animated image that you put in front of everything? It is animated so that different frames are different amounts of fading. It may not be as nice as alpha if done sloppily, but you could do it well, and it would also fade both 2D and 3D with one stone. Ha!


LamptonWorm(Posted 2007) [#10]
Cheers for the ideas folks. Perhaps getting everything 3d is best, and fast in the long run.