Environment scheme

From HEWIKI
(Redirected from Environment Schemes)
Jump to: navigation, search

Contents

For an easy-level tutorial on creating an Environment Scheme, see Creating an environment scheme.

An Environment Scheme is a template that describes the Lighting properties of a Room or set of rooms. It contains parameters which are used by the rendering loop to achieve various lighting effects. These can be modified via the Environment panel on HeroBlade.

Schemes can be set to "static" or "dynamic".

Static vs Dynamic Schemes

See also: Dynamic Sky If a scheme is set to static, its parameters are set once at design time and do not change based on the time of day. If the scheme is set to dynamic, the parameters are set to Timeline notation and change dynamically as the game day progresses.

Dynamic Environment Schemes

If a scheme is "dynamic", then the constants used to render change based on the time of day. The rate that each parameter changes is encoded in Timeline notation. A loose description of the time index meanings are as follows:

Please note that environment schemes ignore the last two parameters of a timeline, the "loop type" and "lifetime length". The loop type will always be "Loop", and the lifetime will always be "1.0". Please review the Timeline documentation.

For a dynamic scheme, we might have:

AmbientColor = [0.0:#0,0,0,1;L][0.5:#1,1,1,1;L][1.0:#0,0,0,1;L]L;1.0

This says that the AmbientColor interpolates from color #0,0,0,1 at midnight to #1,1,1,1 at noon, then back to #0,0,0,1 at midnight.

Static Environment Schemes

If a scheme is "static", then the constants used to render do not change based on the time of day. It is set to a fixed value at design time. For example, we might have:

AmbientColor = #0,0,0,1

Lighting models

Schemes support two different light models, the Ambient-Diffuse Model and the 3-Point Model.

Both light models' parameters are affected by the scheme being static or dynamic. If the scheme is static, then the color parameters are set using the Color Picker GUI, and encoded in Color notation. If the scheme is dynamic, the color parameters are set using the Timeline GUI, and the parameters are encoded in Timeline notation.

Ambient-Diffuse model

The Ambient-Diffuse Model is defined as

NdotL * DiffuseColor + AmbientColor

Ambient diffuse lighting.PNG

Here is an example of how the "Ambient" and "Diffuse" light colors affect a scene

3-Point model

A 3-point lighting model is a way to define the light color at the front, side, and back of an object.

The 3-Point Model is defined as

if(NdotL > 0) { 
return lerp(SideColor,FrontColor,NdotL); 
} else { 
return lerp(SideColor,BackColor,-NdotL); 
}

 Three point lighting.PNG

Here is an example of how "Front", "Side", and "Back" light colors affect a scene

High Dynamic Range (HDR) Lighting

HDRGroupBox.png
HDR is a style of rendering that allows for lighting calculations to be performed in a larger dynamic range. In a sense allowing for dark things to be dark and bright things to be bright without sacrificing details


More Info on HDR in the HeroEngine

HDR Settings and Complexity


Fog

The fog model supports five parameters. If the scheme is dynamic, each parameter is stored in Timeline notation, and selected with the Timeline GUI.

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox