-
Notifications
You must be signed in to change notification settings - Fork 0
/
__toys.scr
288 lines (244 loc) · 10.8 KB
/
__toys.scr
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
//----------------------------------------------------------------------------
// Toys
//----------------------------------------------------------------------------
//-- Video setup --
VIDEO
//NOTE: To enable the full screen mode (or hardware rendering mode)
// to work correctly, it is important to choose the correct
// screen resolution, color depth and the refresh rate supported
// by the 3D card.
FullScreen 0 //If set true, then the display is in full screen
//Res 140 105
//Res 320 240
//Res 512 384
//Res 640 480
//Res 720 480 //NTSC
//Res 720 486 //NTSC
Res 720 576 //PAL
//Res 736 398 //Letter box
//Res 768 576 //PAL
//Res 800 600
//Res 960 720
//Res 1024 768
//Res 1152 864
//Res 1280 960
//Res 1280 960
//Res 1280 1024
//Res 320 320
//Res 640 640
//Res 1600 1200
//BitsPerPixel 16 //Bits per pixel
//BitsPerPixel 24
BitsPerPixel 32
Refresh 60 //Refresh rate in Hz
//Refresh 70
//Refresh 75
//Refresh 80
//Refresh 85
//-- Renderer setup --
RENDER
/*---- Notes on defining the profile curve equation ----
Negation "-" has a precedence over power "^", eg.: -x^2 != -(x^2).
Functions such as sqrt( ), tan( ), ln( ), ...etc have a precedence
over negation, eg.: -sqrt(x) == -(sqrt(x)).
Definig powers that include other arithmetic must be declared
in brackets, eg.: x^(1+x).
Negative powers : x^-x, 2^-1, (-x)^-2, x^-(1+2), ...etc.
Exponentials : exp( ).
Log base 10 : log( ).
Log base e : ln( ).
Trig. functions : sin( ), cos( ), tan( ), asin( ), acos( ), atan( ).
Hyperbolic functions : sinh( ), cosh( ), tanh( ).
Square root : sqrt( ).
Absolute value : abs( ).
--------------------------------------------------------*/
//ProfEquLimX 10000 ProfEqu NULL //Profile curve: None, default perspective
//ProfEquLimX 1.666 ProfEqu "1;" //Line
//ProfEquLimX 1.666 ProfEqu "-x + 1;" //Line
//ProfEquLimX 1.666 ProfEqu "-2*x + 1;" //Line
//ProfEquLimX 1.666 ProfEqu "-x*x + 1;" //Parabola
//ProfEquLimX 1.666 ProfEqu "-2.5*x*x + 0.5;" //Parabola
//ProfEquLimX 1.000 ProfEqu "sqrt(1 - x*x);" //Sphere
//ProfEquLimX 1.666 ProfEqu "3 - sqrt(4.0 * (1 + 1.5*x*x));" //Hyperbola
//ProfEquLimX 1.666 ProfEqu "-((x+0.01)^x) + 2;"
ProfEquLimX 1.666 ProfEqu "-log(x+0.1);"
//ProfEquLimX 1.666 ProfEqu "-(x^3) + x*x + x + 1;"
//ProfEquLimX 1.666 ProfEqu "log(x+2);"
//ProfEquLimX 1.666 ProfEqu "-tanh(x-1);" //Hyperbolic Tangent
//ProfEquLimX 1.666 ProfEqu "0.1*x^4 - 1.25*x^2 + x*x + x + 1 + 0.2*cos(8*x);"
//ProfEquLimX 1.666 ProfEqu "-10e000*(x-0.5)^3 + x + 0.05*cos(40*x);" //Trippy
//-- View, camera and display settings --
CamApeture 1.3333333333 1 1 //X, Y Camera apeture size, and Z = field of view
//CamApeture 1 1 1 //X, Y Camera apeture size, and Z = field of view
//-- Flags --
ClearFlag 1 //If set true, the frame buffer is cleared with BackgndColor after refresh
ShadowFlag 0 //If set true, shadows are generated (ray tracer only)
RefractFlag 1 //If set true, refractions are rendered (ray tracer only)
ReflectFlag 1 //If set true, reflections are rendered (ray tracer only)
HotspotFlag 0 //Render in hotspot mode (ray tracer only)
AntiAliasFlag 0 //Do anti-aliasing
PCompFlag 0 //If set true, then projetor viewpoint compesation is enabled
//-- Other attributes --
BackgndColor 0.1 0.3 0.6 //Background color
POffset -0.01 //Projector z-offset in world coords (must be always negative < 0)
AA_Treshold 0.03 //The luminance threshold for anti-aliasing (ray tracer only)
AA_Samples 32 //Number of samples for anti-aliasing (ray tracer only)
AA_Jitter 0.0075 //Jitter amplitude for anti-aliasing (ray tracer only)
MaxRayDepth 4 //Maximum ray-tracing recursions
AdaptDepthTresh 0.05 //The threshold for adatptive depth control (ray tracer only)
SubdivTresh 0.1 //Subdivision threshold (OpenGL only)
Max_LOD 5 //Maximum polygon sub-div recursions - USE IT WISELY! (OpenGL only)
TabRes 20 //The lookup rable resolution, default: 1/20th of a degree (OpenGL only) (integer)
CurrentDevice 4 //Specifies the current redering mode:
// NULL = 0, DDRAW = 1, D3D = 2, GLIDE = 3, OPENGL = 4, RAY = 5
//-- Setup world attributes --
WORLD
VOrigin 4 3 -3 //Initial view origin in the world
VVelocity 0 0 0 //Initial view velocity
VRotation 0 0 0 //Initial view rotation
VOrientation 0 -45 0.00000000000001 //Initial View orientation
//---- Building --------------------------------------------------------------
//-- Right Wall --
ENTITY
Class PLANE
GridRes 1 1
Color 0.65 0.65 0.65
Coord -8 5 0
Orientation 0 0 -90
ScaleConst 10.0 1.0 16.0
Velocity 0 0 0
Rotation 0 0 0
//-- Back Wall --
ENTITY
Class PLANE
GridRes 1 1
Color 0.65 0.65 0.65
Coord 0 5 8
Orientation -90 0 90
ScaleConst 10.0 1.0 16.0
Velocity 0 0 0
Rotation 0 0 0
//-- Right Wall --
ENTITY
Class PLANE
GridRes 1 1
Color 0.65 0.65 0.65
Coord 8 5 0
Orientation 0 0 90
ScaleConst 10.0 1.0 16.0
Velocity 0 0 0
Rotation 0 0 0
//-- Ceiling --
ENTITY
Class PLANE
GridRes 1 1
Color 0.65 0.65 0.65
Coord 0 10 0
Orientation 180 0 0
ScaleConst 16.0 1.0 16.0
Velocity 0 0 0
Rotation 0 0 0
//-- Floor Far Left --
ENTITY
Class "objects/checker_board.cob"
Coord -4 0 4
Orientation 90 0 180
ScaleConst 2.0 2.0 1.0
Velocity 0 0 0
Rotation 0 0 0
//-- Floor Far Right --
ENTITY
Class "objects/checker_board.cob"
Coord 4 0 4
Orientation 90 0 180
ScaleConst 2.0 2.0 1.0
Velocity 0 0 0
Rotation 0 0 0
//-- Floor Near Left --
ENTITY
Class "objects/checker_board.cob"
Coord -4 0 -4
Orientation 90 0 180
ScaleConst 2.0 2.0 1.0
Velocity 0 0 0
Rotation 0 0 0
//-- Floor Near Right --
ENTITY
Class "objects/checker_board.cob"
Coord 4 0 -4
Orientation 90 0 180
ScaleConst 2.0 2.0 1.0
Velocity 0 0 0
Rotation 0 0 0
//---- Stuff -----------------------------------------------------------------
//-- Table --
ENTITY
Class "objects/table.cob"
Coord 4 1.0 0
Orientation 90 0 180
ScaleConst 1.0 1.0 1.0
Velocity 0 0 0
Rotation 0 0 0
//-- Tricycle --
ENTITY
Class "objects/tricycle.cob"
Coord -2 0.125 0
Orientation 90 -25 180
ScaleConst 0.75 0.75 0.75
Velocity 0 0 0
Rotation 0 0 0
//-- Shapes --
ENTITY
Class "objects/shapes2.cob"
Coord 4 1.75 0
Orientation 90 -20 180
ScaleConst 0.35 0.35 0.35
Velocity 0 0 0
Rotation 0 0 0
//-- Fire Extinguisher --
ENTITY
Class "objects/extinguisher.cob"
Coord 4.5 3.6 -7
Orientation 90 30 180
ScaleConst 0.35 0.35 0.35
Velocity 0 0 0
Rotation 0 0 0
//-- Ball and a box --
ENTITY
Class "objects/toy.cob"
Coord 0 0.55 -7
Orientation 90 20 180
ScaleConst 1 1 1
Velocity 0 0 0
Rotation 0 0 0
//-- Fan --
ENTITY
Class "objects/fan_base.cob"
Coord -2 0.55 6
Orientation 90 0 180
ScaleConst 1 1 1
Velocity 0 0 0
Rotation 0 0 0
ENTITY
Class "objects/fan_propeller.cob"
Coord -2 2.5 6.25
Orientation 90 180 180
ScaleConst 1 1 1
Velocity 0 0 0
Rotation 0 0 -7.5
//-- Duck --
ENTITY
Class "objects/duck.cob"
Coord 3 0.6 1
Orientation 90 30 180
ScaleConst 0.5 0.5 0.5
Velocity 0 0 0
Rotation 0 0 0
//-- Light setup --
LIGHT AmbColor 0.1 0.2 0.4 //Setup ambient light color. Coord and Color keywords are ignored.
LIGHT Coord -5 5 -5 //Red-ish
Color 0.6 0.4 0.2
LIGHT Coord 5 5 -5 //Blue-ish
Color 0.4 0.5 0.7
LIGHT Coord 0 5 5 //Green-ish
Color 0.3 0.5 0.3