| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| 2 |
"http://www.w3.org/TR/html4/loose.dtd"> |
| 3 |
<html> |
| 4 |
<head> |
| 5 |
<title>BALLView Raytracing Demo 1</title> |
| 6 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| 7 |
</head> |
| 8 |
<body> |
| 9 |
<blockquote> |
| 10 |
|
| 11 |
<h3>Setting the Light Sources</h3> |
| 12 |
In a typical scenario, the default light settings are often inappropriate. |
| 13 |
So let's try to recreate the better light settings as shown in the last step. |
| 14 |
<br> |
| 15 |
<br> |
| 16 |
The light sources of the scene can be modified using the <b>Preferences</b> dialog. |
| 17 |
Open it by clicking the menu entry |
| 18 |
<br> |
| 19 |
<b>"Edit->Preferences"</b> |
| 20 |
<br> |
| 21 |
and highlighting the entry <b>"Lighting"</b>. |
| 22 |
<br> |
| 23 |
|
| 24 |
<h4>Setting the Light Intensity</h4> |
| 25 |
Playing with the light intensity and attenuation is one of the keys |
| 26 |
to creating exciting raytracing images. |
| 27 |
|
| 28 |
Change the intensity of the current light by highlighting <b>Light 1</b> |
| 29 |
in the <b>Light Sources</b> list and setting its intensity to <b>500</b>. |
| 30 |
Activate your choice by pressing the <b>Apply</b> button. |
| 31 |
<br> |
| 32 |
|
| 33 |
<h4>Set the Light Position</h4> |
| 34 |
A light's position can either be |
| 35 |
<ul> |
| 36 |
<li>relative to the camera or |
| 37 |
<li>absolute in the scene. |
| 38 |
</ul> |
| 39 |
In order to find a good light position, we attach the light to the camera, |
| 40 |
move until an acceptable scene is reached, and then change it to an absolute position.<br> |
| 41 |
First attach the light relative to the camera at <b>Position (1, -2, -15)</b> and |
| 42 |
activate this change by pressing the <b>Apply</b> button. <br> |
| 43 |
Then find an appropriate light position by changing |
| 44 |
the camera location (clicking and draging the mouse).<br> |
| 45 |
If you found a nice spot, switch to an <b>absolute</b> light orientation and activate |
| 46 |
it by clicking the <b>Apply</b> button. <br> |
| 47 |
Now we can change the camera position, e.g., rotate around the molecule, but the |
| 48 |
light will keep its position.<br> |
| 49 |
Finally, try to set the light to the <b>absolute position</b> of <b>(-2, 24, -14)</b> |
| 50 |
(Do not forget to press the <b>Apply</b> button!) |
| 51 |
and re<b>focus</b> the camera (Structures window->right click->Focus). |
| 52 |
<br> |
| 53 |
The resulting scene is clearly too bright. |
| 54 |
|
| 55 |
This can be changed by setting the attenuation. |
| 56 |
<br> |
| 57 |
|
| 58 |
|
| 59 |
<h4>Change the Attenuation</h4> |
| 60 |
The attenuation determines the loss of intensity with increasing distance |
| 61 |
to the light source. It is determined by three |
| 62 |
coefficients:<ul> |
| 63 |
<li> constant, |
| 64 |
<li> linear, and |
| 65 |
<li> quadratic.</ul> |
| 66 |
Using constant attenuation, e.g., (2,0.0), the light intensity does not decrease |
| 67 |
with the distance.<br> |
| 68 |
Linear attenuation, e.g., (0, 10, 0), yields a light intensity decreasing linearly with distance from the light source.<br> |
| 69 |
Using quadratic attenuation, e.g. (0, 0, 1), the intensity decreases quadraticly.<br> |
| 70 |
For the current scene set the <b>attenuation</b> to <b>(0, 0, 0.7)</b>.<br> |
| 71 |
Activate your choice by pressing the <b>Apply</b> button. |
| 72 |
<br> |
| 73 |
|
| 74 |
<h4>Change the Light's Colour</h4> |
| 75 |
Sometimes a smoother light might look more appealing than a flashy light. <br> |
| 76 |
The light's color can be changed by pressing the <b>Edit</b>-button of the |
| 77 |
Intensity box. Choose a smoother color, e.g., light yellow. The color can be selected |
| 78 |
using the color picker, a CMYK model, or the RGB model.<br> |
| 79 |
Set a light yellow color by choosing, in the RGB-Model, Red=255, Green=245, and Blue=208.<br> |
| 80 |
Activate your choice by pressing the <b>OK</b> button of the Select Color dialog and by pressing the <b>Apply</b> button. |
| 81 |
<br> |
| 82 |
|
| 83 |
|
| 84 |
<h4>Add a Second Light Source</h4> |
| 85 |
More advanced light settings can be achieved by positioning additional light sources which might spice up the scene. Note, however, that raytracing performance |
| 86 |
decreases linearly with the number of light sources.<br/> |
| 87 |
|
| 88 |
To add a point light source, press the <b>Add</b> button within the Light Sources list. |
| 89 |
All its properties can be easily changed after hightlighting the new light <b>Light 2</b>. |
| 90 |
<br> |
| 91 |
Try to position a second light source at absolute position <b>(-6.3, 3.1; -1)</b> |
| 92 |
with attenuation of <b>(1, 0, 0.9)</b>, and Intensity of <b>18</b>.<br> |
| 93 |
Close the Preferences dialog by pressing the OK button. |
| 94 |
<br> |
| 95 |
<br> |
| 96 |
Press <b>Next</b> to continue. |
| 97 |
<br> |
| 98 |
<br> |
| 99 |
</blockquote> |
| 100 |
|
| 101 |
</html> |