# infrared scene creation

This topic is 2945 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi All:

Does anyone know if there is any good graphics package, library, tools or api to create a infrared scene please?

Thanks

##### Share on other sites
Your monitor can't emit an infrared image, and your users can't see it either, so don't bother.

In other words: What exactly are you trying to do?

##### Share on other sites
Night-vision goggles effect I'm guessing.

##### Share on other sites
Should be easy enough to do with a post-process shader.

float4 PixelShader(float2 texCoords) : COLOR0{	float3 inputColor = tex2D(Sampler,texCoords).rgb;	float lum = pow(.333 * (inputColor.r + inputColor.g + inputColor.b),.5);	return float4(0,saturate(lum),0,1);}

Take the brightness of each pixel (r + g + b)/3, raise it to a power less than one (to give it that overexposed effect that ir cameras have when looking at really bright sources), then map that value to the green channel and set both r and b to 0.

##### Share on other sites
The shader above would be a night-vision effect, I guess.

Do you want a heat image?
If so, you'd render the scene using heat textures (hot things white, cold things black). This gives an effect similar to the one in CoD:MW, in the scene involving the gunship.

You can then also map the resulting black-white image to a color-mapped heat image, using a 1D texture for example. This results in something like this:

##### Share on other sites
XeonT, the color cones in the eye are not equally sensitive, so just taking an average of the RGB channels is not a correct conversion to greyscale. Actual brightness is closer to dot(inColor, vec3(0.3, 0.59, 0.11)). When it's dark, rod cells (monochrome) predominate in the response and they peak between blue and green, so the transform vector would be different. For night vision, the sensitivity of the apparatus extends to twice the wavelength of red cells, so RGB doesn't make sense. Brightness is not what he really needs, because until you exceed 800*C there's no correlation between visible brightness and infrared brightness. What he should really do is store temperature either per object or as an additional texture channel, as Konfusius mentioned.

##### Share on other sites
Sure, all that is true. But this is computer graphics, and simply making shit up works great as long as it gets the look you want.

##### Share on other sites
Quote:
 Original post by PruneXeonT, the color cones in the eye are not equally sensitive, so just taking an average of the RGB channels is not a correct conversion to greyscale. Actual brightness is closer to dot(inColor, vec3(0.3, 0.59, 0.11)). When it's dark, rod cells (monochrome) predominate in the response and they peak between blue and green, so the transform vector would be different. For night vision, the sensitivity of the apparatus extends to twice the wavelength of red cells, so RGB doesn't make sense. Brightness is not what he really needs, because until you exceed 800*C there's no correlation between visible brightness and infrared brightness. What he should really do is store temperature either per object or as an additional texture channel, as Konfusius mentioned.

Of course of course, if you want physical accuracy. That's a handy little dot product to know, so thanks for that.

However, being a graphics programmer, I'm much more inclined to do as Promit says and use simple methods that produce good-looking results. And I must say - it often works with a lot less hassle than the whitepapers induce!

Still, I feel like this is a bit of a pointless discussion since the OP has still not indicated what he wants.

##### Share on other sites
Quote:
 Original post by PromitSure, all that is true. But this is computer graphics, and simply making shit up works great as long as it gets the look you want.

Promit, I submit that in most cases the look that is best to most is the look that is most plausibly realistic, with perhaps some visual enhancements. Of course, the obvious exception is NPR.
I'm using the term plausibly realistic as opposed to physically realistic but the two are closely related; the former simply implies a psychological/physiological-dependent weighting of the factors of whatever metric one is using to measure realism. So I think my comment was appropriate, even if I'm just expressing my opinion.

Quote:
 Still, I feel like this is a bit of a pointless discussion since the OP has still not indicated what he wants.

A discussion that goes on a tangent can still be worthwhile, even if the OP has been answered or has pulled a Houdini. Surely this is the reason for the "Please do not mark threads as 'solved'" sticky.

1. 1
2. 2
3. 3
4. 4
Rutin
14
5. 5

• 10
• 11
• 14
• 10
• 25
• ### Forum Statistics

• Total Topics
632651
• Total Posts
3007657
• ### Who's Online (See full list)

There are no registered users currently online

×