You are on page 1of 45

LucidShape - Tutorial

First Steps

Copyright © 2013 Brandenburg GmbH


1
Content

• Basic Optical Setup


 Terminology
 Emitter
 Actor
 Sensor

• Ray Tracing
 Monte Carlo Ray Trace
 Light Mapping
 Interactive Ray Trace

LucidShape Tutorial
2
Basic Optical Setup

A basic optical setup consists of a light source,


optical geometry and a sensor.

 Light sources
 Optical geometries (reflectors, refractors)
 Sensors (illumination, luminance, …)

LucidShape Tutorial
3
LucidShape Terminology
“Actor”
“Sensor”

“Emitter”
“Sensor” at ∞

“Actor” “Actor”

In LucidShape light sources are called emitters.


Reflectors and refractors are classified as actors.

 Light source -> emitter


 Reflector, refractor -> actor
 Sensor -> sensor

LucidShape Tutorial
4
LucidShape Terminology
In LucidShape pure geometric objects are called surfaces.

A shape is a combination of a surface and a material.

The material defines the optical properties of the shape.

Shape = Geometry + Material

 Light Sources Shape = Geometry + Emitter Material


 Actor Shape = Geometry + Actor Material
 Sensor Shape = Geometry + Sensor Material

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

A new Geometry View (GeoView) window will appear, providing you


with a work space for the scene.

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)

(3) Change the surface name under “name” to (4)


“light source cylinder”
(4) Set the source center at “origin x,y,z” to (0,0,25)
(5) Create the light source by clicking the “Create”
button

(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)

The right mouse button will open the


context menu showing different options that
can be applied to the GeoView.

LucidShape Tutorial
11
Geometry View
In GeoView the mouse buttons are used for the manipulation
of all visible objects:

(1)

• The left mouse button rotates the


geometry within the window.
• The scroll wheel zooms in and out.
• Holding the scroll wheel down will allow
you to pan the geometry.

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)

(3) Create the sensor by clicking the “Create”


button

The candela sensor is located on


a sphere of infinite radius.
Photometric Quantities and Units
(3)

LucidShape Tutorial
13
Photometric Quantities and Units

• Luminous flux: Φ [lm]

• Solid angle: Ω = A/r2, unit [sr]

• Luminous intensity: I = Φ/Ω, unit [cd]

• Illumination: E = Φ/A1 [lx], A1 = illuminated area

• Luminance: L = I/A2 [cd/m2], A2 = shining area as seen from the observer position

Luminance is a measure for the brightness


impression in the human eye.

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)

(1) To create a plane, select ->Geometry


->Create Surface Shape ->Plane
(2) Change the name of the shape to (3)
“front plane lux sensor”
(3) Change the name of the surface to (4)
“front plane”
(4) Change the origin of the plane to
(x,y,z)=(0,0,50)
(5) Continue on the next page

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*.

* Using an ordinary sensor, a light ray


might not be noticed (sensor slightly
behind the surface) or taken into account
twice (sensor slightly in front of the
surface; the sensor will notice the incoming
and the outgoing, i.e. reflected, ray).

Ray does reach


the sensor twice

Ray does not


reach the sensor

In general, there is a difference


between ray intensities before and
after interaction with an optical
Sensor
surface. Choose which sort of Surface
rays should be taken into account.

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.

GeoView Light Mapping Monte Carlo

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“.

GeoView Light Mapping Monte Carlo

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!

Sensor Hidden Surface

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.

• GPU trace is 10-30 times faster than normal Monte Carlo


• GPU trace requires tessellation mode for operation
• Currently nVidia cards with Cuda 2.0 or higher
are supported exclusively.

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

The basic controls of the UV Data Views (UVVIEW)


are:

 Holding down the left mouse button provides the coordinates


and the illumance values (lx-sensor) or the luminous intensity
values (cd-sensor) at the cursor position

 Scrolling the mouse wheel zooms the UVVIEW

 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.

cd-Sensor lx-Sensor on a plane lx-Sensor on a paraboloid


(angular cell-definition) (metric cell-definition) (metric cell-definition)

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:

• lx sensor on a plane • lx sensor on a paraboloid


• lx sensor on a paraboloid • Lx sensor on a plane set
invisible

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

(1) (2) (3)

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

(5) The red dot in the filament image indicates the


“max edge”, the blue dot the “min edge” of the
filament.

LucidShape Tutorial
43
Simulation of the Test Scene
The Message View provides information about executed LucidShape
commands.

LucidShape Tutorial
44
End

End of the First Steps tutorial.


Please continue with the Simulation I tutorial.

LucidShape Tutorial
45

You might also like