Documentation/Entity Types/Base/CubemapZone.type
From NeoAxis Engine Wiki
| Language: | Status: | Approved |
Contents |
Description
For some projects creation of static environment maps may be required. For example, you can use a drawn cubic texture to emulate reflections on various materials. CubemapZone.type serves this purpose.
CubemapZone.type is used for creating static environment 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 of the map load) and is not further refreshed. Thus, no CPU and grafics card time is consumed by texture rendering.
This object may be used for multiple purposes.
Using CubemapZone.type to create reflections on materials
Materials use CubemapZone.type as a static texture for creating reflections. Although for a realistic image it is required to refresh the texture with each frame, for the sake of increased rendering speed it is refreshed only once during the map load.
So, that is how it works. CubemapZone.type is a sort of a zone(region). As long as an object stays within this zone this object's materials use the cubic structure of this zone. By placing several zones you will get several cubic textures with the materials using the corresponding zones. For example, you can use one panorama with an image of a street and another one with an image of a room.
A map can also contain a global zone used when an object is staying in none of the given zones.
Working with object in Map Editor
Functions
You can already see the result of CubemapZone operation while creating a map in Map Editor.
For example, if you change object's location, you can update the cubic texture by pressing the Update button in CubemapZone. If CubemapZone is relocated, the texture is updated automatically.
Export to file
You can also export a cubic texture by pressing Save to file... button.
Properies
CubemapZome Properties
| Name | Description |
|---|---|
| CustomTextureName | A custom texture to use instead of a generated one. |
| GlobalZone | 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 in no CubemapZone, the one with the parameter GlobalZone set to True is used. |
| NearFarClipDistance | Value area for camera range. Only objects in the specified distance are used for generating the cubic texture. |
| TextureSize | The size of the generated texture. |
