Infrared camera

From SIMboxWiki
Jump to navigation Jump to search

The infrared camera feature enables the user to render the world scene in a way that will simulate a real-life Forward-Looking Infrared Radar (FLIR) camera. This type of camera renders the world according to the heat emitted by different objects in the environment.

This document discusses the implementation of the infrared feature in the graphic engine, and the methods by which it can be controlled.

This feature is supported from version 5.6 for SimiGon Graphic Engine Version 5 (SGEV5) only.


Controlling the Infrared Environment

The infrared camera feature was developed with ease of use in mind (from a developer stand point). The feature will work without any special setups or preparations. However, some work may be required to get a more realistic feel. This work is required in order to tell the graphic engine the amount of heat emanating from the different objects in the scene, and the way the camera should translate those temperatures to an image.

Control Over Objects

This section specifies how to control the look of objects within the infrared camera.

Infrared Specific Textures

Heat distribution on a given object rarely has anything to do with the colors with which an object is usually rendered. It is therefore advisable to provide an alternate textures which will be used specifically in infrared cameras.

Providing Infrared Textures

To provide infrared textures:

  • For each material in the model, create a replacement texture.
    Notice: Some materials have more than one texture unit; infrared, however, uses only a single texture for each material.
  • As each infrared texture replaces a material, not a texture unit, name each texture with the material as it appears in 3ds Max (for example, without the file name prefix that appears in the material file) with the suffix "_ir". So, for example, to replace a material called “person/face” in the material file, create a texture called “”.
  • Place the texture in the same directory as the model.
Infrared Texture Color Channels

Be mindful of use of color channels (RGB) in infrared textures. Each color channel can be controlled individually in the simulation. This can be used to simulate different parts of an objects heating up in different situations.

For example, an infrared texture of a vehicle can be rendered with one color for the area of the wheels, one color for the area surrounding the engine and a third color for the rest of the vehicle. Then during the run-time the wheels and area surrounding the engine can be simulated to heat up or cool down depending on whether the vehicle's engine is running and the speed in which it is moving.

Temperature Range

Different objects may emit different ranges of temperatures. A person will usually emit higher temperatures than a wooden shacks. Different objects may also change their temperature over time. A car will heat up once the motor starts running.

There are 2 interfaces in the graphic engine which help cover those 2 principals. The first is a script based system which allows for setting the initial temperature of an object (per model). The second is a graphic engine API which allows control over the temperature of an object.

Default Value Assignment

To specify the default temperature range of a given object:

Add a script file to the directory containing the object model you wish to control. This file should have the name of “[model name].model”.

Add the following text to the script file:

 model [Model filename]

		temperature_min [minimum temperature]
		temperature_max [maximum temperature]

	… [Other model properties]



  • This script is usually redundant as in most cases the simulation will override these default values with its own values coming from simulation properties.
  • This script only sets the temperature range of the red color channel. Green and blue color channels are set to 0.
Run-time Value ssignment

To control the temperature range of an object during run time you may call the graphic engine API functions TriD::SetInfraredObjectAttrib() and TriD::GetInfraredObjectAttrib().

Temperature Calculation

The calculation of the temperature of an object at any given point is done in the following manner. The calculation relies on 3 parameters:

  • The base temperature of an object
  • The heat range of an object specified per color channel (Red Green and Blue)
  • The color of the texture at the appropriate position per color channel (Red Green and Blue).

The final temperature will be calculated as:

 [Final Temperature] = [Base Temperature] + 
     [Heat Range (Red Channel)] * [Texture Color (Red Channel)] +
     [Heat Range (Green Channel)] * [Texture Color (Green Channel)] + 
     [Heat Range (Blue Channel)] * [Texture Color (Blue Channel)]

Advanced Object Control

There are ways to gain further control over the coloring of objects. A user can manipulate the temperature/color of different areas in the same object during run time. These features however require more complex script files and are not in the scope of this document.

For further details on this subject please contact support.

Control Over Environment


In the terrain, much like objects, the temperature/color of the terrain is interpolated from 2 parameters. The color of the terrain as provided by its textures and the temperature range of the terrain (the range of temperatures the terrain may emit).

The graphic engine provides interfaces to control the temperature range. Note however, that there is currently no mechanism by which “infrared textures” may be provided for the terrain. The terrain textures used by the infrared cameras are the same for infrared and non-infrared cameras.

The temperature range can be controlled from 2 interfaces:

  • The first interface is the terrain script file that allows for control of how temperatures are calculated in different areas of the terrain.
  • The second interface is the graphic engine API that allows for control of the minimum and maximum temperature range of the terrain.


Another important factor to consider is the effect of the environment’s ambiance. This factor is controlled by 2 important factors. The ambient temperature and the visibility factor. Ambient temperature refers to the temperature of the surrounding air in the atmosphere. The visibility factor refers to the distance at which objects appear to have the same ambient temperature (much like normal visibility).


Most of the parameters discussed in the above sections are controlled by the graphic engine API functions TriD::SetInfraredGlobalAttrib() and TriD::GetInfraredGlobalAttrib(). The exception to this rule is the visibility-factor parameter which is controlled by the graphic engine API function TriD::SetVisibility() and TriD::GetVisibility().

Controlling Infrared Cameras

There are several parameters to note when configuring a camera to use the infrared camera feature.


The first and simplest parameter is the activation parameter. Each camera may be controlled individually as to whether it should be rendered with the infrared feature turned on or off.

Temperature Range

The temperature range parameter refers to the minimum and maximum temperatures between which the scene is rendered. Temperatures equal or lower than the minimum temperature range will be drawn in black. Temperatures equal or higher than the maximum temperature range will be drawn in white. The rest will be drawn in various shades of gray.

Note: You can invert the camera colors by switching between the minimum and the maximum temperature range values.

Sensor Acclamation and Interference

There are 2 other parameters which are important to simulate the difficulty of “reading” an infrared camera.

Sensor acclamation refers to the fact that in real life, infrared sensors are relatively slow. When presented with quickly changing levels of hot and cold temperatures, the sensors will take time to change their indications. This is more commonly known as the smear effect produced by fast moving objects passing in front of an infrared camera. The speed in which the sensors respond can be controlled in the simulation of the infrared camera.

Interference refers to the fact that real life infrared cameras usually produce a less than clear image or the environment. This is especially true in low temperature variance environments. The graphic engine simulates the same interference pattern common to infrared cameras and enables the user to control it.


The parameters discussed in the above sections are controlled by the graphic engine API functions TriD::SetInfraredCameraAttrib() and TriD::GetInfraredCameraAttrib().

Using Infrared Cameras in Practice

Simulation Interface

Note that this document represents the graphic engine interface for the video camera. ACO developers may need to use the simulation’s higher API interface rather than using the graphic engine’s interface directly. This is to avoid problems which may occur to sources attempting to update the same parameters thereby overriding each other.

Video Camera

It is important to disable any other full screen effect (for example, night vision, gray scale and invert) when generating a video camera that uses the infrared feature. This is both to increase performance and to avoid visual issue that may occur from the combination of several video camera effects.