Torque Shader EngineTorque Shader Engine Documentation
CVS Revision Label 0.1.x

Atlas Engine Runtime Reference

This section discusses three major aspects of the Atlas engine runtime: the script interface, the runtime parameters, and the C++ code layout. Together, knowledge of these sections will result in familiarity with how the runtime operates.

C++ Reference

The Atlas engine resides in the Atlas sub directory. The header files are annotated with Doxygen-compatible comments, which fully explain the functioning of the various classes and components of the terrain. The terrain itself is self-contained, and should not require any modifications to existing objects to work properly.

If you should require a C++ reference, simply run doxygen on the TSE codebase and refer to the appropriate sections. Or, you can read the comments, which are what the Doxygen documentation is generated from.

Script Reference

There is only one class exposed to the script system, AtlasInstance. Beyond the position and rotation fields, these are the other important fields:

AtlasInstance Fields

tqtFile

Path to the .TQT file for this instance.

chunkFile

Path to the .CHU file for this instance.

detailTexture

Detail texture for the terrain.

materialName

Name of the CustomMaterial used to render this instance. "AtlasMaterial" by default, and likely best to leave it that way. Don't change this if you don't know what you're doing. Will not work except with custom shaders!

There is one method of note, which is purge(). This method causes all paged-in resources for the geometry and texture files to be unloaded, forcing the system to page everything in from scratch.

Runtime Parameters Reference

Runtime parameters can be access from the console to control various aspects of the runtime behavior of the Atlas engine. They have global, immediate effect, and are not networked.

Atlas Engine Runtime Parameters

$AtlasInstance::showChunkBounds
Render bounding boxes showing the extents of each currently loaded geometry chunk in the hierarchy. Color of the box ranges from yellow to red to black, indicating the relative amount of paging activity occurring on that node. Boolean, default is false.
$AtlasInstance::renderWireframe
Draw all Atlas geometry in wireframe mode. Boolean, default is false.
$AtlasInstance::synchronousLoad
If true, performs all loading each frame in the main thread. If false, performs all loading in a background thread. Boolean, default is false.
$AtlasInstance::lockCamera
Debug parameter. Locks the camera position for testing LOD and culling code. Boolean, default is false.
$AtlasInstance::collideChunkBoxes
Debug parameter. For raycasts, treats chunks as big boxes. Useful for debugging raycast code. Boolean, default is false.
$AtlasInstance::collideGeomBoxes
Debug parameter. For raycasts, treats the nodes of the collision quadtree in a chunk as big boxes. Useful for debugging raycast code. Boolean, default is false.

In engine/atlas/atlasTQTFile.cpp, there is a variable AtlasTQTFile::smDumpGeneratedTextures, which controls a debug feature of the TQT generation code. If set to true, it will cause every subtexture generated by the TQT code to be dumped to the current working directory of the game. This is useful for diagnosing problems with the generation code.