#3650 - Ninj4D4n - Tue Mar 04, 2003 3:09 am
Hey, I understand how to do general alpha blending between sprites and and bacgrounds and such. I just have some quick questions about ways to use this.
1) Can you give differenct sprites different amounts of transparancy? (ex. Sprite 1 is very clear glass and Sprite 2 is very dark glass.)
2) Is there a way to fade the amount of transparancy across a sprite?
(ex. Sprite 1 is a piece of glass that is dark on the left and clear on the right, and fades between)
3)What's the best/working way to create a fog effect?
--Ninj4D4n
#3668 - DekuTree64 - Tue Mar 04, 2003 7:21 pm
You can only have one transparecny level at a time, so all sprites/BGs will be the same. You can change that level on HBL though, so you can fade things from top to bottom, but not left to right. And for fog, my favorite type is to put kind of whispy clouds all over, kind of white with light grey shades and some transparent areas (or whatever else you want), and then have it slowly scroll in whatever direction you like. And if you really want to spiff it up, add a slowly scrolling sine wave-type effect to the horizontal position on HBL too.
But really there aren't any rules when it comes to fog and stuff, so just mess around with it until it looks good.
#3681 - tepples - Wed Mar 05, 2003 2:20 am
Yes, it is possible to do variable transparency in sprites. Remember how games on old computers with 1-bit-deep displays created shades of gray? They did it with dithering. If you dither your sprite's alpha channel down to 1-bit, you can fake a fog layer. And if you change your dither pattern after every other vblank, it won't look as fake.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#3685 - DekuTree64 - Wed Mar 05, 2003 4:16 am
That's true. And come to think of it, when I had a sprite flicker on/off every frame, it looked more like just half-transparency on hardware (looked fine on my slow-as-a-slug computer though, but I fixed it to wait a few frames so it really flickers now^^), so you could use real alpha blending, dithering, and flickering all at the same time to make lots of different levels.
#3686 - darkcloud - Wed Mar 05, 2003 5:26 am
You might want to browse through the posts in this topic:
http://forum.gbadev.org/viewtopic.php?t=124
One post (I think on the first page) has a link to Touchstone's super-transparency article, which you might want to check out also.
_________________
Maybe in order to understand mankind, we have to look at the word itself: "Mankind". Basically, it's made up of two separate words - "mank" and "ind". What do these words mean ? It's a mystery, and that's why so is mankind.