Eyeon:Manual/Fusion 6/3D/Lights and Shadows

From VFXPedia

Jump to: navigation, search
Lights and Shadows

[ Main Manual Page ]


Lighting

Fusion provides four different types of lights for use in 3D scenes; ambient, directional, point and spotlights. These lights can be combined to form very detailed lighting environments. A scene without lights will use a default directional light when the scene is displayed in the views. Once a light is added to the composition by an artist the default light will disappear. To ignore lighting in the display views toggle the Light button in the display view toolbar.

Image:F62_lightingswitch.png

Lighting must be enabled in the Renderer tool. Tools that create or load geometry also present lighting options which can be used to choose whether an object is affected by light or not. When lighting is disabled in either the display views or final renders the image will appear to be lit by a 100% ambient light.

Ambient Light
Ambient Light produces a general uniform illumination of the scene. Ambient light exists everywhere without appearing to come from any particular source. Ambient light cannot cast shadows and will tend to fill in shadowed areas of a scene. Use ambient lights to set a base light level for the scene.
Directional Light
A Directional Light is composed of parallel rays that light up the entire scene from one direction. It is like a wall of light coming from one direction. The sun is an excellent example of a seemingly directional light source.
Point Light
A Point Light is a well-defined light that has a clear source. A light bulb is an excellent example of a point light.
Spot Light
A Spotlight is an advanced point light that produces a well-defined cone of light with falloff, and generally decays over distance. This is the only light type in Fusion capable of producing shadows.

Image:f6_lighticons.png

All of the light tools display on-screen widgets in the views when selected. In the case of the Ambient light the position, rotation, and scaling of this widget has no affect on the results. The directional light can be rotated, but position and scale will be ignored. The point light ignores rotation. All three transformations apply to the Spotlight tool.

Light Hierarchies

Lights normally do not pass through Merges. This provides a mechanism for controlling what objects are lit by what lights. For example, consider the flow below. Two cubes and an ambient light are combined into a merge, which is then connected to a merge with an image plane and a spotlight. The ambient light will affect only the cubes. Its light does not continue downstream to affect the image plane introduced by the next merge. The spotlight will affect the sphere and both cubes, since all three objects are in the scene by this point.

Image:f6_lightmerge_demo.png

To have lights pass through merges to affect downstream objects, click on the Merge tool's Pass Through Lights option.

Per Vertex Lighting vs. Per Pixel Lighting When the OpenGL renderer calculates the effect of lighting on geometry it defaults to the per-pixel model, which calculates the lighting for each individual pixel. This is required for any advanced shading or projection. An older option called per-vertex is also available, which calculates the effect only at the vertices of the geometry. This mode can be enabled in the display view context menu's Lighting Calculation sub-menu, or in the Render tools contorol panel. However, the per-vertex lighting mode is provided for compatibility with older compositions only, and should be avoided in new compositions.

Image:f6_perpixel_vs_pervertex.png

Lighting Options

Most tools that generate geometry have an extra panel of options under the roll out labeled Lighting. These Lighting Options are used to determine how the object reacts to lights and shadows in the scene.

Image:F62_lightingoptions.png

Affected By Lights
If this checkbox is enabled, lights in the scene will affect the geometry.
Shadow Caster
If this checkbox is enabled, the object will cast shadows on other objects in the scene.
Shadow Receiver
If this checkbox is enabled, the object will receive shadows.

Shadows

The only light that can cast Shadows is the Spotlight. Spotlight tools cast shadows by default, although these shadows will not be visible until shadows are enabled using the display view toolbar button. Shadows will not appear in the output of the Renderer tool unless the Shadows option is enabled fopr that renderer. To prevent a spotlight from casting shadows disable the Enable Shadows checkbox in the tool's control panel.

See the Spotlight tool reference for a more detailed description of the shadow controls.

Image:f6_shadowdemo.png

Shadow Maps

The Shadow Map is one or more internal depthmap layers. Each pixel in a depthmap specifies the pixel's depth in the scene. This is used to assemble the shadow layer that is inserted into the scene.

The quality of the shadow produced depends greatly on the size of the shadow map. Larger maps generate better looking shadows. The wider the cone of the shadow, or the more falloff in the cone, the larger the shadow map will need to be to produce useful quality results. The shadow map is square. Set the value of the Shadow Map Size control to set the size of the depthmap in pixels. Larger maps will take longer to render.

Generally, there is a point of diminishing returns where increasing the size of the shadow map no longer improves the quality of the shadow. This point can usually be found by trial and error. It is recommended to not set the size of the shadow maps any larger than they need to be.

The Shadow Map Proxy control is used to set a percentage by which the shadow map is scaled when Fusion is doing fast interactive previews, such as autoproxy and LoQ renders. A value of .4 represents a 40% proxy.

Multiplicative And Additive Bias

Shadows are essentially textures applied to objects in the scene, occasionally resulting in Z-fighting where the portions of the object that should be receiving the shadows render over top of the shadow instead. The picture below shows typical shadowmap Z-fighting on top, and the corrected shadow is shown below.

Image:f6_shadowbiassetting.png

Biasing works by adding a small depth offset to move the shadow away from the surface it is shadowing, eliminating the Z-fighting. When too little bias is added, the objects can self-shadow themselves. When too much is added, the shadow can become separated from the surface.

Adjust the Multiplicative Bias until the majority of the Z-fighting is resolved, then adjust the Additive Bias to eliminate the rest.

The softer the shadow, the higher the bias will probably have to be. Animating the bias may be required to get a proper result for the frames.

Shadow Softness

The spotlight generates shadows without soft edges by default. Additional options produce shadows with constant and variable shadows. Hard edged shadows will render significantly faster than either of the Soft Shadow options. Shadows without softness will generally appear aliased, unless the shadow map size is large enough. Many artists use softness to cheat the aliasing rather than increasing the shadow map to preserve memory and avoid exceeding the graphics cards capabilities.

Image:F62_shadowoptions.png

Setting the spotlights shadow softness to None will render crisp and well defined shadows. The Constant option will generate shadows where the softness is uniform across the the shadow, regardless of the shadows distance from the casting geometry. The Variable option generates shadows that become softer as they get farther from the geometry which is casting the shadow. This is a more realistic effect, but the shadows are somewhat harder to control. When this option is selected, additional controls for adjusting the falloff of the shadow will appear, as well as sliders for the minimum and maximum softness.

Image:f6_shadowdemo_b.png

Selecting the Variable option causes the Spread, Min Softness and Filter Size sliders appear. A side effect of the method used to produce variable softness shadows is that the size of the blur applied to the shadow map can become effectively infinite as the shadows distance from the geometry increases. These controls are used to limit the shadowmap by clipping the softness calculation to a reasonable limits.

The Filter Size determines where this limit is applied. Increasing the filter size increases the maximum possible softness of the shadow. Making this smaller can reduce render times but may also limit the softness of the shadow or potentially even clip it. The value is a percentage of the shadow map size.

See the Spotlight tool reference for additional details on these controls.

Transmittance

The Transmittance of an object's material plays an important role in determining the appearance of the shadow it casts. Normally, the Transmittance behaviour is defined in each object's Materials tab. Selecting the Force All Materials Non-Transmissive overrides these, causing the shadow map produced by this tool to ignore transmittance entirely.

See the Materials section below for more details.



The contents of this page are copyright by eyeon Software.