This is a guide for thermal imaging in VBS2 beginning first with a technical description and followed by a practical guide for putting this feature to use in with your own content. The modelling of the whole thermal environment in VBS2 is complex and each detail can be modified if necessary. All of the foundation for the thermal environment is prepared already in VBS2, but will be explained in detail so users have get a complete understanding.
IMPORTANT – The capability to view thermal profiles during editing was first introduced in the Development Suite v1.20, please ensure that you are using the latest release. Visit the support forums at https://forums.bisimulations.com/ or email support@bisimulations.com if you have any questions about this.
The default world configuration file (config.cpp) contains four arrays of twelve values each describing a temperature curve throughout the year, in degrees Celsius. Each member of the array represents a month, starting with January:
To see these values in game you can enable diagnostics from the developer console by executing:
The first step in setting up a thermal profile for a vehicle or a person is to define the six thermal properties within the model.cfg file:
Example of values we are using for people and vehicles:
class VBS2_Man : Default
{
htMin = 60;
htMax = 1800;
afMax = 30;
mfMax = 0;
mFact = 1;
tBody = 37;
...
This has already been setup in the base classes for all people and vehicles and weapons in VBS2 so there should be little need to apply your own values here. Up to this point, the thermal properties apply to the entire model, so if a vehicle's engine starts, the entire model will begin to warm up at the rate of htMax up to a temperature of afMax, likewise if it begins driving, the entire model will heat up at the rate specified by htMax to a maximum temperature of mfMax.
In order to map out areas of the vehicle which should heat at different rates we use a bitmap mask, or a thermal texture. It's important to see that this thermal map is *not* a visible texture so we aren't just painting white in the areas that we want to see white in game. Each channel has a job to do:
When complete, this thermal texture should be saved as a TGA file with a filename suffix of *_ti_ca.tga
This texture is not mapped onto the model directly, instead an RVMAT text file is used, a TI class is added to it, and then this rvmat is assigned to the each face using the material slot (every face of a P3D model can have a colour bitmap and an rvmat assigned to it).
The TI stage in the rvmat should look like this:
It can be appended in existing RVMATs or it can be added to a new rvmat with no other contents.
Copyright © 2011 Bohemia Interactive Australia Pty Ltd All Rights Reserved