   Creating a universal "glow"
  I'm trying to come up with a way implement improved vision in my game (much like the night vision in CS) by providing some sort of glow to the entire screen.  It won't have any textures and won't filter any colors or stuff like that, it just simply creates a purplish background instead of a dark black background (if you've played EQ and had ultravision, it would be exactly like that).  I'm toying around with my friend's code but I usually use OpenGL and he is using DirectX, so I'm not exactly a DirectX guru Can anyone help me out with a link or a better name for this term for me to google?   Half the people you know are below average.Trogdor the Burninator[edited by - Kaezin on February 2, 2004 11:58:46 PM]
  Normally, when you want the scene to be dark, you turn the light off or make it very low.  So, if you want a colored glow of some kind, turn the light on a little, but change it''s color to another color.  That''s the basic idea that you''re looking for I think.Chris ;  Well you could maybe apply a green colored quad that has alphablending enabled, onto the view matrix. It might work I haven't tried it though :/ You'd probably still need a light of some sort enabled when "night vision" is enabled. You could probably add a directional light to the camera x,y,z coordinate and have it position itself on the target the camera is currently on and then the light would look like a flashlight in a sense.. kinda like nightvision. Maybe make it a green colored light.   [edited by - DevLiquidKnight on February 2, 2004 2:40:54 PM];  Add ambient light..? ;  I figured I''d have to resort to using light sources to do something like this, was just wondering if there was an easier way around it.  I''ll try the alphablended quad though and see how that works out. ;  Green ambient light and fog. ;quote:Original post by Supernat02  Normally, when you want the scene to be dark, you turn the light off or make it very low.  So, if you want a colored glow of some kind, turn the light on a little, but change it''s color to another color.  That''s the basic idea that you''re looking for I think.Hmm this reminds me of the discussion about night vision, where someone remarked that the really bad games just put a green 90% transparent 2D quad on the screen, or just use a green material. If you want a glow effect, you see color extending outside the object, like a fog. How to do it, I don''t know. ;  Well, analyze what night vision does: it increases perceptible light levels by making everything green (apparently).  So, why not take the lighting information and instead of applying detail textures to the scene, apply a simple 1D texture 'palette' of colors (green -> white) that correspond to a pixel's light intensity.  I think that would work well.EDIT:I just realized I didn't point out the advantage to a palettized texture: it doesn't have to be linear, which is more like real nightvision.  And another point, you don't have to index into the palette using light intensity.  What I did was have another effect (infrared) was use a 'heat' value to index into black -> blue -> red -> white texture and it turned an awesome infrared goggles effect!Chris PergrossiMy Realm | "Good Morning, Dave" [edited by - c t o a n on February 3, 2004 10:50:37 AM];quote:Original post by Fidelio66  Hmm this reminds me of the discussion about night vision, where someone remarked that the really bad games just put a green 90% transparent 2D quad on the screen, or just use a green material. If you want a glow effect, you see color extending outside the object, like a fog. How to do it, I don''t know.There was a joint presentation by NVIDIA and ATI, but I forget at what conference, where they explained how they helped develop the glow effect for TRON 2.0.The main idea was that they would render the glowing objects to a seperate render target.  The glowing objects were rendered with just the normal color the use (they wouldn''t be glowing yet).  Then they would blur the rendered image.  It is this blurring that causes the objects to look like they''re glowing.  After blurring was done, they would switch the render target back to the backbuffer and render the scene but without the glowing objects.  Then they would take the blurred surface and put it on top of the back buffer.Granted, I''m glossing over some of the details (like the depths of the blurred objects and such), but the main point is that the glow effect was done through blurring.neneboricua ;  Night vision is typically just a magnifier of light, and green is used because the human eye can determine more shades of green than other colors.  So to model after that is pretty easy, doesn't need to be complicated.  I would just use a green ambient light at low level and maybe adjust the contrast to make it sharper.You could also use gamma functions to change the green gamma.  In fact, that would seem to be the easiest approach to me, simply calling a single function, but the hardware must support it.  I think it's pretty much synonymous with using a palettized texture...yes?I like Chris' idea about using a heat value too.I don't think a glow around the objects is realistic as far as using night goggles, but it might make for a more interesting scene.  ChrisEDIT:  The more I think about it, adjusting the gamma might not be a good idea since black will no longer be black (I think...).  If it does work though, let me know.   [edited by - Supernat02 on February 3, 2004 3:12:11 PM]