Lighting Techniques in NX Render
Lighting Techniques in NX Render
Lighting Techniques in NX Render
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Light<strong>in</strong>g</strong> <strong>Techniques</strong> <strong>in</strong> <strong>NX</strong> <strong>Render</strong><br />
© Copyright LightWork Design Ltd 2005
Overview<br />
� Light types <strong>in</strong> UG<br />
� Shadows <strong>in</strong> UG<br />
� General light<strong>in</strong>g pr<strong>in</strong>ciples<br />
� 3 Po<strong>in</strong>t <strong>Light<strong>in</strong>g</strong> <strong>in</strong> <strong>NX</strong><br />
<strong>Render</strong><br />
� Creat<strong>in</strong>g a “photographic”<br />
light<strong>in</strong>g studio <strong>in</strong> <strong>NX</strong> render<br />
� How to approximate<br />
exterior light<strong>in</strong>g <strong>in</strong> <strong>NX</strong><br />
<strong>Render</strong><br />
© Copyright LightWork Design Ltd 2005
<strong>Light<strong>in</strong>g</strong> <strong>Light<strong>in</strong>g</strong><br />
– Light Types<br />
Light Types available <strong>in</strong> <strong>NX</strong> <strong>Render</strong><br />
Spot<br />
Po<strong>in</strong>t<br />
© Copyright LightWork Design Ltd 2005<br />
Ambient<br />
Distant<br />
Eye<br />
View > Visualization > lights
<strong>Light<strong>in</strong>g</strong> - Spot<br />
Cone of light cast from a location <strong>in</strong> a specified<br />
direction<br />
�Location specified by “to” and “from” po<strong>in</strong>ts<br />
�Shadows can be cast<br />
�Highlight appearance can be controlled<br />
�Often used as primary light source<br />
© Copyright LightWork Design Ltd 2005
<strong>Light<strong>in</strong>g</strong> - Spot Parameters<br />
Cone Angle - Def<strong>in</strong>es the extent of the highlight<br />
Delta Angle - bigger value/softer edge<br />
Beam Fall off - max to m<strong>in</strong> <strong>in</strong>tensity across the highlight<br />
© Copyright LightWork Design Ltd 2005
<strong>Light<strong>in</strong>g</strong> - Spot Parameters<br />
Use Delta Angle to soften highlight edges<br />
Rapid Beam Fall-off can be too soft<br />
© Copyright LightWork Design Ltd 2005
<strong>Light<strong>in</strong>g</strong> - Ambient<br />
Used to approximate reflected diffuse light <strong>in</strong> a<br />
scene<br />
�Colour and <strong>in</strong>tensity parameters<br />
�Independent of visibility, therefore no shadows<br />
�Adds colour value to each pixel<br />
�Effect can be controlled from material reflectance<br />
�Too high a value washes out images<br />
© Copyright LightWork Design Ltd 2005
<strong>Light<strong>in</strong>g</strong> - Distant<br />
Parallel rays of light as if from a distant source<br />
�Location <strong>in</strong>dependent<br />
�Direction vector specified us<strong>in</strong>g to and from po<strong>in</strong>ts<br />
�Shadows can be cast<br />
�Used to simulate sunlight or as a secondary light<br />
source<br />
�Difficult to use with Showroom Environments and<br />
scenery when shadows are enabled<br />
© Copyright LightWork Design Ltd 2005
<strong>Light<strong>in</strong>g</strong> - Po<strong>in</strong>t<br />
F<strong>in</strong>ite source emits light <strong>in</strong> all directions<br />
�Location specified<br />
�Can be localised us<strong>in</strong>g fall-off<br />
�Shadows can be cast<br />
� Generated <strong>in</strong> six directions – can be visually confus<strong>in</strong>g<br />
�Good for represent<strong>in</strong>g the form of complex surfaces<br />
�Ma<strong>in</strong>ly used<br />
© Copyright LightWork Design Ltd 2005<br />
� Simulat<strong>in</strong>g lightbulbs<br />
� Instead of ambient light for <strong>in</strong>teriors<br />
� For special effects<br />
� As secondary light sources
Shadows<br />
Shadows are used to<br />
�Def<strong>in</strong>e spatial relationships of<br />
objects<br />
�Give geometry a feel<strong>in</strong>g of<br />
weight<br />
�Add contrast<br />
�As a tool for composition<br />
© Copyright LightWork Design Ltd 2005
Shadows – Shadow Creation Methods<br />
Two forms of shadow creation<br />
Shadow maps<br />
� Pre process<strong>in</strong>g step<br />
Ray traced shadows<br />
� Performed at render time<br />
Visualization > Advanced Lights > More Options > Detail<br />
© Copyright LightWork Design Ltd 2005<br />
Shadow Map<br />
Raytraced
Shadows - Shadow Maps<br />
Pre-process<strong>in</strong>g step - renders depth<br />
<strong>in</strong>formation <strong>in</strong>to a buffer from the<br />
po<strong>in</strong>t of view of the light.<br />
This <strong>in</strong>formation is used at render<br />
time to create the shadow<br />
� Produces soft edged shadows<br />
� Softness can be controlled - Edges<br />
� Accuracy is dependent on the map<br />
resolution def<strong>in</strong>ed – Detail<br />
� Memory overhead for stor<strong>in</strong>g depth<br />
<strong>in</strong>formation<br />
© Copyright LightWork Design Ltd 2005
Shadows - Detail Parameter<br />
A common problem<br />
with shadow maps<br />
results from the<br />
resolution be<strong>in</strong>g too low<br />
© Copyright LightWork Design Ltd 2005
Shadows – Detail Parameter<br />
1. 3.<br />
2.<br />
Shadow Detail too coarse<br />
Same Detail – smaller cone angle<br />
© Copyright LightWork Design Ltd 2005<br />
4.<br />
Softness can make it worse<br />
Detail <strong>in</strong>creased
Shadows - Ray traced trace<br />
Raytrace shadows are computed on the fly<br />
� Produces hard edged shadows<br />
� No memory overhead<br />
� Highly accurate shadows from detailed<br />
geometry<br />
� Time overhead for trac<strong>in</strong>g rays<br />
� <strong>Render</strong> <strong>in</strong> Raytrace render mode to<br />
anti-alias the shadow edges<br />
© Copyright LightWork Design Ltd 2005
General pr<strong>in</strong>ciples – Modell<strong>in</strong>g with Light<br />
Aim of light<strong>in</strong>g is to convey 3D form <strong>in</strong> a 2D image<br />
Need to use a wide dynamic range<br />
Shadows can <strong>in</strong>crease contrast<br />
© Copyright LightWork Design Ltd 2005
General pr<strong>in</strong>ciples - High Key<br />
High Key light<strong>in</strong>g – Ma<strong>in</strong> areas of the image are light<br />
© Copyright LightWork Design Ltd 2005
General pr<strong>in</strong>ciples - Low Key<br />
Low Key light<strong>in</strong>g – predom<strong>in</strong>antly dark<br />
© Copyright LightWork Design Ltd 2005
Light Direction – Front<br />
� Flattens out the object<br />
� Flattens bump maps<br />
© Copyright LightWork Design Ltd 2005
Light Direction - Side<br />
� Shows form and<br />
texture<br />
� Shadows prom<strong>in</strong>ent<br />
© Copyright LightWork Design Ltd 2005
Light Direction - Back<br />
� Produces silhouettes<br />
� Can be used as rim<br />
lights<br />
� Shadows prom<strong>in</strong>ent<br />
© Copyright LightWork Design Ltd 2005
Light Direction - Top<br />
� Produces <strong>in</strong>tense<br />
shadow directly<br />
underneath the object<br />
� Good for mak<strong>in</strong>g<br />
objects appear to be<br />
on the base plane<br />
© Copyright LightWork Design Ltd 2005
Light Direction - Below<br />
Can be used at low level<br />
to approximate light<br />
bounc<strong>in</strong>g off a base<br />
plane<br />
© Copyright LightWork Design Ltd 2005
User def<strong>in</strong>ed Light Studios <strong>in</strong> <strong>NX</strong> <strong>Render</strong><br />
�Creat<strong>in</strong>g a default light studio other than the supplied default lights will<br />
produce better results<br />
�Provides a good basis to create a new light<strong>in</strong>g set-up<br />
�Save as a visualisation template to use with other parts<br />
© Copyright LightWork Design Ltd 2005<br />
LWK File<br />
Part<br />
Visualisation<br />
Template<br />
Part File<br />
Part File
<strong>Light<strong>in</strong>g</strong> techniques - 3 po<strong>in</strong>t light<strong>in</strong>g<br />
3 po<strong>in</strong>t light<strong>in</strong>g is a technique<br />
used by photographers and<br />
film makers. The same<br />
pr<strong>in</strong>ciples can be transferred<br />
to CG<br />
Ma<strong>in</strong> light<strong>in</strong>g comes<br />
from the side light.<br />
Called the key<br />
light.<br />
© Copyright LightWork Design Ltd 2005
<strong>Light<strong>in</strong>g</strong> techniques - 3 po<strong>in</strong>t light<strong>in</strong>g<br />
Lower <strong>in</strong>tensity light<br />
from opposite side<br />
called the fill light<br />
© Copyright LightWork Design Ltd 2005
<strong>Light<strong>in</strong>g</strong> techniques - 3 po<strong>in</strong>t light<strong>in</strong>g<br />
Backlight to illum<strong>in</strong>ate<br />
the “rim” of the<br />
objects<br />
© Copyright LightWork Design Ltd 2005
<strong>Light<strong>in</strong>g</strong> techniques – 3 po<strong>in</strong>t light<strong>in</strong>g<br />
© Copyright LightWork Design Ltd 2005<br />
Comb<strong>in</strong>ed<br />
together
<strong>Light<strong>in</strong>g</strong> techniques - Photographic light<br />
Photographers use high <strong>in</strong>tensity diffuse sources for “product”<br />
shots<br />
Produce soft light and shadows<br />
Often use sh<strong>in</strong>y bases such as acrylic sheet underneath the subject<br />
to produce reflections – called acrylic shadows<br />
© Copyright LightWork Design Ltd 2005
<strong>Light<strong>in</strong>g</strong> techniques - photographic light<br />
Flood reflector<br />
angled<br />
beh<strong>in</strong>d the subject<br />
subject<br />
table<br />
© Copyright LightWork Design Ltd 2005<br />
Camera/viewpo<strong>in</strong>t<br />
Reflect<strong>in</strong>g card<br />
front<br />
Reflect<strong>in</strong>g card<br />
left and right
Creat<strong>in</strong>g the studio <strong>in</strong> <strong>NX</strong> - Geometry<br />
Reflective (raytraced) objects need objects to reflect so create<br />
scenery geometry like the real light studio<br />
Create a base plane underneath the objects<br />
Create a plane for the area light above the objects<br />
Angle the plane (about 45 degrees)<br />
Create reflector planes left and right<br />
© Copyright LightWork Design Ltd 2005
Creat<strong>in</strong>g the studio <strong>in</strong> <strong>NX</strong><br />
Apply separate visualisation materials to:<br />
The area light<br />
� Colour 1 ,1, 1<br />
� Reflectance: constant<br />
Side reflectors<br />
� colour 0,0,0<br />
� Reflectance: constant<br />
the baseplane<br />
- Colour 1, 1, 1<br />
- Reflectance: matte<br />
© Copyright LightWork Design Ltd 2005
Creat<strong>in</strong>g the studio <strong>in</strong> <strong>NX</strong> - Lights<br />
Use an array of 9 spot lights parallel to each other to<br />
approximate the large area light<br />
Position beh<strong>in</strong>d the objects (relative to the view)<br />
Wide cone angle (120)<br />
Delta angle 0<br />
Beam falloff gradual<br />
Shadows on<br />
Detail Extra F<strong>in</strong>e<br />
Edges Hard<br />
Intensity low (0.15)<br />
© Copyright LightWork Design Ltd 2005
Creat<strong>in</strong>g the studio <strong>in</strong> <strong>NX</strong><br />
� Add 2 distant lights left and<br />
right po<strong>in</strong>t<strong>in</strong>g down at a<br />
shallow angle<br />
� Low <strong>in</strong>tensity (0.2)<br />
� No Shadows (scenery<br />
geometry would cast<br />
shadows)<br />
� Used to simulate reflected<br />
light<br />
© Copyright LightWork Design Ltd 2005
Creat<strong>in</strong>g the studio <strong>in</strong> <strong>NX</strong><br />
� Add a distant light at the front<br />
� Low <strong>in</strong>tensity (0.2)<br />
� Cast Shadows (no geometry<br />
<strong>in</strong> the way)<br />
� Used to simulate reflected<br />
light<br />
© Copyright LightWork Design Ltd 2005
Creat<strong>in</strong>g the studio <strong>in</strong> <strong>NX</strong><br />
<strong>Render</strong> <strong>in</strong> <strong>NX</strong><br />
Soft, extended<br />
shadows<br />
to the front<br />
© Copyright LightWork Design Ltd 2005<br />
Good<br />
render<strong>in</strong>g<br />
of form
Creat<strong>in</strong>g the studio <strong>in</strong> <strong>NX</strong> – Raytrace materials<br />
Apply a mirror reflectance to the base<br />
A raytrace material on the objects (polished gold)<br />
© Copyright LightWork Design Ltd 2005
Creat<strong>in</strong>g the studio <strong>in</strong> <strong>NX</strong><br />
� Set background to be<br />
ray cube<br />
� Primary shader is<br />
pla<strong>in</strong> white (the<br />
background <strong>in</strong> view)<br />
� Secondary is white<br />
(the background <strong>in</strong><br />
reflection)<br />
© Copyright LightWork Design Ltd 2005
Creat<strong>in</strong>g the studio <strong>in</strong> <strong>NX</strong><br />
Effect of the Raycube secondary<br />
sett<strong>in</strong>g<br />
Clouds Pla<strong>in</strong> - purple<br />
© Copyright LightWork Design Ltd 2005<br />
Graduated<br />
white to red
Creat<strong>in</strong>g the studio <strong>in</strong> <strong>NX</strong><br />
Effect of the side reflectors<br />
Set to black<br />
Reflectance - constant<br />
© Copyright LightWork Design Ltd 2005<br />
Graduated<br />
white to red
Creat<strong>in</strong>g a hemispherical light<br />
Distant lights are def<strong>in</strong>ed as a vector so this light studio will<br />
work <strong>in</strong>dependently of model size<br />
Illum<strong>in</strong>ation is constant from all directions around the model so<br />
it works well for animation and QTVR<br />
Save <strong>in</strong> a Visualisation Template for use on different models<br />
© Copyright LightWork Design Ltd 2005<br />
Approximation of a skylight<br />
us<strong>in</strong>g an array of distant lights
Creat<strong>in</strong>g a hemispherical light<br />
Position distant lights evenly across the surface of a virtual<br />
hemisphere (radius 1) po<strong>in</strong>t<strong>in</strong>g to the orig<strong>in</strong><br />
Check shadows on for each light<br />
Set the shadow softness to ultra soft<br />
Set the shadow detail to Standard<br />
Intensity required depends on number of lights<br />
– I used 17 lights with an <strong>in</strong>tensity of 0.2<br />
© Copyright LightWork Design Ltd 2005
Creat<strong>in</strong>g a hemispherical light<br />
The result is even<br />
illum<strong>in</strong>ation with<br />
very soft shadows<br />
as if from an<br />
extended light<br />
source such as the<br />
sky<br />
© Copyright LightWork Design Ltd 2005
Sett<strong>in</strong>g Light Colour<br />
There are colour temp values for real light sources<br />
widely available<br />
These can be converted to RGB<br />
BUT This does not take <strong>in</strong>to account adaption and<br />
will result <strong>in</strong> over-saturated colours<br />
© Copyright LightWork Design Ltd 2005
Light Colour<br />
These RGB<br />
values will<br />
produce a<br />
more realistic<br />
result<br />
© Copyright LightWork Design Ltd 2005<br />
Light Source<br />
Candle<br />
40W<br />
Tungsten<br />
100W<br />
Tungsten<br />
Halogen<br />
Carbon Arc<br />
High Noon<br />
Sun<br />
Direct<br />
Sunlight<br />
Overcast Sky<br />
Clear Blue<br />
Sky<br />
Kelv<strong>in</strong> temp<br />
1900<br />
2600<br />
2850<br />
3200<br />
5200<br />
5400<br />
6000<br />
7000<br />
20000<br />
RGB Values<br />
255, 147, 41<br />
255, 197, 143<br />
255, 214, 170<br />
255, 241, 224<br />
255, 250, 244<br />
255, 255, 251<br />
255, 255, 255<br />
201, 226, 255<br />
64, 156, 255<br />
Colour
Sett<strong>in</strong>g Light Colour<br />
Light Source<br />
Warm Fluorescent<br />
Standard Fluorescent<br />
Cool White Fluorescent<br />
© Copyright LightWork Design Ltd 2005<br />
RGB Values<br />
255, 244, 229<br />
244, 255, 250<br />
212, 235, 255<br />
Colour
Guidel<strong>in</strong>es for <strong>Light<strong>in</strong>g</strong><br />
Th<strong>in</strong>k of UG <strong>Render</strong> as a virtual<br />
photographic studio<br />
�If <strong>in</strong> doubt start with 3 po<strong>in</strong>t light<strong>in</strong>g<br />
�Create re-usable photographic<br />
studios <strong>in</strong> <strong>NX</strong> for specific effects<br />
�Soft light<strong>in</strong>g from extended sources<br />
can be approximated by us<strong>in</strong>g<br />
multiple standard lights<br />
�You will need to consider creat<strong>in</strong>g<br />
geometry around reflective objects<br />
© Copyright LightWork Design Ltd 2005
<strong>Light<strong>in</strong>g</strong> - Summary<br />
� Lots of lights soon become<br />
unmanageable so work<br />
with one light at a time<br />
dur<strong>in</strong>g set-up<br />
� Get as much contrast as<br />
possible <strong>in</strong> your images<br />
� Take ideas from real<br />
photographic light<strong>in</strong>g and<br />
photographs<br />
© Copyright LightWork Design Ltd 2005
Further <strong>in</strong>formation on light<strong>in</strong>g<br />
http://members.shaw.ca/jimht03/light.html<br />
http://www.itchy-animation.co.uk/light.htm<br />
© Copyright LightWork Design Ltd 2005