File: Sunflow-Textured.rendertemplate

package info (click to toggle)
structure-synth 1.0.0-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,072 kB
  • ctags: 1,176
  • sloc: cpp: 7,070; python: 167; makefile: 66; lisp: 25
file content (238 lines) | stat: -rw-r--r-- 3,624 bytes parent folder | download | duplicates (6)
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
<!--

 -->
<template name="Textured Sun Flow Template" defaultExtension="Sunflow scene file (*.sc)">
	<description>
This is an example of a render template, defining three textured types:
box::texture1 -> uses texture "texture1.png"
box::texture2 -> uses texture "texture2.png"
box::texture3 -> uses texture "texture3.png"

Template by Syntopia.
	</description>
	<primitive name="begin">
	    <![CDATA[
%photons {
%  caustics 10000000 kd 64 0.5
%}

%% common settings
image {
   resolution {width} {height}
	aa 0 2
}

gi {
   type ambocc
   bright { "sRGB nonlinear" 1 1 1 } 
   dark { "sRGB nonlinear" 0 0 0 }
   samples 64 
   maxdist 3.0 
}

accel bih
filter mitchell
bucket 32 spiral

%% camera
camera {
   type pinhole
   eye    {CamPosX} {CamPosY} {CamPosZ}
   target {CamTargetX} {CamTargetY} {CamTargetZ}
   up     {CamUpX} {CamUpY} {CamUpZ}
   fov    {fov}
   aspect {aspect}
}


%% common shaders
shader {
	name "floor"
	type amb-occ
	bright   1 1 1
	dark     0 0 0
	samples  4
	dist     6
}

shader {
	name "textureshader1"
	type amb-occ
   texture "texture1.png"
   dark { "sRGB nonlinear" 1.0 1.0 1.0 }
   samples 32
   dist 3.0
}

shader {
	name "plain"
	type amb-occ
	bright { "sRGB nonlinear" 1.0 1.0 1.0 }
	dark { "sRGB nonlinear"   0 0 0 }
	samples  32
	dist     6
}

shader {
	name "textureshader2"
	type amb-occ
   texture "texture2.png"
   dark { "sRGB nonlinear" 1.0 1.0 1.0 }
   samples 32
   dist 3.0
}

shader {
	name "textureshader3"
	type amb-occ
   texture "texture3.png"
   dark { "sRGB nonlinear" 1.0 1.0 1.0 }
   samples 32
   dist 3.0
}

%% scene background - comment out if not needed
background {
   color  { "sRGB nonlinear" {BR} {BG} {BB} }
}



object {
   shader none
   transform col 0.001 0 0 0  0 0.001 0 0  0 0 0.001 0  0 0 0 1
   type generic-mesh
   name "Box"
   points 8
       1  1  1
       1  0  1
       0  0  1
       0  1  1
       0  1  0
       0  0  0
       1  0  0
       1  1  0
   triangles 12
      0 3 2
      0 2 1
      2 3 4
      2 4 5
      3 0 7
      3 7 4
      0 1 6
      0 6 7
      1 2 5
      1 5 6
      5 4 7
      5 7 6
   normals none
   uvs facevarying
	  1 1 0 1 0 0 
	  1 1 0 0 1 0 
	  0 0 1 0 1 1
	  0 0 1 1 0 1 
	  0 0 1 0 1 1 
	  0 0 1 1 0 1 
	  1 0 0 0 0 1 
	  1 0 0 1 1 1 
	  1 0 0 0 0 1 
	  1 0 0 1 1 1
	  0 0 0 1 1 1
	  0 0 1 1 1 0
}
		]]>
	</primitive>
	
	<primitive name="end">
	    <![CDATA[

		]]>
	</primitive>

	<primitive name="box" type="texture1">
		<![CDATA[

instance {
	name "{uid}"
	geometry "Box"
	transform col {matrix}
	shader "textureshader1"
}
		]]>
	</primitive>
	
	<primitive name="box" type="texture2">
		<![CDATA[

instance {
	name "{uid}"
	geometry "Box"
	transform col {matrix}
	shader "textureshader2"
}
		]]>
	</primitive>
	
	<primitive name="box" type="texture3">
		<![CDATA[


instance {
	name "{uid}"
	geometry "Box"
	transform col {matrix}
	shader "textureshader3"
}
		]]>
	</primitive>
	
	<primitive name="box">
		<![CDATA[


instance {
	name "{uid}"
	geometry "Box"
	transform col {matrix}
	shader "plain"
}
		]]>
	</primitive>
	
	
	<primitive name="sphere">
		<![CDATA[
shader {
	name "shader{uid}"
	%type amb-occ
	%bright   {r} {g} {b}
	%dark     0 0 0
	%samples  16
	%dist     6
	type diffuse
	diff { "sRGB nonlinear" {r} {g} {b} }
}

object {
	shader "shader{uid}"
	type sphere
	c {cx} {cy} {cz}
	r {rad}
}


		]]>
	</primitive>
		<primitive name="sphere" type="light">
		<![CDATA[
light {
	type spherical
	color { "sRGB nonlinear" {r} {g} {b} }
	radiance 20.0
	center {cx} {cy} {cz}
	radius {rad}
	samples 16
}
		]]>
	</primitive>
</template>