Reflection Textures (FBX)
- Last UpdatedMar 12, 2025
- 2 minute read
A Reflection Texture is a realtime engine-generated texture that is represented by a dummy object whose user buffer presents a $ReflectionTexture structure.
-
This texture is used to render realtime reflections.
-
The reflection can also be blurred (Blurred Reflections.
Note: It is not necessary to exclude the Mesh that use this texture from the rendering of the reflection (through the parameter szExcludeMesh) because the engine will do it automatically.
What is a reflection?
|
Reflection in computer graphics is used to emulate reflective objects like mirrors and shiny surfaces. Reflection on a shiny surface like wood or tile can add to the photo-realistic effects of a 3D rendering. |
Code example
This is a code example for reflection texture.
$ReflectionTexture
{
szID = ReflectionTextureA
szTextureDetail = High
szGeometryDetail = Medium
iRefreshFrameRate = 2
c3BkgColor = 0.2 0 0.1
$Commands
{
szPlaneMesh = MeshPavimento
szExcludeMesh = MeshConTroppiPoligoni
}
}
Texture dimensions
If the dimensions go beyond the frame buffer resolution, the first power dimension of two that is smaller than the frame buffer will be chosen.
|
Detail Level |
Resolution |
|---|---|
|
lowest |
64×64 |
|
low |
128×128 |
|
medium |
256×256 |
|
high |
512×512 |
|
highest |
1024×1024 |
Parameters
szID
-
Identifier (name) of the texture that will be created.
szTextureDetail
-
Texture size.
-
Default: high
-
Range: [lowest .. highest]
szGeometryDetail
-
The level of detail of the geometry rendered in the texture.
-
Default: medium
-
Valid values: medium, high.
iRefreshFrameRate
-
Indicates how many frames the texture will be updated.
-
If the value is zero (0) or negative, the texture will be updated to each frame.
-
Default: -1
-
Range: [-inf..inf]
c3BkgColor
-
Color of the background.
-
Default: 0 0 0
-
RGB [0..1]
$Commands
-
Structure that contains extra commands for creating and rendering the texture.
$Commands Parameters
szPlaneMesh
-
Identifier (name) of the mesh that will be used as a reference for the plane of reflection, which serves to render the texture.
-
Mesh can also be animated, but its vertices must not be deformed.
-
Mesh polygons must form a single plane for rendering reflections to work properly.
-
This parameter is necessary.
szIncludeMesh
-
Includes this mesh in texture rendering; automatically excluding all other scene meshes.
-
In practice, when using this parameter, you must manually specify all the meshes to draw.
-
When using this parameter, its inverse (for example, szExcludeMesh) can not be used.
-
This parameter is optional, and can be repeated multiple times.
szExcludeMesh
-
Excludes this mesh in texture rendering.
-
When using this parameter, its inverse (for example, szIncludeMesh) can not be used.
-
This parameter is optional, and can be repeated multiple times.