Professional Documents
Culture Documents
First Steps
• Ray Tracing
Monte Carlo Ray Trace
Light Mapping
Interactive Ray Trace
LucidShape Tutorial
2
Basic Optical Setup
Light sources
Optical geometries (reflectors, refractors)
Sensors (illumination, luminance, …)
LucidShape Tutorial
3
LucidShape Terminology
“Actor”
“Sensor”
“Emitter”
“Sensor” at ∞
“Actor” “Actor”
LucidShape Tutorial
4
LucidShape Terminology
In LucidShape pure geometric objects are called surfaces.
LucidShape Tutorial
5
Test Scene
The first project will be a LucidShape Test Scene.
The setup will consist of:
A light source
A reflector
A candela sensor (luminance)
2 lux sensors (illuminance)
• on a plane
• on a curved surface
LucidShape Tutorial
6
Experimental Setup
Begin the Test Scene by selecting:
->File ->New ->Experimental Setup
LucidShape Tutorial
7
Light Source
(1)
(1) To add a light source, open the light source
(2)
creation dialog by selecting:
->Light source ->Cylinder Light Source
(2) Change the light source object name under
“shape name” to “cylinder light source” (3)
(5)
LucidShape Tutorial
8
Reflector
(1) To add a reflector, open the surface shape (1)
creation dialog by selecting: (2)
->Geometry ->Create Surface Shape (3)
->Rectangular Paraboloid
(2) Change the shape name to “Paraboloid
reflector”
(3) Switch to the material submenu by clicking the
“material” tab
(4) Continue on the next page
LucidShape Tutorial
9
Reflector
(1) Switch to the “actor” tab
(2) Select “Ideal Specular”
(3) Set reflectance to 1
(1)
(2)
(4) Create the reflector by clicking the “Create”
button
(3)
(4)
LucidShape Tutorial
10
Geometry View
The Geometry View (GeoView) will automatically pop up creating a
geometry or shape. An unintentionally closed 3D view can be reopened at
any time by the pressing its icon (1):
(1)
LucidShape Tutorial
11
Geometry View
In GeoView the mouse buttons are used for the manipulation
of all visible objects:
(1)
LucidShape Tutorial
12
Candela Sensor
(1) To add a candela sensor, open the (1)
candela sensor creation dialog by
selecting:
->Sensor ->Candela Sensor
(2) Change the size of the sensor to
[-15,15] x [-15,15] by setting:
umin = -15, umax = 15,
vmin = -15, vmax = 15 (2)
LucidShape Tutorial
13
Photometric Quantities and Units
• Luminance: L = I/A2 [cd/m2], A2 = shining area as seen from the observer position
LucidShape Tutorial
14
Plane Lux Sensor
A lux sensor needs to be linked to a surface. (1)
We create a sensor on a plane.
(2)
LucidShape Tutorial
15
Plane Lux Sensor
A lux sensor is also called illuminance sensor.
(1)
(1) Change to the “material” tab (2)
(3)
(2) Choose the “sensor” tab
(3) Select “Illumination Sensor [lux]”
(4) Create the sensor
(4)
LucidShape Tutorial
16
TreeView
The TreeView shows the entire scene setup in (1)
a structured text style view.
Open the TreeView by clicking on the
TreeView Icon (1) while the GeoView is
highlighted
LucidShape Tutorial
17
TreeView
• Clicking the right mouse button while an
object is highlighted in the TreeView will
activate the context menu to manipulate
an object’s properties:
• Editable
• Visible
• Pickable
• Traceable
• Organize the EVPT Flags at a glance by
using “Set EVPT Flags”.
LucidShape Tutorial
18
Lux Sensor on Geometry
A lux sensor’s supporting geometry does
not have to be planar. It can be attached
to arbitrary curved geometries as well.
(1)
We create a sensor on the reflector
geometry to estimate the efficiency of the
light collecting device.
(1) Copy the parabola surface shape
from the actor shapes tree section.
(CTRL-C)
(2) Paste it on itself (CTRL-V)
(3) Double click on the copied shape
to open the edit dialog
LucidShape Tutorial
19
Lux Sensor on Geometry
(1) Change the shape name to
“rectangle paraboloid sensor” (1)
(2) Change the surface name to (3)
“rectangle paraboloid”
(3) Switch to the “material” tab
(2)
LucidShape Tutorial
20
Lux Sensor on Geometry
(1) Switch to the “sensor” tab
(2) Select “Illumination Sensor [lux]”
(3) Click ->Modify (1)
(2)
(3)
LucidShape Tutorial
21
Exit Sensor
There is an alternative to creating a copy of the reflector and assigning a sensor surface.
One can add a special type of sensor, the “Exit Sensor”, to the original reflector as a kind of second
material. An Exit Sensor avoids side effects which may occur with an ordinary sensor*.
LucidShape Tutorial
22
Test Scene: Overview
After having created the TreeView,
we’ll end up with a similar test scene as below:
lux sensor on
plane
lux sensor on
reflector
GeoView cd sensor
TreeView
Message
Window
LucidShape Tutorial
23
Test Scene: Recovery
A similar test scene can also be created by “Tests“ -> “Test Scene“
LucidShape Tutorial
24
Simulation: Ray Tracing
LucidShape Tutorial
25
Simulation: Ray Tracing
The ray trace options Monte Carlo Ray Trace and Light Mapping are
important for
Development of optical systems
Physically correct light outcome forecasts of:
• photometrical values
• light quality (e.g. evaluation of homogeneity)
The Interactive Ray Trace possibilities are especially important for fast
Geometry inspection
Testing of functionality
Interactive adjustment
LucidShape Tutorial
26
Simulation: Ray Tracing
Both ray tracing methods can be accessed under the “Simulation”
menu in LucidShape. Either type of ray tracing method can be
triggered quickly by using the ray tracing icons found just below the
menu bar:
LucidShape Tutorial
27
Background: Monte Carlo Ray Trace
Ray Trace Algorithm:
1. Start a random ray from the source
2. Calculate intersections between ray and actor surfaces
3. Calculate normal at intersection point
4. Transmit the ray by Snell’s law to the next surface or into the sensor
1st Interface
3rd Interface N N
2nd Interface
Sensor Reflector
Source
Absorber
Lens
LucidShape Tutorial
28
Background: Light Mapping
Light Mapping Algorithm:
1. Start at known (random) points on the actor surface (except absorbers)
2. Get the incoming ray by the vector (light source, surface point)
3. Get the known normal at the very surface point
4. Calculate the outgoing ray by Snell’s law
5. Transmit the outgoing ray directly into the sensor
N
Reflector
N
Sensor Source
N Absorber
LucidShape Tutorial
29
Light Mapping Limitations
Light Mapping ignores direct light to the sensor.
LucidShape Tutorial
30
Light Mapping Limitations
Light Mapping does not work correctly if there is a 2nd actor shape in the scene which is
between the 1st actor shape and the sensor. Especially lenses are not traceable with the Light
Mapping method. However, absorber shapes are mapped correctly.
For demonstration purposes, the test scene has been altered by changing the front plane
material to actor “Ideal Specular“.
LucidShape Tutorial
31
Light Mapping Limitations
Hidden surfaces which do not receive light will still be considered by the Light Mapper.
Hidden “gap surfaces” add light which is physically not there.
However, hidden surfaces can be processed correctly by the Light Mapper by checking the
“consider possible facet shadowing” option. Be warned: The ray trace will take considerably
longer with this option active!
Reflector
Source Absorber
LucidShape Tutorial
32
GPU Trace
GPU Trace is a Monte Carlo ray trace which utilizes the graphics
processing unit (GPU) for ray tracing.
High performance GPUs can field over a thousand thread
processors, making them ideal for parallel computing.
LucidShape Tutorial
33
Simulation of the Test Scene
Now that we have discussed the ray trace approaches available with
LucidShape, let us simulate the Test Scene with 1000.000 rays:
LucidShape Tutorial
34
Simulation of the Test Scene
The Monte Carlo Ray Tracer The Light Mapper does not
does recognize direct light from recognize direct light from the
the light source light source
LucidShape Tutorial
35
UV Data View
Moving the mouse cursor while holding the scroll wheel pans
the data
The right mouse button will open the context menu allowing
to change the viewing properties of the UV data
LucidShape Tutorial
36
UV Data View
Once, the scene has been ray traced, it is crucial to have flexible means to
visualize the result. We have prepared two different types of sensors. These
sensors can be opened together by the UVVIEW icon.
LucidShape Tutorial
37
UV Data View
The lx sensor on the optical surface can be displayed in a more intuitive style by
„Toggling Light Data“ while the GeoView is highlighted:
LucidShape Tutorial
38
Interactive Ray Trace
The Geometry View can be used to visualize
(1) Single random rays by triggering the random ray icon
(2) A ray bundle starting at a reflector position indicated by the mouse cursor
position: CTRL + left mouse button
(3) A grid of ray bundles: CTRL + right mouse button
LucidShape Tutorial
39
Interactive Ray Trace
If desired, change its properties in “Ray Analysis Properties” of the geometry
view’s context menu:
LucidShape Tutorial
40
Test Scene: Light Screen View
The ray tracer operates with point light sources as the origin of the
traced rays.
The Light Screen View displays the spatial extension of the light
source. The optical geometry generates light source images which
are mapped to a target, in this case the 10 m wall used in automotive
lighting.
(1) Activate the Light Screen View
(2) If required, change the properties of the Light Screen View by it’s context menu
(1) (2)
LucidShape Tutorial
41
Test Scene: Light Screen View
(3) Indicate points in the reflector by CTRL + left mouse button (double click): This
pegs the rays and the filament images persistent to their respective views
(4) Hold down the left mouse button and the CTRL key to have the rays and the
filament images continuously updated
LucidShape Tutorial
42
Test Scene: Light Screen View
LucidShape Tutorial
43
Simulation of the Test Scene
The Message View provides information about executed LucidShape
commands.
LucidShape Tutorial
44
End
LucidShape Tutorial
45