Documentation/Entity Types/Base/StaticMesh.type

From NeoAxis 3D Engine Wiki

Jump to: navigation, search
Go to higher level


StaticMesh 01.jpg

Almost every project has a lot of static objects on the map. For example tunnels, separate rooms, hallways, rocks, towers, buildings, etc. There are two ways to make this kind of objects:

  • With StaticMesh.type,
  • With a object type (.type file) and then its location on the map.

Each method has it pluses and minuses.

There is no need for a special type for created object while using StaticMesh.type. All that you need is to place the model (.mesh file) on the map and configure settings for each objects location. This method is good in using for creating a large static objects (buildings, rooms and geometry, etc.)

The other way requires to create an object type (.type file). The benefit is that you can set the object parameters once and just use it on the map then. Moreover, you should use this way if you want to add interactivity to the object (for example, to change some parameters at the real time). The process of creation and using object type is described in creating a simple object type tutorial.

Here we will describe the first method of the location of static objects on the map.


We will examine the creating an object type like StaticMesh.type on the example of location the tree on the TankDemo map. There are already a lot of trees on that map, which were put here with StaticMesh.type.

StaticMesh 02.jpg

To add a new tree to the map, you should choose "3D Model" property page in the Map Editor's object creating window , and then select TankDemoTree01.mesh file which is located in "Data\Maps\TankDemo\Resources\Meshes\Trees" folder.

StaticMesh 03.jpg

Now you should place the tree at the editor's working area and left-click. Then place the rest trees. When it is enough objects on the map, press the spacebar.

StaticMesh 04.jpg

The object has a line of parameters that are described below. As an example you can turn on the displaying of dynamic shadows on trees. To do that, click on it at the working area and set the True value of the CastDynamicShadows parameter.

StaticMesh 05.jpg

When this parameter will be turned on, the shadows from trees will display.

StaticMesh 06.jpg


Name Description
class Entity
Components List of attached components.
LogicClass Reference to the Logic Editor class. Read more about how to work with the Logic Editor class.
Name Object name.
Tags User defined information. Defined as keyvalue pairs. It is used for user's needs.
Type Object type. It can not be changed.
class MapObject
Position Object position on the map.
Rotation Object rotation. The angle of rotation is set in degrees.
Scale Object scaling.
class StaticMesh
AllowDecals Enables / disables the attachment of decals to this object. Decals can be the marks of bullets or explosions. You can choose among three values: All, OnlySmall, or No.
AllowGeometryInstancing Enables/Disables Hardware Geometry Instancing Technology for the object. This is a special technology for decreasing of video card graphical calling quantity.
AllowStaticBatching Enables/Disables batch operation for rendering optimization (joining up a quantity of 3D meshes into a one for rendering and physics calculation speed increase). This mode can be attuned with the StaticBatchingRenderingEnabled property in Map.type.
СastDynamicShadows Enable/Disable the generation of dynamic shadows on the object.
СastStaticShadows Enable/Disable the generation of static shadows on the object.
Collision Enables/Disables rendering collisions with the object. If it set to the False, the other physical bodies (eg. characters) will pass through the object.
СollisionMaterialName Physical material name. Allows you to select from 8 values - Default, Metal, Wood, Rubber, Ice, Grass, Dirt, Tarmac. This parameter affects the properties of the interaction between physical bodies. For example, if you place the card box on the map, change the setting to Ice and push it in the simulation mode, it will roll in the surface and slide like on ice.
СollisionSpecialMeshName The name of special model for collisions. This option allows you to change the geometry of collisions for this object. Can be used to facilitate the rendering of complex physical objects. If you specify a different mesh, it is the mesh that will be calculated while collisions, and that mesh that was set in MeshName parameter will be visible.
CollisionVehicleDrivableSurface Enable/Disable the using of the object as a surface for cars riding.
Enabled Enables/Disables the object.
ForceMaterial New material name for the object. It is the material, that will be used if it is specified. If the material is not selected, then the basic materail of 3D-mesh will be used.
MeshName 3D-mesh file name.
RecieveStаticShadows Enable/Disable to draw shadows on this object. If this option is set to the True, the shadow cast by other objects will be drawn on it.
RenderingDistance The distance between the object and the camera, after which the object is not visible. A value of 0 means that it is always visible.
RenderingDistanceForShadows The distance between the object and the camera, after which shadows of objects are not visible. A value of 0 means that it is always
RenderQueueGroup Defines rendering of the object relative to other objects. It can be used for nontransparent material objects only. The TransparentObjectSortPriority parameter is used for transparent material objects.
SplitGeometry Enable/Disable to cut the mesh automatically into small pieces that match the size set in SplitGeometrySize. This allows managers to filter out the geometry of the scene that were not in the screen much more better. It is recommended to used this parameter for large objects, ex. for rooms, buildings with a character inside.
SplitGeometryPieceSize The size pieces in the automatically cutting mode. It is used when SplitGeometry parameter is set. The higher the value is, the larger the pieces are.
TransparentObjectSortPriority Transparent objects sorting priority. It sets a spot of the object in the line for transparent objects rendering. It is used for transparent material objects only. RenderQueueGroup parameter is used for nontransparent material objects.
Map Editor
AutoVerticalAlignment Automatical alignment by height mode. Allows to set the value among 4 variants: None (without alignment ), ByBounds (by dimensions), ByBoundsWithRotation (by dimension with possible rotation), ByCenter (by center).
Layer The layer of the map these objects belong to.