I'm not sure I agree.
First. Fog doesn't effect a single object. It will have to effect the entire scene. Otherwise.. well.. that is retarded.
you can't have a black background, with an object effected by white fog. You'll have a grey background. That white fog will lighten up the background.
Lets say. You have green glass, at the edges you'll have very transparent green glass as it AAs into the background. Cover that with white fog, and you now have lighter-more-muted-green nearly-transparent glass... Over a grey background. Or- grey with a very slight green tinge... which is exactly what you need.
In the center of the glass, you'll have lightened up, and also more muted green glass at 50% transparency over a grey background. Which is again... what you need.
Unless we are talking about some un-realistic magic fog that doesn't do what real fog does... in which case... why are you bothering with any kind of realism in the first place?
You could even. And this is getting really trippy. give each sprite a 'fog map' which is a set of alpha values specific to how fog should cover the object... Could be useful if there is a fan, or something else (as it could animate and create whisps of fog) Then, the fog blanket combines with that fog-map to create the color and relative thickness of the fog.. thickness being analogue to alpha.
that would enable you to kill 2 birds with one stone. You set anything that isn't the sprite to 100% transparency. And AA in the fog around the object. And you can then push out and take in the fog around the fictional geometery of the sprite. Since fog will get less transparent the thicker it is and the more of it you are looking through.
In other words. A closed bottle will lock out all the fog. While an open one will have a lower transparency around where you can see the 'inside' of the bottle... So it 'fills' with fog. And can even be animated to make it slosh about inside the bottle in the fictional current that runs through the map.
The fog map would take into account the 'back' of the sprite as well.. And anywhere there isn't a sprite, the engine adds in filler-fog... based on a giant fog-map that is defined by the background tiles/image.
I mean... if you are going to do fog.. Might as well make it dynamic fog..
Regardless.. I don't see how what you said effects anything.
as long as you are creating an alternate sprite, with the transparency of the origional sprite and the color changes of the new sprite. It should work.
If your sprites have outlines.. like cartoons.. you would have to have a fog-map to define the areas less effected by the fog. so you don't bleach out the outlines which defy logic.
First. Fog doesn't effect a single object. It will have to effect the entire scene. Otherwise.. well.. that is retarded.
you can't have a black background, with an object effected by white fog. You'll have a grey background. That white fog will lighten up the background.
Lets say. You have green glass, at the edges you'll have very transparent green glass as it AAs into the background. Cover that with white fog, and you now have lighter-more-muted-green nearly-transparent glass... Over a grey background. Or- grey with a very slight green tinge... which is exactly what you need.
In the center of the glass, you'll have lightened up, and also more muted green glass at 50% transparency over a grey background. Which is again... what you need.
Unless we are talking about some un-realistic magic fog that doesn't do what real fog does... in which case... why are you bothering with any kind of realism in the first place?
You could even. And this is getting really trippy. give each sprite a 'fog map' which is a set of alpha values specific to how fog should cover the object... Could be useful if there is a fan, or something else (as it could animate and create whisps of fog) Then, the fog blanket combines with that fog-map to create the color and relative thickness of the fog.. thickness being analogue to alpha.
that would enable you to kill 2 birds with one stone. You set anything that isn't the sprite to 100% transparency. And AA in the fog around the object. And you can then push out and take in the fog around the fictional geometery of the sprite. Since fog will get less transparent the thicker it is and the more of it you are looking through.
In other words. A closed bottle will lock out all the fog. While an open one will have a lower transparency around where you can see the 'inside' of the bottle... So it 'fills' with fog. And can even be animated to make it slosh about inside the bottle in the fictional current that runs through the map.
The fog map would take into account the 'back' of the sprite as well.. And anywhere there isn't a sprite, the engine adds in filler-fog... based on a giant fog-map that is defined by the background tiles/image.
I mean... if you are going to do fog.. Might as well make it dynamic fog..
Regardless.. I don't see how what you said effects anything.
as long as you are creating an alternate sprite, with the transparency of the origional sprite and the color changes of the new sprite. It should work.
If your sprites have outlines.. like cartoons.. you would have to have a fog-map to define the areas less effected by the fog. so you don't bleach out the outlines which defy logic.