Difference between revisions of "Lighting and shadows"

From Second Life Wiki
Jump to navigation Jump to search
(Replaced content with "{{#Widget:Redirect|url=/t5/English-Knowledge-Base/Lighting-and-shadows/ta-p/997819}}")
 
Line 1: Line 1:
{{TOCright}}
{{#Widget:Redirect|url=/t5/English-Knowledge-Base/Lighting-and-shadows/ta-p/997819}}
== Overview ==
The lighting and shadows feature in Second Life Viewer 2.7.1 improves the quality of the in-world visual experience, adding:
* High quality real-time shadows.
* Full dynamic lighting for an infinite number of local light sources.
* Special effects such as ambient occlusion and depth of field.
 
Sky and water environments appear and function the same regardless of whether lighting and shadows are enabled.
 
See the [http://community.secondlife.com/t5/Featured-News/New-SL-Viewer-with-Improved-Search-and-Real-Time-Shadows/ba-p/927463 release announcement].
 
=== Prerequisites ===
 
This feature requires an OpenGL 3.0-capable graphics card, such as Nvidia GeForce 8600 and 8800, GTX 2xx, or Radeon HD 4xxxx.
 
If your graphics card cannot support the feature, then it is disabled by default, and you cannot enable it.
 
== Graphics preferences settings ==
 
To enable or change your lighting and shadows settings:
# Choose '''Me > Preferences'''.
# Click the '''Graphics''' tab.
# Click '''Advanced'''.
# Check '''Atmospheric Shaders''' And '''Hardware Skinning''' (under '''Avatar Rendering''').
 
[[Image:Lighting and shadows prefs.png|650px]]
 
{{KBnote|In general, enabling lighting and shadows will lower the frame-rate somewhat; by default the feature is ''disabled'' on hardware where the typical frame-rate would be decreased below 10FPS.}}
 
When '''Atmospheric Shaders''' is enabled, if your system supports it, you can then enable:
* Lighting and Shadows
* Ambient Occlusion
* Shadows
 
When you check '''Lighting and Shadows''', you can then enable '''Ambient Occlusion''', '''Depth of Field''', and select the desired type of '''Shadows'''.
 
To enable '''Water Reflections''', check '''Basic shaders'''.  Options are "Minimal", "Terrain and Trees", "All static objects", "All avatars and objects", "Everything".
 
{{KBwarning|'''Lighting and Shadows''' can greatly lower performance and conflict badly with [[antialiasing]]. If you crash when trying to enable '''Lighting and Shadows''' on an otherwise supported system, disable antialiasing.}}
 
== Shadows ==
 
Shadows are cast in the direction opposite the sun or moon (or other light source).
 
Shadows start fading away as the distance to the object approaches your draw distance (set in your graphics preferences).
 
Faces far from the camera (more than about 256 meters) will not receive shadows.  As they approach this distance, the received shadows quickly fade away. 
 
=== Receiving shadows ===
[[Image:Receivers.PNG|frame|Receiving shadows]]
 
The following can receive shadows:
* Avatars and [[Avatar Impostors|avatar impostors]].
* [[Glow|Glowing prims]].
* [[Sculpted prim|Sculpted prims]].
* Water, ground, and foliage.
* Particles that are not full-bright (this can produce cool "shafts of light" effects).
 
Full-bright surfaces (opaque or transparent) cannot receive shadows.
 
<div style="border: 1px solid #aaa; background-color: #eee; width: 275px; padding: 15px; font-size: 85%;">'''Key to illustrations in this section''':
*A = avatar
*B = opaque object
*C = 39% transparency
*D = 40% transparency
*E = 80% transparency
*F = opaque full-bright object
*G = alpha texture (per-pixel transparency)
</div>
<br clear="all"/>
 
=== Casting shadows ===
 
[[Image:Casters.png|frame|right|Casting shadows]]
 
Things that can cast shadows:
* Alpha pixels that are less than 40% transparent
* Full-brights, glowies, sculpties, avatars, foliage, ground
 
Things that do not cast shadows:
* Alpha pixels 40% or greater transparent
* Avatar impostors
* Particles
 
An object that both casts and receives shadows can cast a shadow on ''itself''.  For example, an avatar's arm can cast a shadow on the avatar's leg, where appropriate.
<br clear="all"/>
 
=== Shadows on bumpy objects ===
[[Image:Bumpgeneral.png|120px|right]]
Full-bright bumpy objects render the same as with lighting and shadows off.
Non-full-bright bumpy objects display realistic lighting for the depth-like roughness detail of the bump texture, according to the direction of the lighting.
 
=== Shadow settings ===
 
In preferences, you can choose to see the following types of shadows:
* None
* Sun / Moon
* Sun / Moon + Projectors
 
==== None ====
Broadly-speaking, setting '''Shadows''' to '''None''' looks similar to turning off '''Lighting and Shadows''' altogether, except:
* A bit smoother lighting from sun, moon, and local lights.
* Shininess on non-full-bright surfaces looks different.
* Any number of lights will now light the scene simultaneously.
* Increased accuracy in lighting means that a bright light near a surface ''may'' now light nearby points on that surface more intensely than previously.
* Avatar impostors are lit similarly to non-impostors
 
==== Sun/Moon ====
 
Setting '''Shadows''' to '''Sun/Moon''' causes all qualifying objects to cast shadows and have shadows cast upon them.
 
==== Sun/Moon + Projectors ====
 
When you select '''Sun/Moon + Projectors''' shadows, objects will cast shadows from the light of the sun and the moon and up to two projector light sources.  Shadows will only be cast from the two most significant projectors in the scene.  Point lights will never cast shadows.
 
== Ambient occlusion ==
 
You may use shadows settings with or without ambient occlusion.
Enabling ambient occlusion causes a subtle darkening of nooks and crannies in shapes.
 
[[Image:Aooffon.png|frame|left|Softer shadows with ambient occlusion]]
<br clear="all"/>
Enabling '''Ambient Occlusion''' and setting '''Shadows''' to '''Sun/Moon''' simultaneously exhibits both effects, with the added effect that shadows are smoother (softer and blurrier).
 
[[Image:Shadall400.png|frame|left|Ambient occlusion and shadows]]
<br clear="all"/>
 
== Depth of field ==
 
Check '''Depth of field''' to make objects far from the focal distance appear fuzzy or out-of-focus.
 
{|
|--
|align=center| [[File:DepthOfField.png|400px|left|Depth of Field On]]
'''Depth of Field On'''
|align=center| [[File:No DOF.png|380px|right|right|Depth of Field Off]]
'''Depth of Field Off'''
|}
 
'''[[Depth of field|Learn more about depth of field]]''' — you can fine-tune settings and achieve effects like tilt-shift (miniature-looking scenes), as shown on the [[Login_screen|login screens]].
 
== Creating light sources ==
 
Creating and editing a light source is the same as in previous releases, but the Build Tools provide some additional options when lighting and shadows are enabled, as shown at right.
[[Image:New build tools options.png|right|300px]]
 
The extra options are:
* Texture-chooser next to the light's color-chooser.  Click it to choose a texture for the light.  This enables you to create ''projectors'', lights that project a texture.  When you select a texture, the following settings then take effect:
* [[#FOV|FOV (field of view) ]]
* [[#Focus|Focus]]
* [[#Ambiance|Ambiance]]
 
The standard light attributes '''color''', '''intensity''', '''radius''', and '''falloff''' have the same effect regardless of whether lighting and shadows are enabled.
 
=== Projectors ===
 
A ''projector'' is a new kind of light source that casts a directional, textured light similar to that of a slide projector.
 
To create a projector light source, select a texture for it in the build tools.
The features of projectors are visible when '''lighting and shadows''' is enabled.
 
A projector differs from a regular (point) light as follows:
* It respects the FOV, Ambiance and Focus attributes.
* It only casts light along its negative Z-axis: the light is ''directional'', and may be pointed at things like a flashlight.
:* Thus, the effect of a projector's light depends on the rotation of the object with the light.
* The projector's light  has the selected  texture, tinted with the color selected alongside it, like a slide-projector.
 
A projector's light will create shadows if:
* You have selected '''Sun/Moon + Projectors''' for your '''Shadows''' preference.
* The projector is one of the two closest to the object casting shadows.
 
[[Image:Proj.png|frame|left|Example of projector light]]
 
==== Limitations ====
Projectors do not project textures onto alpha/transparent faces that have partial transparency.  Such faces are lit by the projector as if '''Lighting and Shadows''' were disabled.
 
When '''Lighting and shadows''' is disabled, a projector behaves like a point light, but it continues to obey the Color, Intensity, Radius, Falloff attributes of the light.  This essentially makes it operate like a spotlight.
<br clear="all"/>
==== Projectors and shininess ====
[[Image:Projref.png]]
 
A projecting prim reflecting in a shiny surface exhibits a reflection of the prim's projected texture.  This is increasingly sharper and brighter, the more shiny the reflecting surface is.
 
==== FOV ====
 
[[Image:Fov.jpg|right]]
 
The '''FOV''' setting defines the ''field of view'' of the projector, in radians.  The field of view is the angular width of the cone of light projected.  The possible range of values from 0.0 to 3.0 correspond to widths from 0 degrees to approx 172 degrees (almost a hemisphere of influence).
Fidelity of shadows caused by a projector may degrade as the FOV becomes larger.
<br clear="all"/>
 
==== Focus ====
 
[[Image:Focus.jpg|left]]
 
A projected texture appears blurrier the further the projection point is from the projector.  The '''Focus''' value controls how attenuated this effect is.  Positive values keep the projection sharper for further, negative values make the projection start to blur at a closer range.
<br clear="all"/>
 
==== Ambiance ====
 
[[Image:Amb.jpg|right]]
 
'''Ambiance''' adds a very blurred version of the projected image to all faces within the cone of influence, regardless of whether they are in shadow or facing away from the projector.  The goal is to roughly simulate light influence being diffused in all directions by surfaces receiving a projected image.  Thus it is acceptable that this be even brighter on faces facing ''away'' from the projector.
The brightness of this effect is proportional to the Ambiance value.
 
<br clear="all"/><br clear="all"/>
 
=== Point lights ===
 
[[Image:Pointlights.png|left|frame|Point light]]
 
Existing in-world point light sources do not cast shadows.
Point lights are largely unaffected by the '''Lighting and Shadows''' setting, except:
* The generated light should generally look smoother (less triangular, less delineated, and more rounded in its influence)
* The generated light may appear brighter on surfaces close to the light source.
* Lights whose areas of influence overlap may make that area seem lit ''much'' brighter than previously.
* ''Every'' light in the scene will have a cumulative influence on lighting (not just the closest six lights).
 
These exceptions may not apply to lighting falling upon transparent or alpha-textured faces: faces with a lot of partial transparency appear essentially identical (apart from shadows falling upon them) regardless of whether '''Lighting and shadows''' is enabled.
[[Category:Pre-release feature documentation]]

Latest revision as of 15:05, 25 July 2011

Redirecting to http://community.secondlife.com/t5/English-Knowledge-Base/Lighting-and-shadows/ta-p/997819