Skip to content

lib.3d.rendering.SetEnvironment

Thomas Mann edited this page Jan 17, 2024 · 3 revisions

SetEnvironment

in lib.3d.rendering


Sets the image based lighting (IBL) for the current RenderTarget. This texture can then be used by drawing operators for physically based rendering (PBR) further left in the graph.

Some background information: a standard technology for rendering is to use environment textures that store various degrees of roughness in their mip map levels: fully reflective chrome in the highest resolution and very blurry/diffuse reflections in the lower levels. This is not just done be blurring, though: a single ultra bright pixel (E.g. the sun) can brighten the complete diffuse reflection. This computation is very(!) expensive and should not be done in real-time for high resolution environment maps.

To compute this IBL map [SetEnvironment] needs a cube map texture. As of now you can load equirectangular HDR maps only in DDS format and convert them with a [TextureToCubemap]. We are working on making this more convenient. You can also use procedural image textures for this.

NOTICE: For the background environment to have the correctly alignment, the camera must be set after the environment:

[DrawMesh]->[SetMaterial]->[SetPointLight]->[SetEnvironment]->[SetCamera].

Also see: [HowToDrawThings]


Input Parameters

Name (Relevancy & Type) Description
SubTree (CommandRequired) -
CubeMap (Texture2DRequired) -
UpdateLive (Boolean) -
Exposure (Single) -
RenderBackground (Boolean) -
BackgroundBlur (Single) -
BackgroundColor (Vector4) -
BackgroundDistance (Single) -

Outputs

Name Type
Output T3.Core.DataTypes.Command

Please help use to improve this documentation. Feel free to improve the description.

⚠ Everything else is automatically generated and will be overwritten regularly.

Clone this wiki locally