From NeoAxis 3D Engine Wiki
|Language:||English • Russian||Status:||Approved|
Some projects may need static environment maps created for them. For example, you can use a drawn cubic texture to emulate reflections on various materials. CubemapZone.type serves this purpose.
The object is used for creating a static cubic map. The whole scene from the object's positon is rendered into a texture with a 360° panorama as a result. The texture is created only once (at the moment the map is loaded) and is not updated further. Therefore, the scene rendering doesn't take any time. The texture recieved this way can be used for any purposes.
Using CubemapZone.type as the reflections on materials
Materials use CubemapZone as a static texture to create reflections. Although to obtain a realistic image it is required to update the texture with each frame, for the sake of increased rendering performane it is updated only once during the map load. However, you can turn on the texture refreshing mode for every scene using the UpdateEveryFrame property.
Object is sort of a zone (region). As long as an object stays within this zone materials of this object utilize the cubic structure of this zone. By placing several zones you produce several cubic textures with materials using each particular zones. For example, you can use one panorama with an image of the outdoors and another one with an image of the room interior. The map can also contain a global zone used when an object is staying beyond any of the given zones.
Working with object in Map Editor
You can see the result of CubemapZone operation as soon as you create a map in the Map Editor.
For example, if you change location of an object, you can update the cubic texture by pressing the Update button under the properties window (in this case the object CubemapZone should be selected in the map object window).
You can also export a cubic texture by pressing Save to file... button.
|AllowHDRCompositor||Enable/Disable the HDR-rendering technique while creating the cubic texture.|
|CustomTextureName||A custom texture to use instead of a generated one. If the texture is set, its generation is disabled.|
|DrawDynamicObjects||Enables/Disables the rendering of dynamic objects while textures are created.|
|DrawEffects||Enable/Disable the rendering of effects while textures are created.|
|Enabled||Enable/Disable activation of the object.|
|GlobalZone||Treat this zone as a global zone. If this is set to True the zone is used as a global zone. If this parameter is set to False the given CubeMapZone is only used when an object stays within it. If the camera is located beyond any CubemapZone regions, the one with the parameter GlobalZone set to True is used.|
|MaterialScheme||Material scheme name for texture generation.|
|NearFarClipDistance||The distance to the near and the further camera clipping plane. Only objects in the specified distance are used for generating the cubic texture.|
|ShadowsEnabled||Enables/Disables shadows while textures are generated.|
|TextureSize||The size of the generatetd texture.|
|UpdateEveryFrame||Whether or not to update the texture with every frame.|
|UseHDRTexture||Whether or not to use 64-bit texture. 16 bits for every color channel.|
|Components||List of attached components.|
|LogicClass||Reference to the Logic Editor class. Read more about how to work with the Logic Editor class.|
|Tags||User defined information. Defined as key — value pairs. It is used for user's needs.|
|Type||Object type. It can not be changed.|
|Position||Object position on the map.|
|Rotation||Object rotation. The angle of rotation is set in degrees.|
|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.|