This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrendering.html
1288 lines (923 loc) · 41 KB
/
rendering.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<!-- Creation date: 01/03/02 -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>rendering.html</title>
<meta name="Author" content="Julian MacDonald">
</head>
<body style="background-color: rgb(248, 232, 158);">
<font face="tahoma" size="2">
<div align="left"><a href="materials.html"><b><font size="4">Previous: Materials</font></b></a></div>
<div align="right"><a href="animation.html"><b><font size="4">Next: Animation</font></b></a></div>
<br>
<font face="tahoma" size="6"><strong>5. Rendering</strong></font>
<img src="man_title_small.jpg" align="middle"><br><br>
<br>
<br>
<br>
Rendering is the process which converts the scene of 3D objects and
lights into a 2D image or collection
of 2D images. The 2D image that is obtained from rendering is
calculated based on the positions and parameters of all relevant
objects in the scene. The program that performs these calculations is
called a rendering engine and in Art of Illusion there are 2 available
rendering engines: The Raster Engine and the Raytracer Engine. These
are described in detail in Sections 6.3 and 6.4.<br>
<br>
<br>
<a name="cameras"></a><strong><font color="#3300cc" size="5">5.1 Cameras</font></strong><br>
<br>
Cameras are what give us the viewpoint from which the rendered image is
taken. A scene can have as many
cameras as you like and the camera whose viewport is required can be
set through the render dialogues.<br>
<br>
<a name="camera_options"><strong><font color="#ff6633" size="4">5.1.1 Camera Options</font></strong></a><br>
<br>
Before we look at the details of rendering, we should be aware of the
options available for
each camera in the scene. Double-clicking on a camera in the object
list or selecting <b> Object ->
Edit Object </b> displays a dialogue box similar to that below:<br>
<br>
<table>
<tbody>
<tr>
<td><img src="rendering/camera_prop_dial.png"></td>
<td><font face="tahoma" size="2">There
are 3 parameters that can be set for each camera:<br>
<br>
<b>Field of View</b> This is the vertical angle that
the camera can 'see'. The field of view can range from 0
to 180 degrees. The horizontal field of view is determined by the
aspect ratio of the image.
Some interesting effects can be created by varying this parameter. The
examples below
were created by varying the field of view and zooming in on the object:<br>
<br>
<img src="rendering/field_of_view.jpg"> </font></td>
</tr>
</tbody>
</table>
<b>Depth of Field</b> This is the distance either side of
the focal distance that remains in focus. Anything
outside this range is out of focus. This has no effect unless a Depth of Field
filter is added to the camera, or the <b>Depth
of Field</b> option is turned on in the rendering engine
(currently, only the raytracer supports this).<br>
<br>
<b>Focal Distance</b> This is the distance that is
perfectly in focus. As with <b>Depth of Field </b>
this only has an effect if a Depth of Field filter is used, or
the <b>Depth of Field</b>
option is turned on in the rendering engine.<br>
<br>
<b>Perspective</b> This option selects whether the image is rendered with a
perspective or parallel projection.
<p>
Camera filters are dealt with in the next section.
<br>
<br>
<br>
<a name="camera_filters"></a><strong><font color="#ff6633" size="4">5.1.2 Camera Filters</font></strong><br>
<br>
Camera filters are a way of applying post processing to rendered
images, i.e. they are 2D effects applied
to the image produced by the renderers. Camera filters are accessed
through the <a href="#camera_options">camera options
dialogue</a>. Clicking on the <img src="rendering/filters_icon.jpg">
button opens the camera filter dialogue as shown below:<br>
<br>
<table>
<tbody>
<tr>
<td><img src="rendering/camera_filters_dial.jpg"></td>
<td width="300"><font face="tahoma" size="2">On the left is a list showing the camera filters
that are available.
Currently there are 9 filters
to choose from. To apply a filter, select it in the list and click on <b>Add>></b>.
This adds a filter
of the selected type to the right hand list. Filters in the list are
applied to the image in a top
down order. You can have as many filters as you like in the list and
their order can be altered using
the <b>Move Up</b> and <b>Move Down</b>
buttons. Filters can also be deleted via the <b>Delete</b>
button. <br>
<br>
Selecting filters in the right hand list displays their adjustable
parameters in the panel beneath. For
example, the <b>Glow</b> filter's parameters are <b>Radius</b>,
<b>Intensity</b> and <b>Shape</b>.<br>
<br>
On the right of the dialogue is a preview of the rendered image. The
rendering parameters for this preview
can be selected by clicking on <b>Configure Preview</b>
which brings up the a dialogue with most of the
usual rendering options. </font></td>
</tr>
</tbody>
</table>
<br>
<br>
Most of the filters are fairly self-explanatory and a preview is
available in the dialogue so that
effects can be fine-tuned.<br>
<br>
The example below shows a sepia tone effect achieved using Saturation,
Tint and Brightness filters.<br>
<br>
<img src="rendering/camera_filters.jpg"><br>
<br>
Another example below shows the use of the Outline filter (and the Blur
filter). The Outline filter draws lines around objects in the scene
depending on their depth. There are 4 parameters for this filter; <b>Thickness</b>
is the thickness of the lines drawn, <b>Change Cutoff</b>
and <b>Distance
Cutoff</b> are the parameters that control how and when lines are
drawn. The <b>Color</b> is the
colour of the lines drawn.<br>
<br>
<img src="rendering/outline_filter_ex.jpg"><br>
<br>
The Exposure Correction filter is a useful one for Global Illumination
scenes as it applies a gamma correction to the rendered image which can
enhance darker areas as shown in the example below:<br>
<br>
<img src="rendering/exposure%20correction.jpg"><br>
<br>
<br>
<a name="noise_filter">The Noise Reduction
Filter</b></a> is used to blur noisy parts of an image. The filter applies 'intelligent'
smoothing to those parts of the image
that need it, while preserving the wanted image features. <b>Noise Reduction</b> controls
how much blurring is applied; the greater the number, the more
smoothing. An example is shown below.
All these images were rendered with Min Rays 4, Max Rays 32 and
different levels of filtering are
applied. As seen, this filter can effectively smooth out fine noise
while retaining the key elements of the scene. Too much filtering,
however, does start to affect the desired features.
<p>
<img src="rendering/noise_filter.jpg">
<p>
The Depth of Field filter blurs parts of the image based on how far from the
camera they are. This is one way to create a depth of field effect, where the
camera is "focused" at a particular distance, while objects that are nearer or
further away are blurred and out of focus. (You can also create this effect by
enabling the <a href="#raytracer">raytracer's</a> Depth of Field option. The
raytracer creates a more physically accurate depth of field effect, but is much
slower than the filter.)
<br>
<br>
The parameters for each filter can also be animated. See the <a href="animation.html#camera_filter_anim">
Animation</a> chapter for more details.<br>
<br>
<br>
<a name="environment"></a><strong><font color="#3300cc" size="5">5.2 Environment Settings</font></strong><br>
<br>
<br>
Various environment options can be set up by selecting <b>Scene
-> Environment </b>. This displays the
following dialogue:<br>
<br>
<table>
<tbody>
<tr>
<td><img src="rendering/environment_dial.jpg"></td>
<td><font face="tahoma" size="2"> <b>Ambient
Color</b> defines the colour and intensity
of light falling on every surface, not coming from any particular
source but from every direction equally.<br>
<br>
<b>Environment</b> This sets the background which can
either be a colour or a texture. To select a colour, select <b>Solid
Color</b> from the drop down menu and click on the colour bar
beneath this menu to select
a colour. To set a texture, select <b>Texture Diffuse</b>
or <b>Texture Emissive</b> from the menu. Click on <img src="rendering/env_set.jpg">
to choose a texture to use. The specified texture is mapped to a sphere
of radius 1, and the colour of each point on the sphere (either the
diffuse or emissive color of the texture) determines the light coming
from that direction. This is seen as a background to rendered images
and is also specularly reflected by shiny objects in the scene and (if <a href="#glob_illum">global illumination</a> is enable)
diffusively reflected by other objects. <br>
<br>
</font></td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td width="500"><font face="tahoma" size="2"> <b>Environment Fog</b> produces a
uniform fog effect.
The <b>Fog Color</b> defines the colour of the fog
using the usual colour chooser. The amount of light getting through to
the camera from a point at a distance <i>r</i> from the
camera is given by <font size="4">e <sup>-r/d</sup></font>
where <i>d</i> is the <b>Fog Distance</b>.
Objects much closer to the camera than <i>d</i> will be
relatively unobscured by the fog. The best effects are obtained with
the fog colour similar to the Environment colour.<br>
</font></td>
<td><img src="rendering/fog.jpg"></td>
</tr>
</tbody>
</table>
<br>
<br>
<br>
<a name="raster"></a><strong><font color="#3300cc" size="5">5.3 Raster Engine</font></strong><br>
<br>
<br>
The only advantage of the Raster Engine over the Raytracer is speed but
you need to be aware that
this rendering engine does not have the ability to replicate shadows
and reflections.<br>
<br>
A raster renderer works by drawing triangles to the screen. Each object
is broken up into triangular facets, a transform is performed to
calculate the position of each triangle on the image and the
triangle is filled in. The colour of a point on the triangle is
determined by the texture at that point and
the light striking the surface there. There are two standard algorithms
supported by Art of Illusion for
calculating the latter: Gouraud Shading and Phong Shading.<br>
<br>
Gouraud shading works by calculating the light striking each corner of
the triangle and interpolating
it to find an estimate of the light at each pixel. Phong shading
interpolates to estimate the surface normal at each point and uses that
to find the total light striking the surface at that point. Gouraud
shading is faster but less accurate and is particularly poor for shiny
surfaces.<br>
<br>
The Raster Engine is unable to render shadows or reflections so you
will need to revert to the Raytracer
in that situation.<br>
<br>
To render a scene with the Raster Engine, select <b>Scene
-> Render Scene </b> and select <b>Raster</b>
from the top right of the dialogue that appears:<br>
<br>
<a name="raster_options"><strong><font color="#ff6633" size="4">5.3.1 Raster Rendering
Options</font></strong></a><br>
<br>
<table>
<tbody>
<tr>
<td><img src="rendering/raster_options.png"></td>
<td><font face="tahoma" size="2">The <b>Width</b>
and <b>Height</b> define the
size (in pixels) of the 2D image created.<br>
<br>
The <b>Camera</b> selected defines which view will be
rendered. The view can be previewed by selecting
the relevant camera in one of the view windows and ensuring that the
zoom is set to 100.<br>
<br>
You can select whether to render a <b>Single Image </b>
or a <b>Movie</b>. The <b>Movie</b> option
actually produces a series of consecutively-numbered images which can
be converted to a video format
by many available graphics packages. See <a href="animation.html">animation</a>
for more details on rendering movies.<br>
<br>
The next set of boxes, i.e. <b>Start Time</b>, <b>End
Time</b>, <b>Frames/Sec</b> and <b>Images/Frame</b>
are all related to animation. Refer to <a href="animation.html">that
section</a> for details. </font></td>
</tr>
</tbody>
</table>
<br>
<br>
<b>Surface Accuracy</b> defines how accurately geometry
within the scene is rendered. The lower the value,
the more accurate. The value is actually the distance that the
triangles that make up the
surface have to be within the true surface. Bear in mind, though, that
the extra accuracy means additional render times. Here are some
examples showing the effect of varying the surface accuracy:
It should never be necessary to set the surface accuracy below 0.005.<br>
<img src="rendering/raster_surface_acc.jpg"><br>
<br>
<b>Shading Method</b> is either Gouraud, Phong or Hybrid.
Gouraug and Phong shading have been explained above.
The Hybrid options uses a combination of both; Gouraud for the diffuse
reflections, and Phong for the specular reflections. This gives results
which are intermediate between the two methods for both speed and
quality. A simple example is given below:<br>
<br>
<img src="rendering/shading.jpg"><br>
<br>
<b>Supersampling</b> is a method that produces smoother
looking images by performing additional sampling either over the whole
geometry ('Everything') or for the 'edges' which are prone to
jaggedness. The area that is supersampled can be either 2x2 or 3x3
pixels.<br>
<img src="rendering/raster_supersampling.jpg"><br>
<br>
<b>Transparent Background</b> This produces an image with a
background that is transparent, i.e. it adds
an alpha channel to the image (if saved in TIFF format). A 2D paint
program should then allow a
selection to be made using the alpha channel.<br>
<br>
The <b>Advanced</b> tab contains the following additional settings:
<p>
<table>
<tbody>
<tr>
<td><img src="rendering/raster_advanced_dial.png"></td>
<td><font face="tahoma" size="2"> <b>Texture
Smoothing</b> applies antialiasing to all
textures in the scene to remove details smaller than a pixel to
overcome problems that can arise with under- or over-smoothing in the
renderer or texture.
A value of 1 is the default amount of smoothing. Values greater than 1
do more smoothing and values less
than 1 do less.<br>
<br>
<b>Reduce Accuracy for Distant Objects</b> If this is
checked then objects further away in the scene have
a lower surface accuracy than those that are near. This provides
optimum performance with very little
noticeable difference in quality of output.
</td>
</tr>
</tbody>
</table>
<p>
<b>Eliminate backfaces</b> The triangles drawn by the
raster engine have a front and a back. Normally
the backfaces are not seen and the render can optimise performance by
not drawing them. On some occasions, however, e.g. inside closed
objects, the backfaces will be seen and this option will need be
to be unchecked.<br>
<br>
<a name="raster_hdri"/><b>Generate High Dynamic Image</b></font><font face="tahoma" size="2">
If this is turned off, then the pixel colours in the rendered image(s) are a
combination of red, blue and green channels, each with a range of 0 -
255. This limits
the range of intensities present in an image. Switching this option on,
produces floating point pixel data
in the rendered image instead, which effectively allows an infinite
range of colours/intensities. This is
only worth doing if the image format used to save the rendered image(s)
supports floating point, i.e. .hdr.</font>
<br>
<br>
<a name="raytracer"></a><strong><font color="#3300cc" size="5">5.4 Raytracing Engine</font></strong><br>
<br>
<br>
A raytracter "shoots rays" from the viewpoint into the scene. It
decides what colour to make a pixel by tracing a straight line from the
camera location through the point on the image plane that corresponds
to that pixel, and seeing whether it hits any object. If it does, it
then considers the point that got hit. It traces rays to each light
source to see if there is anything in the way. If the object is
transparent, it uses the object's index of refraction to determine a
"transmitted ray
direction", and traces a ray in that direction. If the object is shiny,
it determines a "reflected ray direction" and traces yet another ray in
that direction. And if that ray in turn hits an object, it will trace
yet more rays.<br>
<br>
To render a scene with the Raytracer Engine, select <b>Scene
-> Render Scene </b> and select <b>Raytracer</b>
from the top right of the dialogue that appears:<br>
<br>
<a name="raytracer_options"><strong><font color="#ff6633" size="4">5.4.1 Raytracer Basic
Rendering Options</font></strong></a><br>
<br>
<table>
<tbody>
<tr>
<td><img src="rendering/raytrace_options.png"></td>
<td><font face="tahoma" size="2">The <b>Width</b>
and <b>Height</b> define the
size (in pixels) of the 2D image created.<br>
<br>
The <b>Camera</b> selected defines which view will be
rendered. The view can be previewed by selecting
the relevant camera in one of the view windows and ensuring that the
zoom is set to 100.<br>
<br>
You can select whether to render a <b>Single Image </b>
or a <b>Movie</b>. The <b>Movie</b> option
produces either a series of consecutively-numbered images (which can be
converted to a video format
by many available graphics packages) or a Quicktime movie . See <a href="animation.html">animation</a> for more details
on rendering movies.<br>
<br>
The next set of boxes, i.e. <b>Start Time</b>, <b>End
Time</b>, <b>Frames/Sec</b> and <b>Images/Frame</b>
are all related to animation. Refer to <a href="animation.html">that
section</a> for details. </font></td>
</tr>
</tbody>
</table>
<br>
<br>
<b>Surface Accuracy</b> defines how accurately geometry
within the scene is rendered. The lower the value,
the more accurate. Bear in mind, though, that the extra accuracy means
additional render times. Here are
some examples showing the effect of varying the surface accuracy:<br>
<img src="rendering/ray_surface_acc.jpg"><br>
<br>
<a name="raytraceAA"><b>Antialiasing</b></a>
Aliasing is the effect which causes sloping and curved edges to look
'jagged' and thin lines to become 'broken'. This is basically due to
undersampling of rays at each pixel. Antialiasing is a technique to
smooth out these artefacts and relies on performing extra sampling
generally and at areas of the image which are particularly prone to
aliasing. Art of Illusion allows 2 levels of
antialiasing: Medium and Maximum. Maximum antialiasing usually produces
better looking results than Medium, so it is preferred in most cases. In
rare cases, it may cause very fine details to look too blurry, and in that
case you can switch to Medium. You also can alter the number of rays used
for antialiasing. Art of Illlusion
uses an adaptive sampling technique, increasing the number of rays in
areas which require it. The minimum
and maximum number of rays can be fixed at between 4 and 1024.
Increasing the Min Rays/Pixel and the Max Rays/Pixel
lower down in the dialogue will improve the result. The amount of
antialiasing, and thus the required
number of rays, will depend very much on the image. Bear in mind,
though, that the more rays/pixel, the
longer the rendering time. The example below shows an example of the 2
levels of antialiasing each with
different Min/Max ray settings.<br>
<img src="rendering/aa.jpg"><br>
<br>
In most situations, Min-4, Max-16 should give good enough antialiasing.
The additional rays are needed
for effects such as soft shadows, depth of field or
glossiness/translucency as used. The minimum can generally be set much
less than the maximum.<br>
<br>
<b>Depth of Field</b> Switching on this option brings into
play the focal distance and depth of field
of the camera to make for truly photorealistic effects. Only geometry
within the range focal distance
+/- depth of field will be in focus. The further away from this area an
object is, the more it is
blurred. The focal length and depth of view for each camera is
controlled by the <a href="#camera_options">camera options</a>.
The example below shows some examples of the same scene with different
camera parameters:<br>
<img src="rendering/depth_of_field.jpg"><br>
<br>
<b>Gloss/Translucency</b> Gloss is the term for blurred
reflections caused by <b>Roughness</b> in the texture of
the object. Translucency is the variation that occurs in transmitted
light through a transparent
object due to <b>Cloudiness</b> in the texture of the
object. See <a href="textures.html#uniform_tex">Uniform
Textures</a> for more details.
The image below shows an example of <b>Gloss</b> on a
slightly bumpy metallic surface. Note that more rays are required
for higher <b>Roughness</b> to get a smooth result:<br>
<img src="rendering/gloss_roughness.jpg"><br>
<br>
<b>Soft Shadows</b> Switching this option on allows more
realistic shadows with soft edges to be created.
Such shadows are due to the finite size of the light source which is
ordinarily assumed to be a point
source. Altering the size of the light (radius for a point light or spot light,
angular radius for a directional light) makes the shadows softer as
shown below. Note that more rays are required as the radius of the light source
increases to get a smooth result:<br>
<img src="rendering/ray_soft_shadows.jpg"><br>
<br>
With either gloss/translucency or soft shadows, there are two ways you can
increase the number of rays used to sample the effect. First, you can increase
the number of 'primary rays' sent through each pixel by increasing the Max
Rays/Pixel setting. Second, you can tell the raytracer to use multiple rays
for sampling just the effect you are interested in by adjusting the <b>Rays to
Sample</b> setting. The latter approach can be faster, since it only generates
extra rays for that one effect. On the other hand, it is not adaptive (the way
primary rays are), so those extra rays are always generated even when they are
not needed (such as when rendering soft shadows in a part of the image far from
any objects that cast shadows). That means it can also be slower. You need to
experiment with these settings to see which combination gives the fastest
rendering for a particular scene.
<p>
<b>Transparent Background</b> This produces an image with a background that is transparent, i.e. it adds
an alpha channel to the image (if saved in .tif or .png format). A 2D paint program should then allow a
selection to be made using the alpha channel.
<br>
<br>
<a name="illumination"></a><strong><font color="#ff6633" size="4">5.4.2 Illumination - Global
Illumination, Caustics and Subsurface Scattering</font></strong><br>
<br>
The Illumination tab provides additional settings for global illumination, caustics, and
subsurface scattering:<br>
<br>
<img src="rendering/illumination_dial.png"><br>
<br>
<br>
<a name="GI"></a><strong><font style="color: green;" size="4">Global Illumination</font></strong><br>
<br>
<b>Global illumination</b> (GI) is a method of simulating
light scattered from surfaces. In practice this means that surfaces in
close proximity will bounce light off each other. In the example below,
there is a spot light pointing at the sphere in the box. Below left is
the scene rendered without GI and with a point light above the objects;
there is no red light scattered from the sphere as would be expected in
reality. In the middle, where GI is turned on, there is a red tinge to
the wall of the box from the scattered light. The amount of scattered
light depends on the <a href="#environment">Ambient Color</a>
setting and the diffuse colour of the object from which the light is
scattered. <br>
<img src="rendering/gi_example.jpg"><br>
<br>
Using GI, it is also possible to use the
<a href="#environment">environment background </a>
as a light source as shown above right. <br>
<br>
<table>
<tbody>
<tr>
<td width="300"><font face="tahoma" size="2">This technique is very effective for simulating the
lighting produced
on an overcast day (as in the example below) or an interior scene with
large overhead light sources. </font></td>
<td width="300"><font face="tahoma" size="2">Also, using GI, emissive textures really do give
out light. The
light emitted can be increased by using the colour <b>Scale</b>
module to scale the object's emissive colour. See <a href="textures.html#colour_scale">here</a> for details.</font></td>
</tr>
<tr>
<td><img src="rendering/gi_garden.jpg"></td>
<td><img src="rendering/gi_emis.jpg"></td>
</tr>
</tbody>
</table>
<br>
<table>
<tbody>
<tr>
<td width="300"><font face="tahoma" size="2"> <a name="hdr_ex"></a>Global
illumination can
produce some realistic and impressive effects when used in conjunction
with
image-based lighting. This is achieved by setting an image to the
background texture and using that as the
light source. This is even more effective when high dynamic range or
radiance (.hdr) images are used. </font></td>
<td><img src="rendering/frog_gi_nolight_small.jpg"></td>
</tr>
</tbody>
</table>
<br>
<br>
Using GI effectively requires the balance of several factors. In
general: keep diffuse colours darker
than normal, use an Ambient Color of near black, brighten light sources
(if used) and use many rays/pixel
to produce a smoother-looking image.<br>
<br>
There are 4 methods in Art of Illusion for calculating GI as shown on
the options list above: Monte Carlo, Ambient Occlusion, Photon Mapping
or Hybrid.<br>
<br>
The <b><font color="#0000ff"><a name="MC">Monte
Carlo</a></font></b> method adds scattered (or
diffusely reflected) rays to the raytracing algorithm. These rays are
emitted in random directions and, by using enough rays/pixel, they
average out to give the total light coming in from things other than
regular light sources. The smoothness of the resulting image is
controlled by the number of rays set in the Raytracer Dialogue or,
more efficiently, by the <b>Rays to Sample Environment</b>
setting in the Illumination dialogue. In either case, the more rays
used, the smoother the resulting image. The difference is that
increasing the number
of Min/Max Rays in the Raytracer Dialogue will increase the number of
rays used throughout the whole
rendering process, whereas using <b>Rays to Sample Environment</b>
will only increase the number of rays
used to evaluate GI, resulting in a faster render for the same amount
of GI noise.<br>
<img src="rendering/MC_GI.jpg"><br>
<br>
When using background images for image based lighting, the smoothing
applied to the image is also important (see
<a href="#GI_smoothing"><b>Extra Smoothing for
Global Illumination</b></a>).<br>
<br>
<br>
<br>
<b><font color="#0000ff"><a name="AO">Ambient
Occlusion</a></font></b> is a simplified version of
the Monte Carlo GI
algorithm. Whereas Monte Carlo will continue to follow and perform
calculations for all rays that have been scattered and re-scattered
until they leave the scene, Ambient Occlusion doesn't calculate diffuse
inter-reflections, with the result that colour bleeding does not occur.
However Ambient Occlusion does
allow scenes to be illuminated by the Environment and by emissive
objects as shown in the Monte Carlo vs.
Ambient Occlusion images shown below: Ambient Occlusion is also faster.<br>
<br>
<img src="rendering/MCAOcomp.jpg"><br>
<br>
<br>
<b><font color="#0000ff"><a name="photon_mapping">Photon
Mapping (Direct)</a></font></b> is another way of calculating
GI. In this method, a GI photon map is built up from
the paths of individual photons emitted by each light source (and
objects with emissive textures). The
number of photons traced out in total is set by the <b>Total
Photons</b> in the Illumination dialogue. As
you would expect, the more photons used, the more accurate the photon
map. However increasing this value
uses more memory and takes longer to render.<br>
<br>
The photon map is then used to calculate the light at each point in the
scene. More specifically, to reduce noise, the light at each point is
calculated from a weighted (according to distance from the point)
average of a certain number of photons around that point. The number of
photons used in this calculation is set via
the <b># To Estimate Light</b> value in the Illumination
dialogue. Increasing this value reduces noise
but may cause blurring of the photon map. That's because, in order to
get the required
number of photons, it is necessary to sample over a larger distance
from the point. Artifacts can also be
caused, especially at sharp corners. These adverse effects can be
reduced somewhat by increasing
the <b>Total Photons</b>.<br>
<br>
The image below shows the variation in image quality achieved by
varying the 2 photon parameters. As can be seen, increasing the <b>Total
Photons</b> gives a sharper,
more accurate map whereas increasing the <b># To Estimate Light</b>
reduces noise but increases blurring.<br>
<br>
<img src="rendering/photo_mapping.jpg"><br>
<br>
The final method of Global Illumination is the <b><font color="#0000ff">Photon Mapping (Final Gather)</font></b> method. This
is a combination of Monte Carlo and Photon Mapping. The Monte Carlo
method is used for rays before they
have been diffusely reflected. Photon mapping is used for rays that
have been diffusely reflected. In this
method the photon map is only 'seen' by diffusely scattered rays which
means that the accuracy of the map
is less important than the Photon Mapping method. This can be seen
below; the images are relatively
insensitive to the variation in number of photons:<br>
<img src="rendering/GI_hybrid.jpg"><br>
<br>
<br>
<br>
<a name="caustics"></a><strong><font style="color: green;" size="4">Caustics</font></strong><br>
<br>
If this is option is enabled in the Illumination dialogue, then
another photon map is calculated which contains only photons which have
been either specularly
reflected or refracted at least once. This enables realistic caustic
effects where light is focussed
producing bright patterns and spots. As with the photon mapping for
Global Illumination, the <b>
Total Photons</b> and <b># To Estimate Light</b> can
be set. The image below shows some examples.
Increasing the <b>Total Photons</b> (down left column of
images) makes the caustics more accurate. Increasing the <b># To
Estimate Light</b> (down right column of images) initially
reduces noise but begins
to blur the image if set too high.<br>
<img src="rendering/caustics.jpg"><br>
<br>
<br>
<br>
<a name="SSS"></a><strong><font style="color: green;" size="4">Scattering From
Materials</font></strong><br>
<br>
If you have objects that have scattering materials set to them, light
should scatter within the object.
The method used to calculate that scattered light is set here. There
are 3 options for scattering within materials: Single Scattering or
Photon Mapping or Both.<br>
<br>
<b>Single Scattering:</b><br>
A simplistic approach is taken which reduces calculation times at the
cost
of reduced accuracy and less realistic effects. As a ray propagates
through a scattering material, at each point it sends out a ray to each
light source to find out if it's blocked. This works well for materials
that only scatter a little bit, e.g. light through a dusty room as
below. In this
example, a cube was created to fill the room and set to a completely
transparent Texture and the
Material shown below left. This material is set to be semi-transparent
and to have a high