Export_3ds: Improved distance cue node search
[blender-addons.git] / render_povray / templates_pov / isocacti.pov
bloba98fc25fd12a56fdf551be34d4a17ca9a7f6d44f
1 // This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
2 // To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
3 // letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
5 // Persistence Of Vision raytracer sample file.
6 // Updated: Feb-2013 for 3.7
7 //
8 // -w320 -h240
9 // -w800 -h600 +a0.3
11 #version 3.7;
12 global_settings { assumed_gamma 1.3 }
14 #include "stdinc.inc"
15 #include "arrays.inc"
19 sky_sphere {
20 pigment {gradient y
21 color_map {
22 [0 color Blue*0.6]
23 [1 color White]
28 #default {finish {ambient 0}}
29 #declare RS = seed(464786);
30 //----------------------------------------
31 #declare CamLoc = < 5, 10,-10>;
32 camera {
33 location CamLoc
34 right x*image_width/image_height // keep proportions with any aspect ratio
35 angle 45
36 look_at <0, 0, 0>
39 light_source {<-20, 30, -30>*3 color White*1.5}
40 light_source {CamLoc color rgb 0.3}
41 //----------------------------------------
43 #declare Ground =
44 isosurface {
45 function {y - f_snoise3d(x/7, 0, z/2)*0.5}
46 threshold 0
47 max_gradient 1.1
48 contained_by {box {<-100,-3,-100>, < 100, 1, 100>}}
50 /* texture {
51 pigment {color rgb < 1, 0.9, 0.65>}
52 normal {granite bump_size 0.1 scale 0.01}
53 }*/
54 texture{
55 pigment{
56 color rgb <.518, .339, .138>
58 normal{
59 bumps 5
60 scale 0.05
62 finish{
63 specular .3
64 roughness .8
68 texture{
69 pigment{
70 wrinkles
71 scale 0.05
72 color_map{
73 [0.0 color rgbt <1, .847, .644, 0>]
74 [0.2 color rgbt <.658, .456, .270, 1>]
75 [0.4 color rgbt <.270, .191, .067, .25>]
76 [0.6 color rgbt <.947, .723, .468, 0>]
77 [0.8 color rgbt <.356, .250, .047, 1>]
78 [1.0 color rgbt <.171, .136, .1, 1>]
84 object {Ground}
86 #declare RockColors = array[5]
88 color rgb < 0.5, 0.4, 0.35>,
89 color rgb < 0.4, 0.5, 0.4>,
90 color rgb < 0.8, 0.75, 0.65>,
91 color rgb 0.8,
92 color rgb 0.5
95 #declare CtrlPtrn = function {pattern {bozo scale < 7, 1, 2>}}
96 #declare L = 0;
97 #while(L < 750)
98 #declare Pt = trace(Ground, < rand(RS)*25 - 15, 10, rand(RS)*25 - 10>, -y);
99 #if(rand(RS) > CtrlPtrn(Pt.x, Pt.y, Pt.z))
100 // sphere {o, 0.03 + pow(rand(RS), 2)*0.15
101 isosurface {
102 function {f_r(x, y, z) - 1 + f_noise3d(x, y, z)*0.5}
103 threshold 0
104 contained_by {sphere {o, 1}}
105 #if(rand(RS) < 0.5) scale VRand_In_Box(< 1, 0.9, 1>, < 2, 1, 3>, RS) #end
106 rotate y*rand(RS)*360
107 translate -y*0.35
108 scale 0.03 + pow(rand(RS),2)*0.35
109 texture {
110 pigment {Rand_Array_Item(RockColors, RS)*RRand(0.1, 1, RS)}
111 normal {granite bump_size 0.5 scale 0.01}
113 translate Pt
115 #declare L = L + 1;
116 #end
117 #end
119 #macro MakeSpineBunch(Pt, Dir, Jitter, Len, BaseRad, Num)
120 #local L = 0;
121 #while(L < Num)
122 #local NewDir = vnormalize(Dir + Jitter*(< rand(RS), rand(RS), rand(RS)>*2 - 1));
123 cone {Pt, BaseRad, Pt + NewDir*Len, 0}
124 #local L = L + 1;
125 #end
126 #end
127 #macro MakeSpineRows(Body, Stretch, AltJitter, Ridges, Bunches, Spines, SpineJitter, SpineLen, SpineRad)
128 #declare J = 0;
129 #local AltDelta = 180/Bunches;
130 union {
131 #while(J < Ridges)
132 #declare K = 0;
133 #while(K < Bunches)
134 #declare Orig = vrotate(-y*50, x*(K + rand(RS)*AltJitter)*AltDelta);
135 #declare Orig = vrotate(Orig, y*(360*J/Ridges + 360/(Ridges*4)))*Stretch;
136 #declare PtNorm = y;
137 #declare Pt = trace(Body, Orig,-Orig, PtNorm);
138 MakeSpineBunch(Pt, PtNorm, SpineJitter, SpineLen, SpineRad, Spines)
139 #declare K = K + 1;
140 #end
141 #declare J = J + 1;
142 #end
144 #end
146 #declare sinw = function (x) {(sin(x) + 1)/2}
148 #declare Ridges = 40;
149 #declare RidgeDepth = 0.075;
151 #declare cactus1Body =
152 isosurface {
153 function {sqrt(x*x + pow(y - sqrt((x*x/4) + (z*z/4))*1.5, 2) + z*z) - 1 -
154 (sin(atan2(x, z)*Ridges)*0.5*RidgeDepth)
156 threshold 0
157 max_gradient 5
159 contained_by {sphere {< 0, 0, 0>, 3.1}}
160 texture {
161 pigment {radial
162 color_map {
163 [0.00 color rgb < 0.3, 0.65, 0.4>*0.8]
164 [0.65 color rgb < 0.3, 0.65, 0.4>*0.8]
165 [1.00 color rgb < 0.3, 0.65, 0.4>*0.2]
167 frequency Ridges sine_wave
169 normal {dents 0.1 poly_wave 2 scale < 1, 0.15, 1>}
172 #declare Cactus1 =
173 union {
174 object {cactus1Body}
175 object {MakeSpineRows(cactus1Body, 1, 0.2, Ridges, 24, 3, 0.5, 1, 0.01)
176 texture {pigment {color rgb < 0.98, 0.98, 0.5>}}
178 scale < 1, 0.75, 1>
179 translate y*0.35
183 #declare Ridges = 32;
184 #declare RidgeDepth = 0.1;
185 #declare cactus2Body =
187 isosurface {
188 function {
189 f_r(x, y*0.35, z) - 1 - sqrt(x*x + z*z)*0.2
190 - (sinw(atan2(x, z)*Ridges)*RidgeDepth)
192 threshold 0
193 max_gradient 5
194 contained_by {sphere {< 0, 0, 0>, 3.1}}
195 texture {
196 pigment {color rgb < 0.3, 0.65, 0.4>}
197 normal {bozo 0.1 scale < 1, 0.15, 1>}
201 #declare Cactus2 =
202 union {
203 object {cactus2Body}
204 object {MakeSpineRows(cactus2Body, < 1, 3, 1>, 1, Ridges, 64, 3, 1, 0.5, 0.01)
205 texture {pigment {color rgb < 0.98, 0.98, 0.5>}}
207 translate y*2
212 #declare Ridges = 75;
213 #declare RidgeDepth = 0.05;
214 #declare cactus3Body =
216 isosurface {
217 function {
218 sqrt(x*x + pow((y/1.5),2) + z*z) - 1 - sqrt(x*x + z*z)*0.2
219 - (sinw(atan2(x, z)*Ridges)*RidgeDepth)
221 threshold 0
222 max_gradient 5
223 contained_by {sphere {< 0, 0, 0>, 3.1}}
224 texture {
225 pigment {color rgb < 0.1, 0.5, 0.25>}
226 normal {bozo 0.1 scale 0.15}
229 #declare Cactus3 =
230 union {
231 object {cactus3Body}
232 object {MakeSpineRows(cactus3Body, < 1, 1.5, 1>, 1, Ridges, 24, 5, 1, 0.35, 0.01)
233 texture {pigment {color rgb < 0.98, 0.98, 0.85>}}
235 translate y*1.25
238 object {Cactus1 translate < 3, 0,-3>}
239 object {Cactus2}
240 object {Cactus3 translate <-2, 0,-3.5>}
242 //----------------------------------------