File: Sunflow-Colored.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 (128 lines) | stat: -rw-r--r-- 2,269 bytes parent folder | download
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
<template defaultExtension="Sunflow scene file (*.sc)" name="Sunflow" runAfter="%SUNFLOW%\sunflow.bat &quot;$FILE&quot; -o &quot;$FILE.png&quot;" >
 <description>
A simple Sunflow render template, using one shader for each object. 
The template uses ambient occlusion lightning, which means there is no need to worry about setting up light sources. 

This template is a good choice for trying out Sunflow. 
   
Original template by Syntopia.   
The Sunflow coloring was added by Tom Beddard ('subblue')
</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
}

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


%% geometry
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 none
}
		]]></primitive>
 <primitive name="end" ><![CDATA[

		]]></primitive>
 <primitive name="box" ><![CDATA[
shader {
	name "shader{uid}"
	type amb-occ
	bright   {r} {g} {b}
	dark     0 0 0
	samples  16
	dist     6
}

instance {
	name "{uid}"
	geometry "Box"
	transform col {matrix}
	shader "shader{uid}"
}
		]]></primitive>
 <primitive name="sphere" ><![CDATA[
shader {
	name "shader{uid}"
	type diffuse
	diff { "sRGB nonlinear" {r} {g} {b} }
}

object {
	shader "shader{uid}"
	type sphere
	c {cx} {cy} {cz}
	r {rad}
}
		]]></primitive>
</template>