This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

engine.render Functions

This set of functions and predefined variables exposes a number of renderer settings.

int API_DIRECT3D11

Description

DIRECT3D 11 API.

int API_DIRECT3D119

Description

DIRECT3D 11 API of DirectX 9 level. This option cannot be set directly. Instead, it is set automatically by the engine depending on the hardware configuration.

int API_DIRECT3D9

Description

DIRECT3D 9 API.

int API_NULL

Description

Null API name.

int API_OPENGL

Description

OpenGL API.

int API_OPENGLES

Description

OpenGL ES API.

int API_PLAYSTATION3

Description

PlayStation 3 API.

int API_UNKNOWN

Description

Unknown API.

int APPLE_A7

Description

Apple A7 GPU.

int APPLE_A8

Description

Apple A8 GPU.

int APPLE_UNKNOWN

Description

Unknown GPU by Apple.

int ARM_MALI400

Description

ARM Mali-400 MP GPU.

int ARM_UNKNOWN

Description

Unknown GPU by ARM.

int ATI_R300

Description

ATI R300 GPU.

int ATI_R400

Description

ATI R400 GPU.

int ATI_R500

Description

ATI R500 GPU.

int ATI_R600

Description

ATI R600 GPU.

int ATI_R700

Description

ATI R700 GPU.

int ATI_R800

Description

ATI R800 GPU.

int ATI_R900

Description

ATI R900 GPU.

int ATI_UNKNOWN

Description

Unknown GPU by ATI.

int ATI_X200

Description

ATI Xpress 200 GPU.

int GPU_UNKNOWN

Description

Unknown GPU.

int IMGTEC_SGX530

Description

Imagination Technologies SGX530 GPU.

int IMGTEC_SGX540

Description

Imagination Technologies SGX540 GPU.

int IMGTEC_UNKNOWN

Description

Unknown GPU by Imagination Technologies.

int INTEL_HD

Description

Intel HD GPU.

int INTEL_UNKNOWN

Description

Unknown GPU by Intel.

int NVIDIA_NV40

Description

NVIDIA NV40 GPU.

int NVIDIA_NV50

Description

NVIDIA NV50 GPU.

int NVIDIA_NV60

Description

NVIDIA NV60 GPU.

int NVIDIA_NV70

Description

NVIDIA NV70 GPU.

int NVIDIA_NV80

Description

NVIDIA NV80 GPU.

int NVIDIA_TEGRA2

Description

NVIDIA Tegra 2 mobile processor.

int NVIDIA_TEGRA3

Description

NVIDIA Tegra 3 mobile processor.

int NVIDIA_TEGRA4

Description

NVIDIA Tegra 4 mobile processor.

int NVIDIA_UNKNOWN

Description

Unknown GPU by NVIDIA.

int QUALCOMM_ADRENO205

Description

Qualcomm Adreno 205 GPU.

int QUALCOMM_ADRENO220

Description

Qualcomm Adreno 220 GPU.

int QUALCOMM_ADRENO225

Description

Qualcomm Adreno 225 GPU.

int QUALCOMM_ADRENO305

Description

Qualcomm Adreno 305 GPU.

int QUALCOMM_ADRENO320

Description

Qualcomm Adreno 320 GPU.

int QUALCOMM_ADRENO330

Description

Qualcomm Adreno 330 GPU.

int QUALCOMM_UNKNOWN

Description

Unknown GPU by Qualcomm.

int RENDER_DEFERRED_DISABLED

Description

Rendering of the simplified deferred lighting is disabled.

int RENDER_DEFERRED_LIGHTING

Description

Lighting is rendered as deferred (simplified).

int RENDER_DEFERRED_SHADING

Description

Lighting is rendered with deferred shading (super simplified).

int RENDER_HDR_DISABLED

Description

Rendering of the HDR effect is disabled.

int RENDER_HDR_LOGARITHMIC

Description

HDR effect is rendered using logarithmic function.

int RENDER_HDR_QUADRATIC

Description

HDR effect is rendered using quadratic function.

int RENDER_OCCLUSION_AMBIENT

Description

Only ambient occlusion is enabled.

int RENDER_OCCLUSION_AMBIENT_LIGHT

Description

Both ambient occlusion and light (directional) occlusion are enabled.

int RENDER_OCCLUSION_DISABLED

Description

Both ambient occlusion and light (directional) occlusion are disabled.

int RENDER_OCCLUSION_LIGHT

Description

Only light (directional) occlusion is enabled.

int RENDER_QUALITY_HIGH

Description

High quality of textures and shaders.

int RENDER_QUALITY_LOW

Description

Low quality of textures and shaders. 1/16 of the original texture will be used.

int RENDER_QUALITY_MEDIUM

Description

Medium quality of textures and shaders. 1/4 of the original texture will be used.

int RENDER_STEREO_DISABLED

Description

Stereo rendering is disabled.

int RENDER_STEREO_ENABLED

Description

Stereo rendering is enabled.

int RENDER_STEREO_HORIZONTAL

Description

Horizontal stereo mode is enabled (it is used on mobile devices with 3D displays).

int RENDER_STEREO_VERTICAL

Description

Vertical stereo mode is enabled (it is used on mobile devices with 3D displays).

int engine.render.getAPI ()

Returns the current Graphics API, or API_UNKNOWN if API cannot be identified.

Return value

The Graphics API flag (see API_* variables).

int engine.render.getAlphaFade ()

Returns a value indicating if alpha fading between object LODs is enabled.

Return value

1 if alpha fading is enabled; otherwise, 0.

vec4 engine.render.getAmbientColor ()

Returns the current ambient color. The default is (0, 0, 0, 1).

Return value

Current ambient color.

float engine.render.getAnimationLeaf ()

Returns the current scale for rotation angle of vegetation leaves. It scales the Leaf offset parameter for mesh_leaf_base material. The default is 1.

Return value

Global leaf rotation angle.

float engine.render.getAnimationScale ()

Returns the current global scale for rotation speed of vegetation leaves. It scales the Leaf scale parameter for mesh_leaf_base material. The default is 1.

Return value

Global leaf rotation speed.

float engine.render.getAnimationStem ()

Returns the current global scale for movement amplitude of vegetation stems. It scales Stem offset parameter for both mesh_leaf_base and mesh_stem_base materials. The default is 1.

Return value

Global stem amplitude scale.

float engine.render.getAnimationTime ()

Returns the render animation time for vegetation.

Return value

Animation time in milliseconds.

vec3 engine.render.getAnimationWind ()

Returns the current direction of wind for all vegetation (grass and trees). It is a multiplier for the stem offset (in grass, stem and leaves materials). The default is vec3(0).

Return value

Offset for vegetation under wind by X, Y and Z axes.

int engine.render.getAuxiliary ()

Returns a value indicating if auxiliary buffer is used.

Return value

1 if auxiliary buffer is used; otherwise, 0.

vec4 engine.render.getBackgroundColor ()

Returns the current background color of the scene.

Return value

Background color.

float engine.render.getBudget ()

Returns the value of the render budget, which limits the number of loaded/created graphics resources during frame according to loading/creation time.

Return value

The budget value in milliseconds.

vec3 engine.render.getCameraOffset ()

Returns an offset vector of the camera.

Return value

Offset of the camera, X, Y and Z axes.

float engine.render.getCameraThreshold ()

Returns a current camera threshold value.

Return value

Camera threshold value.

float engine.render.getClutterDistance ()

Returns a distance, at which (and farther) objects with "clutter" flag on will not be rendered. The default is infinity.

Return value

Distance in units.

float engine.render.getColorBrightness ()

Returns the current overall brightness of the scene. The default is 0.

Return value

Current brightness.

float engine.render.getColorContrast ()

Returns the current overall contrast of the scene. The default is 0.

Return value

Current contrast.

float engine.render.getColorGamma ()

Returns the current overall gamma of the scene. The default is 1.

Return value

Current gamma.

float engine.render.getColorSaturation ()

Returns the current overall saturation of the scene. The default is 1.

Return value

Current saturation.

int engine.render.getColorTextureImage (Image image)

Return the current color transformation image (LUT).

Arguments

  • Image image - Image to store the color transformation texture in.

Return value

1 if an image is successfully received; otherwise, 0.

string engine.render.getColorTextureName ()

Returns the name of the current color transformation texture (LUT).

Return value

Name of the current color transformation texture.

vec4 engine.render.getColorWhite ()

Returns the current white balance of the scene. The default is vec4(1,1,1,1).

Return value

Current white balance.

string engine.render.getCompositeMaterial ()

Returns a name of the current composite material that specifies a custom shader used for the final composition of the full-screen image instead of the default one.

Return value

Name of the current composite material (NULL by default).

int engine.render.getDOF ()

Returns a value indicating if depth of field is enabled. The default is 0.

Return value

1 if depth of field is enabled; otherwise, 0.

float engine.render.getDOFFarBlurPower ()

Returns the current depth of field power that controls the rate with which objects become blurred across the far blur range.

Return value

Blurring power.

float engine.render.getDOFFarBlurRadius ()

Returns the the blur factor used for out-of-focus objects across the far blur range. The default is 1.

Return value

Far blur factor.

float engine.render.getDOFFarBlurRange ()

Returns the current range from the focal point and away from the camera, within which objects are unfocused from. To the end of this distance, objects are blurred according to the blur radius. The default is 50 units.

Return value

Distance in units for defocusing from objects.

float engine.render.getDOFFarFocalPower ()

Returns the current focal power that controls the smoothness of transition between in-focus and blurred areas (both the rate and intensity with which objects become blurred) across the far blur range.

Return value

Focal power.

float engine.render.getDOFFarFocalRange ()

Returns the current area from the focal point and further away from the camera for objects in crisp focus (not blurred). The default is 0.

Return value

Far focal range in units.

float engine.render.getDOFFarFocalScale ()

Returns a scale that shifts the far blur range closer to the camera. (This is an interpolation coefficient between a non-blurred screen image and a blurred one.) The higher the value, the smaller is the far blur range and the closer to the camera the blurring starts. The default is 1 (no shifting).

Return value

Far scale.

float engine.render.getDOFFocalDistance ()

Returns a distance to objects in focus. The default is 100 units.

Return value

Distance to the camera focus in units.

float engine.render.getDOFNearBlurPower ()

Returns the current depth of field power that controls the rate with which objects become blurred across the near blur range.

Return value

Blurring power.

float engine.render.getDOFNearBlurRadius ()

Returns the the blur factor used for out-of-focus objects across the near blur range. The default is 1.

Return value

Near blur factor.

float engine.render.getDOFNearBlurRange ()

Returns the current range from the focal point towards the camera, within which objects are focused on (become clear). At the beginning of this distance, objects are blurred according to the blur radius.

Return value

Distance in units for focusing on objects.

float engine.render.getDOFNearFocalPower ()

Returns the current focal power that controls the smoothness of transition between in-focus and blurred areas (both the rate and intensity with which objects become blurred) across the near blur range.

Return value

Focal power.

float engine.render.getDOFNearFocalRange ()

Returns the current area from the camera to the focal point for objects in crisp focus (not blurred). The default is 0.

Return value

Near focal range in units.

float engine.render.getDOFNearFocalScale ()

Returns a scale that shifts the near blur range further from the camera. (This is an interpolation coefficient between a non-blurred screen image and a blurred one.) The higher the value, the wider is the near blur range and the further from the camera the blurring ends. The default is 1 (no shifting).

Return value

Near scale.

float engine.render.getDecalDistance ()

Returns the distance, at which (and farther) decals will not be rendered. The default is infinity.

Return value

Distance in units.

int engine.render.getDeferred ()

Returns a value indicating if deferred lighting is used.

Return value

1 if deferred lighting is used; otherwise, 0.

float engine.render.getDistanceScale ()

Returns the current global distance scale for all distance parameters: shadow distance, world lights shadows, LOD distances, etc. The default is 1.

Return value

Global distance scale.

void engine.render.getEnvironmentCoefficients (int ret[])

Returns environment coefficients corresponding to the last set environment texture. You can store several coefficient sets for different environment textures and blend (interpolate) between them to imitate change of day and so on. Using these coefficients is much faster than switching between environment cube maps.

Arguments

  • int ret[] - Return array containing nine coefficients corresponding to the last set environment texture.

float engine.render.getEnvironmentExposure ()

Returns a factor by which environment coefficients will be scaled.

Return value

Factor to scale environment coefficients.

string engine.render.getEnvironmentTextureName ()

Returns the name of the last set environment texture.

Return value

Name of the last set environment texture.

float engine.render.getFadeColor ()

Returns the current fade color of the scene. -1 means black, 1 means white. The default is 0 (no fade).

Return value

Current fade color.

float engine.render.getFieldDistance ()

Returns the distance, at which (and farther) Field nodes will not be rendered. The default value is infinity.

Return value

Distance in units.

int engine.render.getGPUMemory ()

Returns an amount of memory provided by the current GPU.

Return value

Amount of memory in Mbytes.

int engine.render.getGPUName ()

Returns the name of the current GPU.

Return value

GPU name flag.

int engine.render.getGeometryShader ()

Returns a value indicating if geometry shader is used.

Return value

1 if geometry shader is used; otherwise, 0.

int engine.render.getGlow ()

Returns a value indicating if glow is enabled. The default is 1.

Return value

1 if glow is enabled; otherwise, 0.

float engine.render.getGlowLargeExposure ()

Returns the current brightness factor for the large-radius glow. This glow effect creates a large-sized halo around the glowing surface.

Return value

Large-radius glow factor.

float engine.render.getGlowMediumExposure ()

Returns the current brightness factor for the medium-radius glow. This glow effect creates a medium-sized halo near to the glowing surface.

Return value

Medium-radius glow factor.

float engine.render.getGlowSmallExposure ()

Returns the current brightness factor for the small-radius glow. This glow effect is rendered most close to the glowing surface and creates object-shaped highlight.

Return value

Small-radius glow factor.

float engine.render.getGlowThreshold ()

Returns the brightness threshold, which is used to detect if an object is bright enough to produce glow. The default is 0.1.

Return value

Glow threshold.

int engine.render.getHDR ()

Returns a value indicating if HDR rendering is enabled. The default is 0.

Return value

1 if HDR rendering is enabled; otherwise, 0.

float engine.render.getHDRAdaptation ()

Returns the current period of exposure adaptation. The default is 1.5 seconds.

Return value

Period of exposure adaptation in seconds.

vec4 engine.render.getHDRBokehColor ()

Returns the current color for the bokeh effect.

Return value

Bokeh color.

float engine.render.getHDRBokehFarPower ()

Returns the current power controlling how close to the focal point the bokeh effect comes into action (across the far blur range of DOF). The higher the value, the further (and smaller) bokeh effect starts to be rendered. The default is 1.

Return value

Far bokeh power.

float engine.render.getHDRBokehFarSize ()

Returns the size of the bokeh effect across the far blur range of DOF. The default is 0.5.

Return value

Far bokeh effect size.

float engine.render.getHDRBokehNearPower ()

Returns the current power controlling how close to the focal point the bokeh effect comes into action (across the near blur range of DOF). Decreasing this value allows to render the bokeh effect closer to the focal point. It also means that the bokeh appears in its full size right near the focal point rather than gradually getting smaller up to the in-focus area. The default is 1.

Return value

Near bokeh power.

float engine.render.getHDRBokehNearSize ()

Returns the size of the bokeh effect across the near blur range of DOF. The default is 0.5.

Return value

Near bokeh effect size.

float engine.render.getHDRBokehScale ()

Returns the multiplier for color of HDR lens flares. The default is 1.

Return value

Bokeh color scale.

string engine.render.getHDRBokehTextureName ()

Returns a custom texture used for the bokeh effect.

Return value

Texture name.

float engine.render.getHDRBokehThreshold ()

Returns the brightness threshold for the bokeh effect. Increasing this value allows for rendering bokeh only for bright enough light points. The default is 0.

Return value

Bokeh threshold.

float engine.render.getHDRBrightExposure ()

Returns the current coefficient for decreasing the brightness of all HDR flares (lens, shaft ans cross ones). This function can be used in addition to overall HDR exposure. The default is 1.

Return value

Coefficient for normalizing flares brightness.

float engine.render.getHDRCrossAngle ()

Returns the angle between flare shafts of a cross flare. The default is 45 degrees.

Return value

Angle between flare shafts in degrees.

vec4 engine.render.getHDRCrossColor ()

Returns the color of a cross flare. The default is (0, 0, 0, 1).

Return value

Color of a cross flare.

float engine.render.getHDRCrossLength ()

Returns the length of a cross flare. The default is 0.2 of the screen width.

Return value

Length of a cross flare relative to the screen width.

float engine.render.getHDRCrossScale ()

Returns the current multiplier for color of HDR cross flares. The default is 1.

Return value

Cross color scale.

int engine.render.getHDRCrossShafts ()

Returns the number of cross flares. The default is 4.

Return value

Number of cross flares.

float engine.render.getHDRCrossThreshold ()

Returns the current brightness threshold for cross flares. The default is 0.

Return value

Cross flares threshold.

float engine.render.getHDRExposure ()

Returns the current exposure. The default is 0.15 seconds.

Return value

Current exposure in seconds.

float engine.render.getHDRFilmicLinearAngle ()

Returns the current Linear Angle filmic tonemapping parameter value.

Return value

Liner Angle value.

float engine.render.getHDRFilmicLinearScale ()

Returns the current Linear Strength filmic tonemapping parameter value.

Return value

Linear Strength value.

float engine.render.getHDRFilmicShoulderScale ()

Returns the current Shoulder Strength filmic tonemapping parameter value.

Return value

Shoulder Strength value.

float engine.render.getHDRFilmicToeDenominator ()

Returns the current Toe Denominator filmic tonemapping parameter value.

Return value

Toe Denominator value.

float engine.render.getHDRFilmicToeNumerator ()

Sets the Toe Numerator filmic tonemapping parameter value.

Return value

Toe Numerator value.

float engine.render.getHDRFilmicToeScale ()

Returns the current Toe Strength filmic tonemapping parameter value.

Return value

Toe Strength value.

float engine.render.getHDRFilmicWhiteLevel ()

Returns the current Linear White Point filmic tonemapping parameter value.

Return value

Linear White Point value.

float engine.render.getHDRLargeExposure ()

Returns the current exposure for the large-radius HDR adaptation effect. This effect is rendered most far from the object surface to create scattered HDR highlight.

Return value

Large-radius HDR exposure.

vec4 engine.render.getHDRLensColor ()

Returns the color of a lens flare. The default is (0, 0, 0, 1).

Return value

Color of a lens flare.

vec3 engine.render.getHDRLensDispersion ()

Returns the current color displacement for red, greed and blue channels of the lens flares. Can be used to create light dispersion (chromatic aberrations). The default is (1,1,1).

Return value

Lens dispersion displacement per channel.

float engine.render.getHDRLensLength ()

Returns the current length indicating if the whole radial lens flare is rendered on the screen or only a part of it. This option controls how lens flares pattern is distributed. The default is 0.5 (a half of the lens flare is rendered).

Return value

Length of the lens flare.

float engine.render.getHDRLensRadius ()

Returns the current radius of the spherical lens flares on the screen. The default is 0.5 (a flare is half of the screen width).

Return value

Radius of the spherical lens flares.

float engine.render.getHDRLensScale ()

Returns the current multiplier for color of HDR lens flares. The default is 1.

Return value

Lens color scale.

string engine.render.getHDRLensTextureName ()

Returns the name of the current texture that modulates the pattern of lens flares. For example, it can be used to create an effect of light reflections or unclean optics when the camera looks at the sun.

Return value

Name of the lens flares modulation texture.

float engine.render.getHDRLensThreshold ()

Returns the current brightness threshold for lens flares. The default is 0.

Return value

Lens flares threshold.

float engine.render.getHDRMaxLuminance ()

Returns the maximum luminance used for HDR rendering. The default is 10.

Return value

Maximum luminance.

float engine.render.getHDRMediumExposure ()

Returns the current exposure for the medium-radius HDR adaptation effect. This effect is rendered at the medium distance from the object surface to create HDR highlight near it.

Return value

Medium-radius HDR exposure.

float engine.render.getHDRMinLuminance ()

Returns the minimum luminance used for HDR rendering. The default is -10.

Return value

Minimum luminance.

float engine.render.getHDRShaftAttenuation ()

Returns the current power of fading for HDR shaft flare across its length. The default is 0.95.

Return value

Fading power.

vec4 engine.render.getHDRShaftColor ()

Returns the current color of the lens shafts. The default is (0, 0, 0, 1).

Return value

Color of lens shafts.

float engine.render.getHDRShaftLength ()

Returns the length of a flare shaft. The default is 0.5 of the screen width.

Return value

Length of a flare shaft relative to the screen width.

float engine.render.getHDRShaftScale ()

Returns the current multiplier for color of HDR shaft flares. The default is 1.

Return value

Shaft color scale.

float engine.render.getHDRShaftThreshold ()

Returns the current brightness threshold for flare shafts. The default is 0.

Return value

Flare shafts threshold.

float engine.render.getHDRSmallExposure ()

Returns the current exposure for the small-radius HDR adaptation effect. This effect is rendered most close to the object surface and creates object-shaped HDR highlight.

Return value

Small-radius HDR exposure.

float engine.render.getHDRThreshold ()

Returns the brightness threshold, which is used to detect if an object should be blurred in the HDR mode. The default is 1.

Return value

HDR threshold.

int engine.render.getInstancing ()

Returns a value indicating if instancing is enabled.

Return value

1 if instancing is enabled; otherwise, 0.

float engine.render.getLightDistance ()

Returns the distance, at which (and farther) dynamic lights will not be rendered. The default is infinity.

Return value

Distance in units.

int engine.render.getLightProb ()

Returns a value indicating if rendering of LightProb-based global illumination is enabled.

Return value

Positive number if LightProb-based GI rendering is enabled; otherwise, 0.

float engine.render.getLightProbAttenuation ()

Returns the current attenuation factor for LightProb-based global illumination. The larger this value is, the more smooth and across the larger distance GI fades out.

Return value

GI attenuation factor.

float engine.render.getLightProbDiffuseScale ()

Returns the current diffuse light multiplier for LightProb-based global illumination. The default is 1.

Return value

Diffuse scale.

float engine.render.getLightProbDistance ()

Returns the current distance up to which LightProb-based global illumination is rendered. The default is 100 units.

Return value

GI distance in units.

float engine.render.getLightProbFresnelBias ()

Returns the current Fresnel effect bias for specular highlights when rendering LightProb-based global illumination. It sets the minimum limit for specular intensity. The default is 1.

Return value

Fresnel minimum reflectance level. The higher the value, the brighter specular highlights are at all viewing angles.

float engine.render.getLightProbFresnelPower ()

Returns the current Fresnel effect power for specular highlights when rendering LightProb-based global illumination. It defines the amount of reflectance depending on the viewing angle. If the Fresnel bias equals to 1, Fresnel power is not applied. The default is 5.

Return value

Fresnel effect power:
  • Low values provide good reflectance even at a large viewing angles, when looking from above.
  • High values provide the reflectance only at a small viewing angle, when close to the surface.

int engine.render.getLightProbMask ()

Returns the current bit mask that determines rendering of LightProb-based global illumination. For LightProb to light a scene around it, at least one bit of this mask should match with the light prob's light mask. The default is 1.

Return value

Integer, each bit of which is a mask for rendering LightProb-based GI.

float engine.render.getLightProbSpecularScale ()

Returns the current specular light multiplier for LightProb-based global illumination. The default is 0.

Return value

Specular scale.

int engine.render.getMotionBlur ()

Returns a value indicating if motion blur is enabled.

Return value

1 if motion blur is enabled; otherwise, 0.

float engine.render.getMotionBlurAngularScale ()

Returns the current amount of motion blur by the player angular movement.

Return value

Scale of player's angular velocity used for the motion blur.

float engine.render.getMotionBlurLinearScale ()

Returns the current amount of motion blur by the player linear movement.

Return value

Scale of player's linear velocity used for the motion blur.

float engine.render.getMotionBlurMaxVelocity ()

Returns the current maximum amount of motion blur for moving physical bodies.

Return value

Maximum scaled velocity of bodies used for the motion blur.

float engine.render.getMotionBlurVelocityScale ()

Returns the current amount of motion blur for moving physical bodies.

Return value

Scale of bodies' linear and angular velocities used for the motion blur.

int engine.render.getNumDecals ()

Returns the number of rendered per frame decals that can be currently seen in the viewport (during all of the rendering passes).

Return value

The number of decals.

int engine.render.getNumDips ()

Returns the number of draw calls used in the current scene. See Rendering Profiler article for details.

Return value

The number of draw calls.

int engine.render.getNumLights ()

Returns the number of light passes rendered per frame. It means that the value contains the number of all light sources that are currently seen illuminating something in the viewport and also includes additional passes for rendering lights in the reflecting surfaces (if dynamical reflections are used). See Rendering Profiler article for details.

Return value

The number of light passes.

int engine.render.getNumMaterials ()

Returns the number of materials set per frame (during all of the rendering passes) in the current scene.

Return value

The number of materials.

int engine.render.getNumPrimitives ()

Returns the number of geometric rendered per frame primitives that can be currently seen in the viewport. See Rendering Profiler article for details.

Return value

The number of primitives.

int engine.render.getNumProcedurals ()

Returns the number of procedurals that can be currently seen in the viewport.

Return value

The number of procedurals.

int engine.render.getNumReflections ()

Returns the number of reflections drawn per frame that can be currently seen in the viewport. In case of cubemap reflections, if all six faces are updated, six reflections are rendered per each frame.

Return value

The number of reflections.

int engine.render.getNumShaders ()

Returns the number of shaders set per frame. See Rendering Profiler article for details.

Return value

The number of shaders.

int engine.render.getNumShadows ()

Returns the number of shadow passes rendered per frame. See Rendering Profiler article for details.

Return value

The number of shadow passes.

int engine.render.getNumSurfaces ()

Returns the number of rendered per frame surfaces that can be currently seen in the viewport (in all rendering passes). See Rendering Profiler article for details.

Return value

Number of surfaces.

int engine.render.getNumTriangles ()

Returns the number of rendered per frame triangles that can be currently seen in the viewport. See Rendering Profiler article for details.

Return value

Number of triangles.

float engine.render.getObjectDistance ()

Returns a distance, at which (and farther) objects will not be rendered. The default is infinity.

Return value

Distance in units.

int engine.render.getOcclusion ()

Returns a value indicating if ambient occlusion mapping is enabled. The default is 1.

Return value

1 if ambient occlusion mapping is enabled; otherwise, 0.

float engine.render.getOcclusionAmbientAttenuation ()

Returns a coefficient that compensates for falloff of the ambient occlusion with a distance, making it more prominent. The lower the value, the less the ambient occlusion effect fades out with the distance. The default is 1 (no compensation).

Return value

AO attenuation compensation coefficient.

float engine.render.getOcclusionAmbientEmitter ()

Returns the current coefficient indicating if the points can occlude (shadow) other points in all directions or only along their normal vectors. The default is 0.0 (AO emitter points shadow other points in all directions).

Return value

Normals influence coefficient for AO.

float engine.render.getOcclusionAmbientPerspective ()

Returns the current perspective compensation for the ambient occlusion. When at the far distance, the sampling radius will be automatically increased, if a a value higher than 1 is set. This compensations allows to have small AO details from close by, and shadowing from big objects (for example, a mountain) in the distance at the same time. The default is 1.

Return value

Perspective correction for AO.

float engine.render.getOcclusionAmbientPower ()

Returns the current power to which the ambient occlusion term is raised providing darker shadows. The default is 8.

Return value

Power of ambient occlusion shadowing.

float engine.render.getOcclusionAmbientReceiver ()

Returns the current coefficient indicating if points can be occluded (shadowed) from all directions or only along their normal vectors. The default is 1 (AO shadows points only along their normal).

Return value

Normals influence coefficient for receiving AO.

float engine.render.getOcclusionAmbientSampleRadius ()

Returns the current radius distance within which the neighboring points can shadow each other. It controls the ambient occlusion effect radius. The default is 1 unit.

Return value

AO radius in units.

float engine.render.getOcclusionAmbientScale ()

Returns the current multiplier for ambient occlusion term providing darker shadows. The default is 1.

Return value

Scale of ambient occlusion shadowing.

float engine.render.getOcclusionAmbientScreenRadius ()

Returns the current ambient occlusion radius in screen space, in which shadowing is computed. It controls the rendering performance and how much the ambient occlusion effect is decreased when the camera zooms in to the object. The default is 0.05.

Return value

Radius of AO sampling in screen space.

float engine.render.getOcclusionAmbientThreshold ()

Returns the current depth threshold used to filter ambient occlusion. It specifies the maximum possible depth between sampled points in two pixels, to filter them together. This option allows to have sharp edges, while having smooth AO on flat surfaces. The default is 1 unit.

Return value

Filtered depth between sampled points in two pixels.

float engine.render.getOcclusionLightAttenuation ()

Returns a coefficient that compensates for falloff of the light (directional) occlusion with a distance, making it more prominent. The lower the value, the less global illumination effect fades out with the distance. The default is 1 (no compensation).

Return value

GI attenuation compensation coefficient.

float engine.render.getOcclusionLightEmitter ()

Returns the current coefficient indicating if the points can illuminate other points in all directions or only along their normal vectors. The default is 1.0 (GI emitter points illuminate reflect light only along their normals).

Return value

Normals influence coefficient for GI.

float engine.render.getOcclusionLightPerspective ()

Returns the current perspective compensation for the light (directional) occlusion. When at the far distance, the sampling radius will be automatically increased, if a a value higher than 1 is set. This compensations allows to have color highlights from close by, and GI from big objects (for example, a city) in the distance at the same time. The default is 1.

Return value

Perspective correction for GI.

float engine.render.getOcclusionLightPower ()

Returns the current power to which the light (directional) occlusion term is raised to provide darker result. The default is 1.

Return value

Power for the GI term.

float engine.render.getOcclusionLightReceiver ()

Returns the current coefficient indicating if points can be illuminated from all directions or only along their normal vectors. The default is 1 (GI receiver points receive light only along their normals).

Return value

Normals influence coefficient for receiving GI.

float engine.render.getOcclusionLightSampleRadius ()

Returns the current radius distance within which the neighboring points can illuminate each other. It controls the light (directional) occlusion effect radius. The default is 1 unit.

Return value

GI radius in units.

float engine.render.getOcclusionLightScale ()

Returns the current multiplier for illumination of the light (directional) occlusion. The default is 1 (the maximum GI).

Return value

Scale of GI.

float engine.render.getOcclusionLightScreenRadius ()

Returns the current light (directional) occlusion radius in screen space, in which GI is computed. It controls the rendering performance and how much the global illumination effect is decreased when the camera zooms in to the object. The default is 0.05.

Return value

Radius of GI sampling in screen space.

float engine.render.getOcclusionLightThreshold ()

Returns the current depth threshold used to filter light (directional) occlusion. It specifies the maximum possible depth between sampled points in two pixels, to filter them together. This option allows to have sharp edges, while having smooth GI on flat surfaces. The default is 1 unit.

Return value

Filtered depth between sampled points in two pixels.

int engine.render.getParallax ()

Returns a value indicating if parallax occlusion mapping is enabled. The default is 1.

Return value

1 if parallax occlusion mapping is enabled; otherwise, 0.

string engine.render.getPostMaterials ()

Returns names of the current postprocess materials that are applied after all other postprocess (such as HDR, DOF, etc.) are rendered. Materials are applied in the order of listing.

They are used together with Player::getPostMaterials(), if any.

Return value

Name of the current post postprocess materials.

int engine.render.getReflection ()

Returns a value indicating if reflections are enabled. The default is 1.

Return value

1 if reflections are enabled; otherwise, 0.

vec4 engine.render.getReflectionColor ()

Returns the color that allows to adjust reflections of all meshes with reflective materials, i.e.:
  • mesh_reflection_2d_base
  • mesh_reflection_cube_base
  • mesh_paint_reflection_cube_base
and reflective tessellation materials:
  • mesh_tessellation_reflection_2d_base
  • mesh_tessellation_reflection_cube_base
  • mesh_tessellation_paint_reflection_cube_base

Return value

Reflection color for reflective mesh materials.

float engine.render.getReflectionDistance ()

Returns the distance, at which (and farther) reflections will not be rendered. The default is infinity.

Return value

Distance in units.

int engine.render.getRefraction ()

Returns a value indicating if refraction is enabled. The default is 1.

Return value

1 if refraction is enabled; otherwise, 0.

vec4 engine.render.getRefractionDispersion ()

Returns the refraction displacement for red, greed and blue channels (according to the refraction texture of refractive materials). It can be used to create light dispersion (chromatic aberrations).

Return value

Dispersion displacement.

string engine.render.getRenderMaterials ()

Returns names of the current postprocess materials that are applied before all other postprocess (such as HDR, DOF, etc.) are rendered. Materials are applied in the order of listing.

Return value

Name of the current render materials.

int engine.render.getScattering ()

Returns a value indicating if scattering is used. The default is 1.

Return value

1 if scattering is used; otherwise, 0.

float engine.render.getScatteringAngularity ()

Returns a coefficient that compensates for the angular distribution of Rayleigh light scattering. This compensation allows to create a uniformly lit sky instead of a physically-correct one that depends on the sun angle. The default is 1 (no compensation).

Return value

Rayleigh light scattering compensation coefficient.

float engine.render.getScatteringAreal ()

Returns the aerial perspective scale. The default is 1.

Return value

Aerial perspective scale

float engine.render.getScatteringDensity ()

Returns the number of molecules per unit volume (Rayleigh scattering). The default is 1.

Return value

Density.

float engine.render.getScatteringDepolarization ()

Returns the depolarization factor (Rayleigh scattering). The default is 1.

Return value

Depolarization factor.

vec3 engine.render.getScatteringDirection ()

Returns the direction of light scattering. The vector can point in any direction,including downwards if negative values are specified. The default direction is up (vec3(0,0,1)).

Return value

Scattering direction.

float engine.render.getScatteringEnergy ()

Returns the irradiance of the sun. The default is 0.

Return value

Irradiance of the sun.

float engine.render.getScatteringGreenstein ()

Returns the directionality factor of phase function (Mie scattering). The default is 0.5.

Return value

Directionality factor.

float engine.render.getScatteringGround ()

Returns the ground zero level. The default is 0.

Return value

Ground zero level.

float engine.render.getScatteringInnerAngle ()

Returns the inner angle of the sun. Difference between the inner and outer angles defines halo around the sun.

Return value

Inner angle of the sun.

float engine.render.getScatteringMie ()

Returns the Mie scattering scale. The default is 1 degree.

Return value

Mie scattering scale.

vec4 engine.render.getScatteringMieColor ()

Returns the color for Mie scattering.

Return value

Color used for Mie scattering.

float engine.render.getScatteringMieHeight ()

Returns the height falloff for the Mie scattering. The default is infinity.

Return value

Height falloff.

float engine.render.getScatteringOuterAngle ()

Returns the outer angle of the sun. Difference between the inner and outer angles defines halo around the sun.

Return value

Outer angle of the sun.

float engine.render.getScatteringPower ()

Returns the scattering power that determines the start distance for attenuation.

Return value

Scattering power.

float engine.render.getScatteringRay ()

Returns the Rayleigh scattering scale. The default is 1.

Return value

Rayleigh scattering scale.

vec4 engine.render.getScatteringRayColor ()

Returns the color for Rayleigh scattering.

Return value

Color used for Rayleigh scattering.

float engine.render.getScatteringRayHeight ()

Returns the height falloff for the Rayleigh scattering. The default is infinity.

Return value

Height falloff.

float engine.render.getScatteringRefractive ()

Returns the current atmosphere refractive index (Rayleigh scattering). The default is 1.

Return value

Atmosphere refractive index.

float engine.render.getScatteringSun ()

Returns a degree of brightness of the sun halo.

Return value

Brightness of the sun halo.

vec4 engine.render.getScatteringSunColor ()

Returns the sun color for scattering. This value does not depend on a world light color. The default is vec4_one.

Return value

Sun color.

float engine.render.getScatteringThreshold ()

Returns the current scattering threshold. The default is 1.

Return value

Scattering threshold.

float engine.render.getScatteringTurbidity ()

Returns the atmosphere turbidity (Mie scattering). The default is 1.

Return value

Atmosphere turbidity.

string engine.render.getShaderDefines ()

Returns an additional shader defines.

Return value

Additional shader defines.

int engine.render.getShaders ()

Returns the quality of shaders.

Return value

One of the RENDER_QUALITY_* pre-defined variables.

float engine.render.getShadowDistance ()

Returns the distance, at which (and farther) shadows will not be rendered. The default is infinity.

Return value

Distance in units.

int engine.render.getStereo ()

Returns a value indicating if stereo rendering is enabled. The default is 0.

Return value

1 if dual stereo rendering is used; 2 if wide stereo rendering is used; otherwise, 0.

float engine.render.getStereoDistance ()

Returns the focal distance for stereo rendering (distance in the world space to the point where two views line up). The default is 100 units.

Return value

Focal distance in units.

float engine.render.getStereoOffset ()

Returns the virtual camera offset (an offset after the perspective projection).

Return value

Virtual camera offset in units.

float engine.render.getStereoRadius ()

Returns the current radius for stereo (the half of the separation distance between the cameras).

Return value

Stereo radius in units.

int engine.render.getTessellation ()

Returns a value indicating if tessellation is enabled.

Return value

1 if tessellation is enabled; otherwise, 0.

float engine.render.getTessellationDistance ()

Returns the multiplier for the corresponding material parameter, that controls the distance after which surfaces are not tessellated. The default is 1.

Return value

Tessellation distance multiplier.

float engine.render.getTessellationFactor ()

Returns the multiplier for the corresponding material parameter that controls subdivision of triangles into smaller ones. The default is 1.

Return value

Tessellation factor multiplier.

float engine.render.getTessellationScale ()

Returns the multiplier for the corresponding material parameter that determines displacement factor for the tessellated surfaces (to what extent geometry is extruded). The default is 1.

Return value

Tessellation scale multiplier.

int engine.render.getTexture3D ()

Returns a value indicating if using 3D textures is available.

Return value

1 if 3D textures are available to be used; otherwise, 0.

int engine.render.getTextureArray ()

Returns a value indicating if texture arrays usage is enabled. Texture arrays are supported by DirectX10 and DirectX11, as well as by OpenGL of DirectX10-level functionality.

Return value

1 if texture arrays usage is enabled; otherwise, 0.

int engine.render.getTextures ()

Returns the quality of textures.

Return value

One of the RENDER_QUALITY_* pre-defined variables.

int engine.render.getTransforming ()

Returns a value indicating if skinned meshes are baked into the buffer and thus rendered as static meshes. With this optimization skinned animation is not computed in every rendering pass.

Return value

1 if skinned meshes transforming is enabled; otherwise, 0.

int engine.render.getTranslucent ()

Returns a value indicating if translucent shadow maps are enabled. The default is 0.

Return value

1 if translucent shadow maps are enabled; otherwise, 0.

int engine.render.getVolumetric ()

Returns a value indicating if volumetric shadows are enabled. The default is 1.

Return value

1 if volumetric shadows are enabled; otherwise, 0.

float engine.render.getVolumetricAttenuation ()

Returns the current power of fading for volumetric shadows across their length. The default is 0.95.

Return value

Fading power.

float engine.render.getVolumetricExposure ()

Returns the contrast used for volumetric shadows. The default is 0.5.

Return value

Shadow contrast.

float engine.render.getVolumetricLength ()

Returns the length of volumetric shadows. The default is 0.5.

Return value

Shadow length.

int engine.render.isAPPLE ()

Returns a value indicating if the APPLE GPU is used.

Return value

One of APPLE_* variables.

int engine.render.isARM ()

Returns a value indicating if the ARM graphics core is used.

Return value

One of ARM_* variables.

int engine.render.isATI ()

Returns a value indicating if the ATI graphics card is used.

Return value

One of ATI_* variables.

int engine.render.isEnabled ()

Returns a value indicating if the loaded world is rendered.

Return value

Positive value if the world is rendered; otherwise, 0.

int engine.render.isFirstFrame ()

Returns a value indicating if the first frame is enabled over the current frame.

Return value

1 if the first frame flag is enabled; otherwise, 0.

int engine.render.isHDRBokehEnabled ()

Sets a value indicating if a bokeh effect is rendered for bright lights across the DOF-blurred range. Both HDR and DOF should be enabled to render this effect. The default is 0 (disabled).

Return value

Positive integer if bokeh flares are enabled; otherwise, 0.

int engine.render.isHDRCrossEnabled ()

Returns a value indicating if cross flares are enabled.

Return value

Positive integer if cross flares are enabled; otherwise, 0.

int engine.render.isHDRLensEnabled ()

Returns a value indicating if lens flares are enabled.

Return value

Positive integer if lens flares are enabled; otherwise, 0.

int engine.render.isHDRShaftEnabled ()

Returns a value indicating if flare shafts are enabled. The default is 0 (disabled).

Return value

Positive integer if flare shafts are enabled; otherwise, 0.

int engine.render.isIMGTEC ()

Returns a value indicating if the Imagination Technologies graphics core is used.

Return value

One of IMGTEC_* variables.

int engine.render.isINTEL ()

Returns a value indicating if the Intel graphics card is used.

Return value

One of INTEL_* variables.

int engine.render.isNVIDIA ()

Returns a value indicating if the NVIDIA graphics card is used.

Return value

One of NVIDIA_* variables.

int engine.render.isQUALCOMM ()

Returns a value indicating if the Qualcomm graphics core is used.

Return value

One of QUALCOMM_* variables.

int engine.render.loadSettings (string file)

Loads renderer settings from a given file.

Arguments

  • string file - Path to an XML file with desired settings.

Return value

1 if the settings are loaded successfully; otherwise, 0.

void engine.render.renderImage2D (mat4 projection, mat4 modelview, Image image, int width, int height, string materials, int hdr)

Renders the 2D image with specified settings.

Arguments

  • mat4 projection - Projection matrix.
  • mat4 modelview - Model-view matrix.
  • Image image - Texture image.
  • int width - Width of the projected image in units.
  • int height - Height of the projected image in units.
  • string materials - Comma-separated list of material names used for postprocessing visual effects.
  • int hdr - HDR rendering mode flag (see RENDER_HDR_* variables).

void engine.render.renderImageCube (mat4 projection, vec3 position, Image image, int size, string materials, int hdr)

Renders the cube map with specified settings.

Arguments

  • mat4 projection - Projection matrix.
  • vec3 position - Position from where to grab the cube map.
  • Image image - Texture image.
  • int size - Texture dimensions (cube map edge size).
  • string materials - Comma-separated list of material names used for postprocessing visual effects.
  • int hdr - HDR rendering mode flag: 1 to grab with HDR, 0 - without.

void engine.render.renderProcedurals (int materials)

Renders post-process materials with procedural textures (calculated on GPU using custom shaders) that are assigned to surfaces.

Arguments

  • int materials - ID of surface post-process materials array.

int engine.render.saveSettings (string file)

Saves current renderer settings to a given file.

Arguments

  • string file - Path to a target file.

Return value

1 if the settings are saved successfully; otherwise, 0.

void engine.render.setAmbientColor (vec4 color)

Updates the current ambient color. The default is (0, 0, 0, 1).

Arguments

  • vec4 color - Ambient color.

void engine.render.setAnimationLeaf (float angle)

Updates the global scale for rotation angle of vegetation leaves. It scales the Leaf offset parameter for mesh_leaf_base material. The default is 1.

Arguments

  • float angle - Global leaf rotation angle. If a negative value is provided, 0 will be used instead.

void engine.render.setAnimationScale (float scale)

Updates the global scale for rotation speed of vegetation leaves. It scales the Leaf scale parameter for mesh_leaf_base material. The default is 1.

Arguments

  • float scale - Global leaf rotation speed.

void engine.render.setAnimationStem (float offset)

Updates the global scale for movement amplitude of vegetation stems. It scales Stem offset parameter for both mesh_leaf_base and mesh_stem_base materials. The default is 1.

Arguments

  • float offset - Global stem amplitude scale. If a negative value is provided, 0 will be used instead.

void engine.render.setAnimationTime (float time)

Updates the render animation time for vegetation. The default value is 0.0f.

Arguments

  • float time - Animation time in milliseconds.

void engine.render.setAnimationWind (vec3 offset)

Sets the direction of wind for all vegetation (grass and trees). It is a multiplier for the stem offset (in grass, stem and leaves materials). The default is vec3(0).

Arguments

  • vec3 offset - Offset for vegetation under wind by X, Y and Z axes.

void engine.render.setBackgroundColor (vec4 color)

Sets background color of the scene (useful for blue/green screen composing systems). The default is (0, 0, 0, 1).

Arguments

  • vec4 color - Background color.

void engine.render.setBudget (float budget)

Sets the render budget value, which limits the number of loaded/created graphics resources during frame according to loading/creation time.

Arguments

  • float budget - The budget value in milliseconds.

void engine.render.setCameraOffset (vec3 offset)

Sets an offset vector for the camera.

Arguments

  • vec3 offset - Offset of the camera, X, Y and Z axes.

void engine.render.setCameraThreshold (float threshold)

Sets a camera threshold value.

Arguments

  • float threshold - Camera threshold value.

void engine.render.setClutterDistance (float distance)

Updates the distance, at which (and farther) objects with "clutter" flag on will not be rendered. The default is infinity.

Arguments

  • float distance - Distance in units.

void engine.render.setColorBrightness (float brightness)

Updates the current brightness of the scene. The default is 0.

Arguments

  • float brightness - Brightness. The provided value is saturated in the range [-1; 1].

void engine.render.setColorContrast (float contrast)

Updates the current contrast of the scene. The default is 0.

Arguments

  • float contrast - Contrast. The provided value is saturated in the range [-1; 1].

void engine.render.setColorGamma (float gamma)

Updates the current gamma of the scene. The default is 1.

Arguments

  • float gamma - Gamma. The provided value is saturated in the range [0.5; 1.5].

void engine.render.setColorSaturation (float saturation)

Updates the current saturation of the scene. The default is 1.

Arguments

  • float saturation - Saturation. The provided value is saturated in the range [0; 2].

int engine.render.setColorTextureImage (Image image)

Sets a new color transformation image (LUT). This function resets a LUT texture name to null if it has been previously set via setColorTextureName().

Arguments

  • Image image - Color transformation image.

Return value

1 if the image is set successfully; otherwise, 0.

int engine.render.setColorTextureName (string filename)

Sets the name of a new color transformation texture (LUT). The default is NULL.

Arguments

  • string filename - Name of the file with the texture. If NULL (0) is passed, the texture is cleared.

Return value

1 if the texture is set or cleared successfully; otherwise, 0.

void engine.render.setColorWhite (vec4 white)

Updates the current white balance of the scene. The default is vec4(1,1,1,1).

Arguments

void engine.render.setCompositeMaterial (string material)

Sets a custom composite material that specifies a custom shader used for the final composition of the full-screen image instead of the default one. The default is NULL.

Arguments

  • string material - Composite material name.

void engine.render.setDOFFarBlurPower (float power)

Updates the depth of field power that controls the rate with which objects become blurred across the far blur range. The default is 1.

Arguments

  • float power - Blurring power. If a too small or a negative value is provided, 1E-6 will be used instead.

void engine.render.setDOFFarBlurRadius (float radius)

Updates the the blur factor used for out-of-focus objects across the far blur range. The default is 1.

Arguments

  • float radius - Far blur factor. (It is calculated as a number of pixels relative to the resolution of 720p.) If a negative value is provided, 0 will be used instead.

void engine.render.setDOFFarBlurRange (float range)

Updates the range from the focal point and away from the camera, within which objects are unfocused from. To the end of this distance, objects are blurred according to the blur radius. The default is 50 units.

Arguments

  • float range - Defocusing from objects distance (in units). If a too small or a negative value is provided, 1E-6 will be used instead.

void engine.render.setDOFFarFocalPower (float power)

Updates the focal power that controls the smoothness of transition between in-focus and blurred areas (both the rate and intensity with which objects become blurred) across the far blur range. The default is 1.

Arguments

  • float power - Focal power. If a too small or a negative value is provided, 1E-6 will be used instead.

void engine.render.setDOFFarFocalRange (float range)

Sets an area from the focal point and further away from the camera for objects in crisp focus (not blurred). The default is 0.

Arguments

  • float range - Far focal range in units. If a negative value is provided, 0 will be used instead.

void engine.render.setDOFFarFocalScale (float scale)

Shifts the far blur range closer to the camera. (This is an interpolation coefficient between a non-blurred screen image and a blurred one.) The default is 1 (no shifting).

Arguments

  • float scale - Far scale. The higher the value, the less is the far blur range and the closer to the camera the blurring starts. The value can be >=1.

void engine.render.setDOFFocalDistance (float distance)

Updates the focal distance of the camera (in units), i.e. a point where objects are in-focus and clear. Used as a reference point to set the near and far blur range. The default is 100 units.

Arguments

  • float distance - Focal distance in units. If a negative value is provided, 0 will be used instead.

void engine.render.setDOFNearBlurPower (float power)

Updates the depth of field power that controls the rate with which objects become blurred across the near blur range. The default is 1.

Arguments

  • float power - Blurring power. If a too small or a negative value is provided, 1E-6 will be used instead.

void engine.render.setDOFNearBlurRadius (float radius)

Updates the the blur factor used for out-of-focus objects across the near blur range. The default is 1.

Arguments

  • float radius - Near blur factor. (It is calculated as a number of pixels relative to the resolution of 720p.) If a negative value is provided, 0 will be used instead.

void engine.render.setDOFNearBlurRange (float range)

Updates the range from the focal point towards the camera, within which objects are focused on (become clear). At the beginning of this distance, objects are blurred according to the blur radius. The default is 50 units.

Arguments

  • float range - Distance (in units) for focusing on objects. If a too small or a negative value is provided, 1E-6 will be used instead.

void engine.render.setDOFNearFocalPower (float power)

Updates the focal power that controls the smoothness of transition between in-focus and blurred areas (both the rate and intensity with which objects become blurred) across the near blur range. The default is 1.

Arguments

  • float power - Focal power. If a too small or a negative value is provided, 1E-6 will be used instead.

void engine.render.setDOFNearFocalRange (float range)

Sets an area from the camera to the focal point for objects in crisp focus (not blurred). The default is 0.

Arguments

  • float range - Near focal range in units. If a negative value is provided, 0 will be used instead.

void engine.render.setDOFNearFocalScale (float scale)

Shifts the near blur range further from the camera. (This is an interpolation coefficient between a non-blurred screen image and a blurred one.) The default is 1 (no shifting).

Arguments

  • float scale - Near scale. The higher the value, the wider is the near blur range and the further from the camera the blurring ends. The value can be >=1.

void engine.render.setDecalDistance (float distance)

Updates the distance, at which (and farther) decals will not be rendered. The default is infinity.

Arguments

  • float distance - Distance in units.

void engine.render.setDistanceScale (float scale)

Updates the global distance scale for all distance parameters: shadow distance, light distance, LOD distances, etc. The default is 1.

Arguments

  • float scale - Global distance scale.

void engine.render.setEnabled (int enable)

Sets a value indicating if the loaded world should be rendered. The default is 1.

Arguments

  • int enable - Positive value to render the world, 0 not to render.

void engine.render.setEnvironmentCoefficients (int arg[])

Sets environment coefficients corresponding to a desired environment texture. The coefficients should be obtained with the engine.render.getEnvironmentCoefficients()function beforehand.

Arguments

  • int arg[] - Array containing nine coefficients corresponding to some environment texture.

void engine.render.setEnvironmentExposure (float factor)

Sets a factor by which environment coefficients will be scaled. The default is 1.

Arguments

  • float factor - Factor to scale environment coefficients.

int engine.render.setEnvironmentTextureName (string filename)

Calculates environment coefficients for a given cube-mapped texture. The default is NULL.

Arguments

  • string filename - Environment texture for which coefficients should be calculated.

Return value

1 if calculations are performed successfully; otherwise, 0.

void engine.render.setFadeColor (vec4 color)

Sets the current fade color for the scene on the screen. By gradually changing this value it is possible to create "fade in" and "fade out" effects depending on the w component of the given vector. For example, when the following vectors are passed the result will be:

  • vec4(1,1,1,1) - a fully white screen. Positive w results in additive blending.
  • vec4(0.5,0.5,0.5,1) - light colors on the screen.
  • vec4(1,0,0,1) - R channel for all screen colors is to its maximum; G and B without changes.
  • vec4(0,0,0,0) - there is no fading (no color alterations are done to the screen).
  • vec4(1,1,1,-1) - a fully black screen. Negative w results in scene colors * (1 - RGB), where RGB is the first three components of the passed vector.
  • vec4(0.5,0.5,0.5,-1) - dark colors on the screen.

The default value is vec4(0) (no fade).

Arguments

  • vec4 color - Fade color for the scene on the screen. The provided vector represents RGB channel values (first three components) and a fading coefficient (w component). All components are saturated in the range [-1; 1].

void engine.render.setFieldDistance (float distance)

Sets the distance, at which (and farther) Field nodes will not be rendered.

Arguments

  • float distance - Distance in units.

void engine.render.setFirstFrame (int first)

Sets a value indicating if the first frame should be enabled over the current frame.

Arguments

  • int first - 1 to enable the first frame flag, 0 - to disable.

void engine.render.setGlowLargeExposure (float exposure)

Updates the brightness factor for the large-radius glow. This glow effect creates a large-sized halo around the glowing surface. The default is 1.

Arguments

  • float exposure - Large-radius glow factor. If a negative value is provided, 0 will be used instead.

void engine.render.setGlowMediumExposure (float exposure)

Updates the brightness factor for the medium-radius glow. This glow effect creates a medium-sized halo close to the glowing surface. The default is 1.

Arguments

  • float exposure - Medium-radius glow factor. If a negative value is provided, 0 will be used instead.

void engine.render.setGlowSmallExposure (float exposure)

Updates the brightness factor for the small-radius glow. This glow effect is rendered most close to the glowing surface and creates object-shaped highlight. The default is 1.

Arguments

  • float exposure - Small-radius glow factor. If a negative value is provided, 0 will be used instead.

void engine.render.setGlowThreshold (float threshold)

Updates the threshold, which is used to detect if an object is bright enough to produce glow. The default is 0.1.

Arguments

  • float threshold - Glow threshold. If a negative value is provided, 0 will be used instead.

void engine.render.setHDRAdaptation (float period)

Updates the current period of exposure adaptation. The default is 1.5 seconds.

Arguments

  • float period - Period of adaptation in seconds. If a too small or even negative value is provided, 1E-6 will be used instead.

void engine.render.setHDRBokehColor (vec4 color)

Sets the color for the bokeh effect. The default is vec3(1,1,1).

Arguments

  • vec4 color - Bokeh color.

void engine.render.setHDRBokehEnabled (int enable)

Sets a value indicating if a bokeh effect should be rendered for bright lights across the DOF-blurred range. Both HDR and DOF should be enabled to render this effect. The default is 0 (disabled).

Arguments

  • int enable - Positive value to enable bokeh effect, 0 to disable.

void engine.render.setHDRBokehFarPower (float power)

Sets the power controlling how close the bokeh effect comes into action (across the far blur range of DOF). Decreasing this value enables to start rendering the bokeh effect closer to the camera. It means that the bokeh appears at once rather than gradually getting bigger. The default is 1.

Arguments

  • float power - Far bokeh power. If a too small or a negative value is provided, 1E-6 will be used instead.

void engine.render.setHDRBokehFarSize (float size)

Sets the size of the bokeh effect across the far blur range of DOF. The default is 0.5.

Arguments

  • float size - Far bokeh effect size. The provided value is clamped to the range [0;1].

void engine.render.setHDRBokehNearPower (float power)

Sets the power controlling how close to the focal point the bokeh effect comes into action (across the near blur range of DOF). Decreasing this value allows to render the bokeh effect closer to the focal point. It also means that the bokeh appears in its full size right near the focal point rather than gradually getting smaller up to the in-focus area. The default is 1.

Arguments

  • float power - Near bokeh power. If a too small or a negative value is provided, 1E-6 will be used instead.

void engine.render.setHDRBokehNearSize (float size)

Sets the size of the bokeh effect across the near blur range of DOF. The default is 0.5.

Arguments

  • float size - Near bokeh effect size. The provided value is clamped to the range [0;1].

void engine.render.setHDRBokehScale (float scale)

Sets the multiplier for color of HDR lens flares. The default is 1.

Arguments

  • float scale - Bokeh color scale. If a negative value is provided, 0 will be used instead.

int engine.render.setHDRBokehTextureName (string name)

Sets a custom texture for the bokeh effect.

Arguments

  • string name - Texture name.

Return value

Positive integer if a texture is successfully set; otherwise, 0.

void engine.render.setHDRBokehThreshold (float threshold)

Sets the brightness threshold for the bokeh effect. Increasing this value allows for rendering bokeh only for bright enough light points. The default is 0.

Arguments

  • float threshold - Bokeh threshold. If a negative value is provided, 0 is used instead.

void engine.render.setHDRBrightExposure (float exposure)

Sets a coefficient for decreasing the brightness of all HDR flares (lens, shaft ans cross ones). This function can be used in addition to overall HDR exposure. The default is 1.

Arguments

  • float exposure - Coefficient for normalizing flares brightness.

void engine.render.setHDRCrossAngle (float angle)

Updates the angle between flare shafts of a cross flare. The default is 45 degrees.

Arguments

  • float angle - Angle in degrees.

void engine.render.setHDRCrossColor (vec4 color)

Updates the color of a cross flares. The default is (0, 0, 0, 1).

Arguments

  • vec4 color - Color of cross flares.

void engine.render.setHDRCrossEnabled (int mode)

Enables or disables cross flares. The default is 0 (disabled).

Arguments

  • int mode - Positive integer to enable cross flares, 0 to disable.

void engine.render.setHDRCrossLength (float length)

Updates the length of a cross flare. The default is 0.2 of the screen width.

Arguments

  • float length - Length of a cross flare relative to the screen width. The provided value is saturated in the range [0; 1].

void engine.render.setHDRCrossScale (float scale)

Sets the multiplier for color of HDR cross flares. The default is 1.

Arguments

  • float scale - Cross color scale. If a negative value is provided, 0 will be used instead.

void engine.render.setHDRCrossShafts (int amount)

Updates the number of cross flares. The default is 4.

Arguments

  • int amount - The number of a cross flares. The provided value is saturated in the range [2; 32].

void engine.render.setHDRCrossThreshold (float threshold)

Returns the brightness threshold for cross flares.

Arguments

  • float threshold - Cross flares threshold.

void engine.render.setHDRExposure (float exposure)

Updates the current exposure. The default is 0.15 seconds.

Arguments

  • float exposure - Exposure in seconds. The provided value is saturated in the range [0; 4].

void engine.render.setHDRFilmicLinearAngle (float angle)

Sets the Linear Angle filmic tonemapping parameter value.

Arguments

  • float angle - Liner Angle value.

void engine.render.setHDRFilmicLinearScale (float scale)

Sets the Linear Strength filmic tonemapping parameter value.

Arguments

  • float scale - Linear Strength value.

void engine.render.setHDRFilmicShoulderScale (float scale)

Sets the Shoulder Strength filmic tonemapping parameter value.

Arguments

  • float scale - Shoulder Strength value.

void engine.render.setHDRFilmicToeDenominator (float scale)

Sets the Toe Denominator filmic tonemapping parameter value.

Arguments

  • float scale - Toe Denominator value.

void engine.render.setHDRFilmicToeNumerator (float scale)

Sets the Toe Numerator filmic tonemapping parameter value.

Arguments

  • float scale - Toe Numerator value.

void engine.render.setHDRFilmicToeScale (float scale)

Sets the Toe Strength filmic tonemapping parameter value.

Arguments

  • float scale - Toe Strength value.

void engine.render.setHDRFilmicWhiteLevel (float scale)

Sets the Linear White Point filmic tonemapping parameter value.

Arguments

  • float scale - Linear White Point value.

void engine.render.setHDRLargeExposure (float exposure)

Updates the exposure for the large-radius HDR adaptation effect. This effect is rendered most far from the object surface to create scattered HDR highlight. The default is 1.

Arguments

  • float exposure - Large-radius HDR exposure. If a negative value is provided, 0 will be used instead.

void engine.render.setHDRLensColor (vec4 color)

Updates the color of a lens flares. The default is (0, 0, 0, 1).

Arguments

  • vec4 color - Color of lens flares.

void engine.render.setHDRLensDispersion (vec3 dispersion)

Sets the color displacement for red, greed and blue channels of the lens flares. Can be used to create light dispersion (chromatic aberrations). The default is (1,1,1).

Arguments

  • vec3 dispersion - Lens dispersion displacement per channel. If a negative value is set for a channel, 0 will be used instead.

void engine.render.setHDRLensEnabled (int mode)

Enables or disables lens flares. The default is 0 (disabled).

Arguments

  • int mode - Positive integer to enable lens flares, 0 to disable.

void engine.render.setHDRLensLength (float length)

Sets a length indicating if the whole radial lens flare is rendered on the screen or only a part of it. This option controls how lens flares pattern is distributed. The default is 0.5 (a half of the lens flare is rendered).

Arguments

  • float length - Length of the radial lens flare. The provided value is saturated in the range [0;1].

void engine.render.setHDRLensRadius (float radius)

Sets a radius of the spherical lens flares on the screen. The default is 0.5 (a flare is half of the screen width).

Arguments

  • float radius - Radius of the spherical lens flares. The provided value is saturated in the range [0;1], where 1 is a screen-wide radius (a lens flare is not visible).

void engine.render.setHDRLensScale (float scale)

Sets the multiplier for color of HDR lens flares. The default is 1.

Arguments

  • float scale - Lens color scale. If a negative value is provided, 0 will be used instead.

int engine.render.setHDRLensTextureName (string name)

Updates the texture that modulates the pattern of lens flares. For example, it can be used to create an effect of light reflections or unclean optics when the camera looks at the sun.

Arguments

  • string name - Name of the lens flares modulation texture.

Return value

1 if the texture is successfully set; otherwise, 0.

void engine.render.setHDRLensThreshold (float threshold)

Updates the brightness threshold for lens flares. The default is 0.

Arguments

  • float threshold - Lens flares threshold.

void engine.render.setHDRMaxLuminance (float luminance)

Sets the maximum luminance used for HDR rendering. The default is 10.

Arguments

  • float luminance - Maximum luminance. The provided value is saturated in the range [-10; 10].

void engine.render.setHDRMediumExposure (float exposure)

Updates the exposure for the medium-radius HDR adaptation effect. This effect is rendered at the medium distance from the object surface to create HDR highlight near it. The default is 1.

Arguments

  • float exposure - Medium-radius HDR exposure. If a negative value is provided, 0 will be used instead.

void engine.render.setHDRMinLuminance (float luminance)

Sets the minimum luminance used for HDR rendering. The default is -10.

Arguments

  • float luminance - Minimum luminance. The provided value is saturated in the range [-10; 10].

void engine.render.setHDRShaftAttenuation (float value)

Sets the power of fading for HDR shaft flare across its length. The default is 0.95.

Arguments

  • float value - Fading power. The provided value is clamped to range [0;1].

void engine.render.setHDRShaftColor (vec4 color)

Updates the color of the lens shafts. The default is (0, 0, 0, 1).

Arguments

  • vec4 color - Color of lens shafts.

void engine.render.setHDRShaftEnabled (int enable)

Enables or disables lens shafts.

Arguments

  • int enable - Positive integer to enable lens shafts, 0 to disable.

void engine.render.setHDRShaftLength (float length)

Updates the length of flare shafts. The default is 0.5 of the screen width.

Arguments

  • float length - Length of flare shafts relative to the screen width. The provided value is saturated in the range [0; 1].

void engine.render.setHDRShaftScale (float scale)

Sets the multiplier for color of HDR shaft flares. The default is 1.

Arguments

  • float scale - Shaft color scale. If a negative value is provided, 0 will be used instead.

void engine.render.setHDRShaftThreshold (float threshold)

Updates the brightness threshold for flare shafts.

Arguments

  • float threshold - Flare shafts threshold.

void engine.render.setHDRSmallExposure (float exposure)

Updates the exposure for the small-radius HDR adaptation effect. This effect is rendered most close to the object surface and creates object-shaped HDR highlight. The default is 1.

Arguments

  • float exposure - Small-radius HDR exposure. If a negative value is provided, 0 will be used instead.

void engine.render.setHDRThreshold (float threshold)

Updates the threshold, which is used to detect if an object should be blurred in the HDR mode. The default is 1.

Arguments

  • float threshold - HDR threshold. If a negative value is provided, 0 will be used instead.

void engine.render.setLightDistance (float distance)

Updates the distance, at which (and farther) dynamic lights will not be rendered. The default is infinity.

Arguments

  • float distance - Distance in units.

void engine.render.setLightProbAttenuation (float attenuation)

Updates the attenuation factor for LightProb-based global illumination. The larger this value is, the more smooth and across the larger distance GI fades out.

Arguments

  • float attenuation - GI attenuation factor.

void engine.render.setLightProbDiffuseScale (float scale)

Updates a diffuse light multiplier for LightProb-based global illumination. The default is 1.

Arguments

  • float scale - Diffuse scale. If a negative value is provided, 0 will be used instead.

void engine.render.setLightProbDistance (float distance)

Updates the distance up to which LightProb-based global illumination is rendered. The default is 100 units.

Arguments

  • float distance - GI distance in units.

void engine.render.setLightProbFresnelBias (float bias)

Updates the Fresnel effect bias for specular highlights when rendering LightProb-based global illumination. It sets the minimum limit for specular intensity. The default is 1.

Arguments

  • float bias - Fresnel minimum reflectance level. The higher the value, the brighter specular highlights are at all viewing angles. The value is clamped to range [0;1].

void engine.render.setLightProbFresnelPower (float power)

Updates the Fresnel effect power for specular highlights when rendering LightProb-based global illumination. It defines the amount of reflectance depending on the viewing angle. If the Fresnel bias equals to 1, Fresnel power is not applied. The default is 5.

Arguments

  • float power - Fresnel effect power:
    • Low values provide good reflectance even at a large viewing angles, when looking from above.
    • High values provide the reflectance only at a small viewing angle, when close to the surface.

void engine.render.setLightProbMask (int mask)

Updates the bit mask that determines rendering of LightProb-based global illumination. For LightProb to light a scene around it, at least one bit of this mask should match with the light prob light mask. The default is 1.

Arguments

  • int mask - Integer, each bit of which is a mask for rendering LightProb-based GI.

void engine.render.setLightProbSpecularScale (float scale)

Updates a specular light multiplier for LightProb-based global illumination. The default is 0.

Arguments

  • float scale - Specular scale. If a negative value is provided, 0 will be used instead.

void engine.render.setMotionBlurAngularScale (float scale)

Updates the amount of motion blur by the player angular movement.

Arguments

  • float scale - Scale of player's angular velocity used for the motion blur. If a negative value is provided, 0 will be used instead.

void engine.render.setMotionBlurLinearScale (float scale)

Updates the amount of motion blur by the player linear movement.

Arguments

  • float scale - Scale of player's linear velocity used for the motion blur. If a negative value is provided, 0 will be used instead.

void engine.render.setMotionBlurMaxVelocity (float velocity)

Updates the maximum amount of motion blur for moving physical bodies.

Arguments

  • float velocity - Maximum scaled velocity of bodies used for the motion blur.

void engine.render.setMotionBlurVelocityScale (float scale)

Updates amount of motion blur for moving physical bodies.

Arguments

  • float scale - Scale of bodies' linear and angular velocities used for the motion blur. If a negative value is provided, 0 will be used instead.

void engine.render.setObjectDistance (float distance)

Updates the distance, at which (and farther) objects will not be rendered. The default is infinity.

Arguments

  • float distance - Distance in units.

void engine.render.setOcclusionAmbientAttenuation (float attenuation)

Compensates for falloff of the ambient occlusion with a distance, making it more prominent. The default is 1 (no compensation).

Arguments

  • float attenuation - AO attenuation compensation coefficient. The lower the value, the less the ambient occlusion effect fades out with the distance. The value is clamped to a range [0;1].

void engine.render.setOcclusionAmbientEmitter (float emitter)

Sets a coefficient indicating if the points can occlude (shadow) other points in all directions or only along their normal vectors. The default is 0.0 (AO emitter points shadow other points in all directions).

Arguments

  • float emitter - Normals influence coefficient for AO. The provided value is clamped to the range [0;1].

void engine.render.setOcclusionAmbientPerspective (float perspective)

Sets perspective compensation for the ambient occlusion. When at the far distance, the sampling radius will be automatically increased, if a a value higher than 1 is set. This compensations allows to have small AO details from close by, and shadowing from big objects (for example, a mountain) in the distance at the same time. The default is 1.

Arguments

  • float perspective - Perspective correction for AO. If a negative value is provided, 0 will be used instead.

void engine.render.setOcclusionAmbientPower (float power)

Sets power to which the ambient occlusion term is raised to provide darker shadows. The default is 8.

Arguments

  • float power - Power of ambient occlusion shadowing.

void engine.render.setOcclusionAmbientReceiver (float value)

Sets a coefficient indicating if points can be occluded (shadowed) from all directions or only along their normal vectors. The default is 1 (AO shadows points only along their normal).

Arguments

  • float value - Normals influence coefficient for receiving AO. The provided value is clamped to the range [0;1].

void engine.render.setOcclusionAmbientSampleRadius (float radius)

Sets a radius distance within which the neighboring points can shadow each other. It controls the ambient occlusion effect radius. The default is 1 unit.

Arguments

  • float radius - AO radius in units. If a non-positive value is provided, EPSILON will be used instead.

void engine.render.setOcclusionAmbientScale (float scale)

Sets a multiplier for ambient occlusion shadows. The default is 1 (the maximum AO).

Arguments

  • float scale - Scale of ambient occlusion shadowing. The provided value is saturated in the range [0;1].

void engine.render.setOcclusionAmbientScreenRadius (float radius)

Sets an ambient occlusion radius in screen space, in which shadowing is computed. The default is 0.05.

Arguments

  • float radius - Radius of AO sampling in screen space. The provided value is clamped to the range [0;1].

void engine.render.setOcclusionAmbientThreshold (float threshold)

Sets a depth threshold used to filter ambient occlusion. It specifies the maximum possible depth between sampled points in two pixels, to filter them together. This option allows to have sharp edges, while having smooth AO on flat surfaces. The default is 1 unit.

Arguments

  • float threshold - Filtered depth between sampled points in two pixels. If a non-positive value is provided, EPSILON will be used instead.

void engine.render.setOcclusionLightAttenuation (float attenuation)

Compensates for falloff of the light (directional) occlusion with a distance, making it more prominent. The default is 1 (no compensation).

Arguments

  • float attenuation - GI attenuation compensation coefficient. The lower the value, the less the global illumination fades out with the distance. The value is clamped to a range [0;1].

void engine.render.setOcclusionLightEmitter (float emitter)

Sets a coefficient indicating if the points can illuminate other points in all directions or only along their normal vectors. The default is 1.0 (GI emitter points illuminate reflect light only along their normals).

Arguments

  • float emitter - Normals influence coefficient for GI. The provided value is clamped to the range [0;1].

void engine.render.setOcclusionLightPerspective (float perspective)

Sets perspective compensation for the light (directional) occlusion. When at the far distance, the sampling radius will be automatically increased, if a a value higher than 1 is set. This compensations allows to have color highlights from close by, and GI from big objects (for example, a city) in the distance at the same time. The default is 1.

Arguments

  • float perspective - Perspective correction for GI. If a negative value is provided, 0 will be used instead.

void engine.render.setOcclusionLightPower (float power)

Sets power to which the light (directional) occlusion term is raised to provide darker result. The default is 1.

Arguments

  • float power - Power for the GI term.

void engine.render.setOcclusionLightReceiver (float value)

Sets a coefficient indicating if points can be illuminated from all directions or only along their normal vectors. The default is 1 (GI receiver points receive light only along their normals).

Arguments

  • float value - Normals influence coefficient for receiving GI. The provided value is clamped to the range [0;1].

void engine.render.setOcclusionLightSampleRadius (float radius)

Sets a radius distance within which the neighboring points can illuminate each other. It controls the light (directional) occlusion effect radius. The default is 1 unit.

Arguments

  • float radius - GI radius in units. If a non-positive value is provided, EPSILON will be used instead.

void engine.render.setOcclusionLightScale (float scale)

Sets a multiplier for illumination of the light (directional) occlusion. The default is 1 (the maximum GI).

Arguments

  • float scale - Scale of GI. The provided value is saturated in the range [0;1].

void engine.render.setOcclusionLightScreenRadius (float radius)

Sets a light (directional) occlusion radius in screen space, in which global illumination is computed. The default is 0.05.

Arguments

  • float radius - Radius of GI sampling in screen space. The provided value is clamped to the range [0;1].

void engine.render.setOcclusionLightThreshold (float threshold)

Sets a depth threshold used to filter light (directional) occlusion. It specifies the maximum possible depth between sampled points in two pixels, to filter them together. This option allows to have sharp edges, while having smooth GI on flat surfaces. The default is 1 unit.

Arguments

  • float threshold - Filtered depth between sampled points in two pixels. If a non-positive value is provided, EPSILON will be used instead.

void engine.render.setPostMaterials (string material)

Sets post postprocess materials that are applied after all other postprocess (such as HDR, DOF, etc.) are rendered. Materials are applied in the order of listing. The default is NULL.

They are used together with Player::setPostMaterials(), if any.

Arguments

  • string material - Comma-separated list of post postprocess material names.

void engine.render.setReflectionColor (vec4 color)

Color that allows to adjust reflections of all meshes with reflective materials, i.e.:
  • mesh_reflection_2d_base
  • mesh_reflection_cube_base
  • mesh_paint_reflection_cube_base
and reflective tessellation materials:
  • mesh_tessellation_reflection_2d_base
  • mesh_tessellation_reflection_cube_base
  • mesh_tessellation_paint_reflection_cube_base
The default is (1,1,1,1).

Arguments

  • vec4 color - Reflection color for reflective mesh materials.

void engine.render.setReflectionDistance (float distance)

Updates the distance, at which (and farther) reflections will not be rendered. The default is infinity.

Arguments

  • float distance - Distance in units.

void engine.render.setRefractionDispersion (vec3 dispersion)

Updates the refraction displacement for red, greed and blue channels (according to refraction texture of refractive materials). Can be used to create light dispersion (chromatic aberrations).

Arguments

  • vec3 dispersion - Dispersion displacement per channel. If a negative value is set for a channel, 0 will be used instead.

void engine.render.setRenderMaterials (string material)

Sets render postprocess materials that are applied before all other postprocess (such as HDR, DOF, etc.) are rendered. Materials are applied in the order of listing. The default is NULL.

Arguments

  • string material - Comma-separated list of postprocess material names.

void engine.render.setScatteringAngularity (float angularity)

Compensates for the angular distribution of Rayleigh light scattering. It allows to create a uniformly lit sky instead of a physically-correct one that depends on the sun angle. The default is 1 (no compensation).

Arguments

  • float angularity - Rayleigh light scattering compensation coefficient. The value is clamped to a range [0;1].

void engine.render.setScatteringAreal (float factor)

Sets the aerial perspective scale. The default is 1.

Arguments

  • float factor - Aerial perspective scale. If a too small value is provided, 1 will be used instead.

void engine.render.setScatteringDensity (float density)

Sets the number of molecules per unit volume (Rayleigh scattering). The default is 1.

Arguments

  • float density - Density. If a negative value is provided, 0 will be used instead.

void engine.render.setScatteringDepolarization (float factor)

Sets the depolarization factor (Rayleigh scattering). The default is 1.

Arguments

  • float factor - Depolarization factor. If a negative value is provided, 0 will be used instead.

void engine.render.setScatteringDirection (vec3 direction)

Sets the direction of light scattering. The vector can point in any direction,including downwards if negative values are specified. The default direction is up (vec3(0,0,1)).

Arguments

  • vec3 direction - Scattering direction.

void engine.render.setScatteringEnergy (float energy)

Sets the irradiance of the sun. The default is 0.

Arguments

  • float energy - Irradiance of the sun. If a negative value is provided, 0 will be used instead.

void engine.render.setScatteringGreenstein (float factor)

Sets the directionality factor of phase function (Mie scattering). The default is 0.5.

Arguments

  • float factor - Directionality factor. The provided value will be saturated in the range [0; 1 - 1 E-6].

void engine.render.setScatteringGround (float ground)

Sets the ground zero level. The default is 0.

Arguments

  • float ground - Ground zero level.

void engine.render.setScatteringInnerAngle (float angle)

Sets the inner angle of the sun. Difference between the inner and outer angles defines halo around the sun. The default is 1 degree.

Arguments

  • float angle - Inner angle of the sun.

void engine.render.setScatteringMieColor (vec4 vec4)

Sets the color for Mie scattering. The default is vec4_one.

Arguments

  • vec4 vec4 - Color used for Mie scattering.

void engine.render.setScatteringMieHeight (float radius)

Sets the height falloff for the Mie scattering. The default is infinity.

Arguments

  • float radius - Height falloff. If a negative value is provided, 0 will be used instead.

void engine.render.setScatteringMie (float factor)

Sets the Mie scattering scale. The default is 1.

Arguments

  • float factor - Mie scattering scale. The provided value will be saturated in the range [0; 1].

void engine.render.setScatteringOuterAngle (float angle)

Sets the outer angle of the sun. Difference between the inner and outer angles defines halo around the sun. The default is 2 degrees.

Arguments

  • float angle - Outer angle of the sun.

void engine.render.setScatteringPower (float power)

Sets the scattering power that determines the start distance for attenuation. The default is 1.

Arguments

  • float power - Scattering power.

void engine.render.setScatteringRayColor (vec4 color)

Sets the color for Rayleigh scattering. The default is vec4_one.

Arguments

  • vec4 color - Color used for Rayleigh scattering.

void engine.render.setScatteringRayHeight (float radius)

Sets the height falloff for the Rayleigh scattering. The default is infinity.

Arguments

  • float radius - Height falloff. If a negative value is provided, 0 will be used instead.

void engine.render.setScatteringRay (float factor)

Sets the Rayleigh scattering scale. The default is 1.

Arguments

  • float factor - Rayleigh scattering scale. The provided value will be saturated in the range [0; 1].

void engine.render.setScatteringRefractive (float index)

Sets the atmosphere refractive index (Rayleigh scattering). The default is 1.

Arguments

  • float index - Atmosphere refractive index. If a negative value is provided, 0 will be used instead.

void engine.render.setScatteringColor (vec4 color)

Sets the sun color for scattering. This value does not depend on a world light color. The default is vec4_one.

Arguments

  • vec4 color - Sun color.

void engine.render.setScatteringSun (float brightness)

Sets a degree of brightness of the sun halo. The default is 1.

Arguments

  • float brightness - Brightness of the sun halo.

void engine.render.setScatteringThreshold (float threshold)

Sets the scattering threshold. The default is 1.

Arguments

  • float threshold - Scattering threshold. If a too large value is provided, 1 will be used instead.

void engine.render.setScatteringTurbidity (float turbidity)

Sets the atmosphere turbidity (Mie scattering). The default is 1.

Arguments

  • float turbidity - Atmosphere turbidity. If a negative value is provided, 0 will be used instead.

void engine.render.setShaderDefines (string defines)

Sets an additional shader defines.

Arguments

  • string defines - Additional shader defines.

void engine.render.setShadowDistance (float distance)

Updates the distance, at which (and farther) shadows will not be rendered. The default is infinity.

Arguments

  • float distance - Distance in units.

void engine.render.setStereoDistance (float distance)

Sets the focal distance for stereo rendering (distance in the world space to the point where two views line up, i.e. to the zero parallax plane). The default is 100 units.

Arguments

  • float distance - Focal distance in units.

void engine.render.setStereoOffset (float offset)

Updates the virtual camera offset (an offset after the perspective projection).

Arguments

  • float offset - Virtual camera offset in units. The default value is 0.

void engine.render.setStereoRadius (float radius)

Updates the radius for stereo (the half of the separation distance between the cameras). The default value is 0.

Arguments

  • float radius - Stereo radius in units. If a negative value is provided, 0 will be used instead.

void engine.render.setTessellationDistance (float distance)

Sets the multiplier for the corresponding material parameter. Tessellation distance sets the distance after which the surfaces are not tessellated. The default is 1.

Arguments

  • float distance - Tessellation distance multiplier. If a negative value is provided, 0 will be used instead.

void engine.render.setTessellationFactor (float factor)

Sets the multiplier for the corresponding material parameter. Tessellation factor that controls subdivision of triangles into smaller ones. The default is 1.

Arguments

  • float factor - Tessellation factor multiplier. If a negative value is provided, 0 will be used instead.

void engine.render.setTessellationScale (float scale)

Sets the multiplier for the corresponding material parameter. Tessellation scale determines displacement factor for tessellated surfaces (to what extent geometry is extruded). The default is 1.

Arguments

  • float scale - Tessellation scale multiplier. If a negative value is provided, 0 will be used instead.

void engine.render.setVolumetricAttenuation (float value)

Sets the power of fading for volumetric shadows across their length. The default is 0.95.

Arguments

  • float value - Fading power. The provided value is clamped to range [0;1].

void engine.render.setVolumetricExposure (float exposure)

Sets the contrast used for volumetric shadows. The default is 0.5.

Arguments

  • float exposure - Shadow contrast. The provided value will be saturated in the range [0; 1]. 0 means that the shadows are not seen at all.

void engine.render.setVolumetricLength (float length)

Sets the length of volumetric shadows. The default is 0.5.

Arguments

  • float length - Shadow length. The provided value will be saturated in the range [0; 1]. 0 means that there are no shadows. 0 means that the shadows are long enough to occupy the whole screen.
Last update: 03.07.2017
Build: ()