Fading between screens
Blitz3D Forums/Blitz3D Programming/Fading between screens
| ||
Does anybody have any ideas as to how I can fade between two screens in Blitz3D? At first I thought about rendering both images to a flat mesh like a sprite and fading the alpha on one to reveal the other but I want to fade between two screens of at least 800x600 but Blitz doesn’t seem to like textures larger than 512x512 so does anybody know of how I can achieve this? |
| ||
You can use 1024 X 1024 textures! Just make sure you design the images in something larger and in the correct aspect ratio of the screen. Then shrink the image to 1024 X 1024. It'll look funny in the imaging program but then when you load it in Blitz it'll look right. |
| ||
Weeeell 1024 has never worked on mine, promise ya, it draws random noise down the sides of the texture. Anyway, reducing even 800 x 600 to 1024(if it were to work which it won't) that will give the image a very blurred look. |
| ||
Oh ... Voodoo Banshee card! Yeah that won't work with 1024 X 1024 texture! You could do it with smaller ones ... just make sure they're power of 2 I guess they won't look so good. You could probably also make a 2D routine. If you draw the images at relatively increasing and decreasing frequencies you could get some form of alpha. |
| ||
Couldn't you do a LightColor command with negative numbers to make things darker and then brighter? Or do you need one image to darken as the other brightens at the same time? |
| ||
'I thought about rendering both images to a flat mesh like a sprite and fading the alpha on one to reveal the other ' I've done this for intro screens, but the images end up slightly blurred, and when you replace the last with the actual bmp for clarity there' a noticeable visual blip. For changing 3D scenes, I ended up 'childing' a black cube to the camera whose alpha lightens to reveal the new scene. It's... acceptable. |
| ||
what about rendering two cameras positions? on each level make a mock up of the starting point of the next level, and fade them? EG. position camera,1,1,1 ; do fading bit position camera,1,-200,1 ; this is off the current level ; do fading bit renderworld() |
| ||
This would all be fixed with a cameraalpha command. |