Код
#declare MyLevel = 0.5;
camera {
sky <0,0,1> //Don't change this
direction <-1,0,0> //Don't change this
right <-4/3,0,0> //Don't change this
location <38,76,0.5> //Camera location
look_at <38,0.0,0.5> //Where camera is pointing
angle 90 //Angle of the view--increase to see more, decrease to see less
up <0,9,0>
right <16,0,0>
}
light_source {
<38,38,0.99>
color rgb <MyLevel, MyLevel, MyLevel>
}
light_source {
<38,38,0.01>
color rgb <MyLevel, MyLevel, MyLevel>
}
background { color rgb <0.0, 0.0, 0.0> }
#declare MyChessFloor =
texture {
finish {
ambient 0.75
diffuse 0.75
reflection .75
specular 0.25
roughness 0.001
metallic 1.0
}
pigment { checker
color rgbf <0.25,0.25,0.25, 0.01>
color rgbf <0.0,0.0,0.0, 0.01>
scale 0.25*4
rotate <0, 0, 45>
}
};
#declare MyMirror =
texture {
finish {
ambient 0
diffuse 0.125
reflection 0.875
specular 0.875
roughness 0.125
metallic 1.0
}
pigment { color rgbf <0.0,0.0,0.0, 0.75> }
};
plane { <0,0,1>, 0 texture { MyChessFloor } }
box { <0.0,-0.05,1><76.0,-0.075,0>texture { MyMirror } }
box { <0.0,76.075,1><76.0,76.05,0>texture { MyMirror } }
box { <-0.05,0.0,1><-0.075,76.0,0>texture { MyMirror } }
box { <76.05,0.0,1><76.075,76.0,0>texture { MyMirror } }
sky_sphere {
pigment {
gradient y
color_map {
[0.000 0.002 color rgb <0.0, 0.1, 0.125>
color rgb <0.0, 0.0, 0.0>]
[0.002 0.200 color rgb <0.0, 0.05, 0.1>
color rgb <0.0, 0.125, 0.15>]
}
scale 2
translate -1
}
pigment {
bozo
turbulence 0.65
octaves 6
omega 0.7
lambda 2
color_map {
[0.0 0.1 color rgb <0.1, 0.1, 0.1>
color rgb <0.1, 0.1, 0.1>]
[0.1 0.5 color rgb <0.125, 0.125, 0.125>
color rgbt <0.5, 0.5, 0.5, 1>]
[0.5 1.0 color rgbt <0.25, 0.25, 0.25, 1>
color rgbt <0.25, 0.25, 0.25, 1>]
}
scale <0.1, 0.25, 0.15>
}
rotate -135*x
}
#declare RandomSeed = seed(1);
#declare MyWidth = 18;
#for (XCount,1,MyWidth)
#for (ZCount,1,MyWidth)
#declare MyGlass =
texture {
finish {
ambient 0.125+0.25*mod(rand(RandomSeed),1)
diffuse 0.25+0.25*mod(rand(RandomSeed),1)
reflection 0.5+0.25*mod(rand(RandomSeed),1)
specular 0.25+0.75*mod(rand(RandomSeed),1)
roughness 0.001+0.5*mod(rand(RandomSeed),1)
}
pigment {
color rgbf <MyLevel+0.125*(1-XCount*(1/MyWidth)),
MyLevel+0.125*ZCount*(1/MyWidth),
MyLevel+0.125*mod(rand(RandomSeed),1),
0.8>
}
};
sphere { <0, 0, 0>, 0.5
texture { MyGlass
translate <rand(RandomSeed),rand(RandomSeed),rand(RandomSeed)> }
translate <XCount*4,
ZCount*4,
0.5>
interior { ior 2.4 }
}
#end
#end
#declare MyRedLamp =
texture {
finish {
ambient 1.0
reflection 1.0
metallic 1.0
}
pigment {
color rgbf <1,0,0,0>
}
}
#declare MyGreenLamp =
texture {
finish {
ambient 1.0
reflection 1.0
metallic 1.0
}
pigment {
color rgbf <0,1,0,0>
}
}
#version 3.0
#include "tie_f.inc"
#declare TCnt = 0
#while (TCnt < 4)
#declare MyHrotRand = rand(RandomSeed)
#declare MyDrotRand = rand(RandomSeed)
#declare MyVrotRand = rand(RandomSeed)
#declare MyHRand = rand(RandomSeed)
#declare MyDRand = rand(RandomSeed)
#declare MyVRand = rand(RandomSeed)
object { TieFighter
finish {
ambient 1.0
/*diffuse 1.0
reflection 0.5
metallic 0.5*/
}
rotate <-120*(0.75+mod(MyHrotRand,0.5)),60*(0.75+mod(MyDrotRand,0.5)),15*(0.75+mod(MyVrotRand,0.5))>
scale 0.05
translate <36+1.125*(TCnt-0.5+mod(MyHRand,1)),76-3+(-0.5+mod(MyDRand,1)),0.25+mod(MyVRand,0.5)>
}
/*#if (TCnt = 0)
sphere { <0,0,0> 0.05
texture { MyRedLamp }
translate <36+1.5*TCnt,73,0.5>
}
#end
#if (TCnt = 3)
sphere { <0,0,0> 0.05
texture { MyGreenLamp }
translate <36+1.5*TCnt,73,0.5>
}
#end*/
light_source {
<36+1.125*(TCnt-0.5+mod(MyHRand,1)),73+(-0.5+mod(MyDRand,1))+1,0.001>
color rgbf <1.0,1.0,1.0,0>
spotlight
radius 10.0
falloff 12.0
tightness 30
area_light <1, 0, 0>, <0, 0, 1>, 1, 1
adaptive 1
jitter
point_at <36+1.125*(TCnt-0.5+mod(MyHRand,1)), 73+(-0.5+mod(MyDRand,1)), 0.25+mod(MyVRand,0.5)>
}
light_source {
<36+1.125*(TCnt-0.5+mod(MyHRand,1)),73+(-0.5+mod(MyDRand,1))+1, 0.999>
color rgbf <1.0,1.0,1.0,0>
spotlight
radius 10.0
falloff 12.0
tightness 30
area_light <1, 0, 0>, <0, 0, 1>, 1, 1
adaptive 1
jitter
point_at <36+1.125*(TCnt-0.5+mod(MyHRand,1)), 73+(-0.5+mod(MyDRand,1)), 0.25+mod(MyVRand,0.5)>
}
#declare TCnt = TCnt + 1
#end