1//    Persistence of Vision Ray Tracer version 3.5 Include File
2//    File: rad_def.inc
3//    Last updated: 2001.7.26
4//    Description: Set some common radiosity settings.
5// These settings are extremely general and are intended for
6// ease of use, and don't necessarily give the best results.
7
8//Modified 2001.7.26: Made Normal and Media parameters work
9//no matter what setting is used. (Chris Huff)
10
11#ifndef(Rad_Def2_Inc_Temp)
12#declare Rad_Def2_Inc_Temp = version;
13#version 3.5;
14
15#ifdef(View_POV_Include_Stack)
16    #debug "including rad_def.inc\n"
17#end
18
19#declare Radiosity_Default = 0;
20#declare Radiosity_Debug = 1;
21#declare Radiosity_Fast = 2;
22#declare Radiosity_Normal = 3;
23#declare Radiosity_2Bounce = 4;
24#declare Radiosity_Final = 5;
25
26#declare Radiosity_OutdoorLQ = 6;
27#declare Radiosity_OutdoorHQ = 7;
28#declare Radiosity_OutdoorLight = 8;
29#declare Radiosity_IndoorLQ = 9;
30#declare Radiosity_IndoorHQ = 10;
31
32
33// The correct format for using this file is:
34//
35// #include "rad_def.inc"
36// global_settings {
37//   radiosity {
38//     Rad_Settings(Radiosity_Default, off, off)
39//   }
40// }
41//
42// ####### DON NOT FORGET TO USE THE +QR/Radiosity=on OPTION ########
43//
44// for first parameter use one of the above constants
45//
46// second parameter for radiosity normal switch
47// (turn 'on' if normal should be taken into account when calculating radiosity)
48//
49// third parameter for radiosity media switch
50// (turn 'on' if media should be taken into account when calculating radiosity)
51//
52
53
54#macro Rad_Settings(Nbr, Normal, Media)
55
56  #switch(Nbr)
57
58    // An empty raddiosiy block uses deault settings
59    #case (Radiosity_Default)
60    #debug "\nRadiosity_Default in use\n"
61    #break
62
63    // Run it fast, don't try to make it look good, make sure that
64    // you can actually see where the radiosity boundaries are.
65    #case (Radiosity_Debug)
66      pretrace_start 0.08
67      pretrace_end   0.02
68      count 10
69      nearest_count 1
70      error_bound 0.3
71      recursion_limit 1
72      low_error_factor 0.8
73      gray_threshold 0
74      minimum_reuse 0.015
75      brightness 1.0
76      adc_bailout 0.01/2
77    #debug "\nRadiosity_Debug in use\n"
78    #break
79
80    // Make it look as good as you can, but I'm in a hurry
81    #case (Radiosity_Fast)
82      pretrace_start 0.08
83      pretrace_end   0.02
84      count 80
85      nearest_count 5
86      error_bound 0.4
87      recursion_limit 1
88      low_error_factor 0.9
89      gray_threshold 0
90      minimum_reuse 0.025
91      brightness 1.0
92      adc_bailout 0.01/2
93    #debug "\nRadiosity_Fast in use\n"
94    #break
95
96    // Typical values
97    #case (Radiosity_Normal)
98      pretrace_start 0.08
99      pretrace_end   0.01
100      count 200
101      nearest_count 7
102      error_bound 0.3
103      recursion_limit 1
104      low_error_factor 0.75
105      gray_threshold 0
106      minimum_reuse 0.017
107      brightness 1.0
108      adc_bailout 0.01/2
109    #debug "\nRadiosity_Normal in use\n"
110    #break
111
112    // Typical values, but with 2 bounces.  Starts slow, but picks up steam!
113    #case (Radiosity_2Bounce)
114      pretrace_start 0.08
115      pretrace_end   0.01
116      count 200
117      nearest_count 7
118      error_bound 0.3
119      recursion_limit 2
120      low_error_factor 0.75
121      gray_threshold 0
122      minimum_reuse 0.017
123      brightness 1.0
124      adc_bailout 0.01/2
125    #debug "\nRadiosity_2Bounce in use\n"
126    #break
127
128    // For patient quality freaks with fast computers about to leave on vacation
129    #case (Radiosity_Final)
130      pretrace_start 0.08
131      pretrace_end   0.004
132      count 800
133      nearest_count 9
134      error_bound 0.2
135      recursion_limit 1
136      low_error_factor 0.7
137      gray_threshold 0
138      minimum_reuse 0.01
139      brightness 1.0
140      adc_bailout 0.01/2
141    #debug "\nRadiosity_Final in use\n"
142    #break
143
144    // For outdoor scenes without light sources
145    // Low quality being reasonably fast in most scenes
146    #case (Radiosity_OutdoorLQ)
147      pretrace_start 0.08
148      pretrace_end   0.01
149      count 80
150      nearest_count 4
151      error_bound 0.6
152      recursion_limit 1      // increase this in scenes with complicated geometries when necessary
153      low_error_factor 0.8
154      gray_threshold 0
155      minimum_reuse 0.015
156      brightness 1.0
157      adc_bailout 0.01/2
158    #debug "\nRadiosity_OutdoorLQ in use\n"
159    #break
160
161    // For outdoor scenes without light sources
162    // High quality - can be very slow
163    #case (Radiosity_OutdoorHQ)
164      pretrace_start 0.08
165      pretrace_end   0.004
166      count 500
167      nearest_count 7
168      error_bound 0.1
169      recursion_limit 1      // increase this in scenes with complicated geometries when necessary
170      low_error_factor 0.5
171      gray_threshold 0
172      minimum_reuse 0.015
173      brightness 1.0
174      adc_bailout 0.01/2
175    #debug "\nRadiosity_OutdoorHQ in use\n"
176    #break
177
178    // Settings for outdoor scenes with (Sun)light
179    // for getting a general skylight effect
180    #case (Radiosity_OutdoorLight)
181      pretrace_start 0.08
182      pretrace_end   0.01
183      count 50
184      nearest_count 4
185      error_bound 0.8
186      recursion_limit 1
187      low_error_factor 0.9
188      gray_threshold 0
189      minimum_reuse 0.015
190      brightness 1.0
191      adc_bailout 0.01/2
192    #debug "\nRadiosity_OutdoorLight in use\n"
193    #break
194
195    // quite fast settings for indoor radiosity
196    // good values much depend on actual situation
197    // these settings can be taken as a basis
198    #case (Radiosity_IndoorLQ)
199      pretrace_start 0.08
200      pretrace_end   0.01
201      count 80
202      nearest_count 5
203      error_bound 0.7
204      recursion_limit 2
205      low_error_factor 0.8
206      gray_threshold 0
207      minimum_reuse 0.015
208      brightness 1.0
209      adc_bailout 0.01/2
210    #debug "\nRadiosity_IndoorLQ in use\n"
211    #break
212
213    // slower settings for indoor radiosity
214    // good values much depend on actual situation
215    // these settings can be taken as a basis
216    #case (Radiosity_IndoorHQ)
217      pretrace_start 0.08
218      pretrace_end   0.004
219      count 400
220      nearest_count 8
221      error_bound 0.15
222      recursion_limit 3
223      low_error_factor 0.5
224      gray_threshold 0
225      minimum_reuse 0.015
226      brightness 1.0
227      adc_bailout 0.01/2
228    #debug "\nRadiosity_IndoorHQ in use\n"
229    #break
230  #end
231
232    normal Normal
233    media Media
234#end
235
236#version Rad_Def2_Inc_Temp;
237#end
238