Lighting |
public class LightingRigVisual3D : ModelVisual3D
The LightingRigVisual3D type exposes the following members.
Name | Description | |
---|---|---|
LightingRigVisual3D | Constructor | |
LightingRigVisual3D(String) | Constructor |
Name | Description | |
---|---|---|
AmbientLightColor | Gets or sets the color of the ambient light (default value is White with 8% brightness). Ambient light illuminates the scene from all directions. | |
BackLightColor | Gets or sets the color of the back light (default value is White with 35% brightness). Back light is a DirectionalLight that is directed in the opposite direction as the key light. | |
FillLightColor | Gets or sets the color of the fill light (default value is White with 60% brightness). Fill light is a DirectionalLight that is angled at 90 degrees to the key light. | |
KeyLightColor | Gets or sets the color of the key light (default value is White with 92% brightness). | |
KeyLightDirection | Gets or sets the length of the axis lines |
Name | Description | |
---|---|---|
GetColorFromBrightness | Returns a color that is defined by brightness - a percentage of used White color. 1 means full White, 0.5 means half white (R = 128, G = 128, B = 128)- | |
OnColorPropertyChanged | OnKeyLightDirectionPropertyChanged | |
OnKeyLightDirectionPropertyChanged | OnKeyLightDirectionPropertyChanged | |
SetKeyLightDirection | Sets the key light direction with using simple heading and attitude values (in degrees). | |
ValidateKeyLightDirectionPropertyValue | Returns true if value is valid direction for key light. |
Name | Description | |
---|---|---|
ambientLight | Ambient light illuminates the scene from all directions. | |
AmbientLightColorProperty | AmbientLightColorProperty | |
backLight | Back light is a DirectionalLight that is directed in the opposite direction as the key light. | |
BackLightColorProperty | BackLightColorProperty | |
fillLight | Fill light is a DirectionalLight that is angled at 90 degrees to the key light. | |
FillLightColorProperty | FillLightColorProperty | |
keyLight | Key light is a DirectionalLight that directly illuminates the scene. | |
KeyLightColorProperty | KeyLightColorProperty | |
KeyLightDirectionProperty | KeyLightDirectionProperty |
Name | Description | |
---|---|---|
DumpHierarchy |
Display details about the hierarchy of Visual3D children to Debug console (for example to Visual Studio's Immediate window).
(Defined by Extensions) | |
ForEachGeometryModel3D |
Performs the specified action on each GeometryModel3D inside the rootModelVisual3D.
(Defined by Extensions) | |
ForEachVisual3D |
Performs the specified action on each ModelVisual3D inside the rootModelVisual3D.
(Defined by Extensions) | |
GetName |
Gets name of the Visual3D that was previously set by SetName extension method.
(Defined by Extensions) | |
SetName |
Sets Name property to Visual3D. Note that if name is not correct for WPF, it can be corrected (name must start with a letter or the underscore character (_), and must contain only letters, digits, or underscores).
In this case the SetName method will set the corrected name to the object and return false (in this case you can call GetName to get the corrected name). True is returned when the original name is set to the object.
(Defined by Extensions) |
LightingRigVisual3D is a ModelVisual3D that contains 3 DirectionalLight and one AmbientLight objects that define the standard lighting with key, fill and back light.
The key light is the brightest, and provides the main illumination and shadows. This will typically be positioned to match a real light source such as an overhead lamp, a window, or the sun for an outdoor scene.
The fill light is dimmer, and usually angled at 90 degrees to the key. This is used to soften the shadows, adding shading and definition to areas that would otherwise be solid black.
The back light is positioned behind the character, facing toward the camera. This illuminates only the silhouette edges, helping the character stand out against the background.
The Ambient light adds an slight ambient lighting that illuminates the objects from all directions.
With KeyLightDirection it is possible to change the direction of the key light. This also changes the direction of other lights accordingly.
It is also possible to change the color of each of the light. To make changing color easier, it is possible to use GetColorFromBrightness(Double) method and create a light color only from a brightness percentage value.