Don''t worry, I''m not going to ask you how to do it, but rather do you think it would be easiest?
Not only could you use it for the fog of war, but also for limiting LOS in an RPG.
Too costly, too hard, too slow, too much!? I want to hear what you think ...
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
"It is far easier for a camel to pass through the eye of a needle if it first passes through a blender" -- Damocles
Whaddya reckin : glFog for RTS fog of war?
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
Personally, Id probably do it like this:
Draw the terrain
Draw translucent blended polys at a set height above the visible ground, but not around your own units/buildings.
Draw all the possible visible units and buildings
That way, seeing as the units/buildings arent depth sorted against the "fog of war" polys, and they are trying to be drawn below, any part of them that is under the fog wont be drawn, and any part of them that sticks out of the fog will be drawn. Seeing as the terrain is drawn before the fog though, it will still be visible under the fog.
Draw the terrain
Draw translucent blended polys at a set height above the visible ground, but not around your own units/buildings.
Draw all the possible visible units and buildings
That way, seeing as the units/buildings arent depth sorted against the "fog of war" polys, and they are trying to be drawn below, any part of them that is under the fog wont be drawn, and any part of them that sticks out of the fog will be drawn. Seeing as the terrain is drawn before the fog though, it will still be visible under the fog.
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement