   Heat sensative vision
  I''m working on adding a IR vision mode for my game and i''ve been thinking about how i''ll do it.1.) Switch the textures to a heat texture.2.) Move the light to come right out of the camera.3.) Disable lighting, and shadows.4.) Tween the texture coordinates where a = original coordinate, b = a blue color coordinate, and the tween value is the dot product of the light and the normal.The last step is hte most important, if it works shouldnt the textures always fade out to havinga blue edge. This would look nasty on sharp objects i think but as long as your characters where well rounded it would taper off.How does that sound, or better yet, how do you really do it? 
  Metaballs + marching cubes? ;  I think you could fake it with environment mapping. ;  People are good at giving one line answers round here. If the OP knew how to fake it with environment mapping then he would be doing so. Please explain your suggestion or give screenshots at least.The AP ;  What he meant (I think) is to use a spherical environment map, with red at the center fading to blue at the edges. In a typical model the thickest part of the model will have normals pointing mainly toward the camera, so will pick out the red center of the environment map. The sillouhette polys will be pointing at the blue parts of the environment map.As a first stab at the idea I would use a combination of the dot product with the normal and camera direction, with a per-vertex heat value. The dot product would basically work like the environment map idea, normals pointing at the camera give a value of 1, sillouhette normals give 0. Add that to the heat value for the vertex and pass it into the pixel shader. In the pixel shader use that value to index into a colour ramp from red to blue. Add some screen-space noise and/or distortion and that should look okay. ;  What about having two vertex streams, one with all your normal view information in it, then a second which just contains heat specific data (i.e. just contains vertex colours). Then you can use either the vertex colours from your normal stream or the heat vision stream depending on the current mode.   ---------------------------------------Let''s struggle for our dream of Game!http://andrewporritt.4t.com;  I''m sorry,i posted one line about environment mapping just because what OP are talking about at first glance looks like environment mapping(and because for environment mapping we already have nice API routines).Also i think environment mapping could produce nice results.I meant that OP''s method could be replaced with environment mapping (and i think it will looks as good as what''s he are talking about)****When light comes from camera,there''s already are dot-product of direction to camera and surface normal.Some self-luminance textures + light from camera,and all ok.IR vision aren''t as sharp as normal vision are(except if IR eye are really big). Image should be blurred very much,and,in result,everything will look fine enough.What is really needed,it''s good animation.For reptiles you could increase heat value of points where muscles are when muscles are working,and slowly decrease when aren''t.I mean,at each timestep, dT/dt =  (thermal_power - (T-Tair)*thermal_conductivity)/thermal_capacity;where T mean temperature,and thermal_power may depend to muscles activity,or become zero when "object" dies.Also,when you''re shoting from the gun,shoted point should be red and should fade out....I haven''t done anything like that myself,it''s pure theoretizing.Also,i never saw something related in the web. ;  My second question was gona be how to make it blurry and grainy.As for the 2 streams, if you simply apply a heat texture instead of a regular texture. The image will look just like it was a rainbox or something, IR vision is like depth, you see through the object sort of.I was thinking what if i had a second set of geometry, blobs of colors, rendered these to an off screen texture, blurred it outwards and faded it to cold. Rendered the model to the stencil buffer, and draw a quad over the screen so that the blurred texture shows up in place of the character?I think that like the metaballs idea. I''ll have to look up marching cubes. ;  If you already have implemented something like volume fog,you could use that - as result of rendering volume fog you have for each pixel how long light travels inside fog.So,if object are replaced with fog,that''s the index in color table...As about metaballs:it''s not very fast,and will not looks very good.You may try to summ several 2d functions in screen space,that may produce even better results.Blurring:some time ago i saw article about blurring on  Gamasutra...main idea was to render image,then build something like mipmaps,then mix ''em together, with different weights.Because heat vision have not very good resolution,  you could make it looks like hexagonal grid of big hexagonal pixels(and you don''t have to blur something)...it''s not very realistic but al least looks funny.I think it could be done in pixel shader.To get idea how it looks in real,use google search for *heat vision images*http://www.aspecttechnology.com/thermalsent.htm ;  also note:usually "IR" vision systems are only able to detect near IR,not rays of 100F (36 C) heat. (usually NightVision systems uses 900nm lamps for lighting,it''s only bit out of visible part) 