|
| 1 | +#include "colors.inc" |
| 2 | +#include "skies.inc" |
| 3 | +#include "textures.inc" |
| 4 | +#include "glass.inc" |
| 5 | +#include "Ente.inc" |
| 6 | +//#include "fastsky.inc" |
| 7 | +//================POVRAY GLOBALS====================== |
| 8 | +#include "ScenesGlobals.inc" |
| 9 | +#declare Photons = on; |
| 10 | +global_settings { |
| 11 | + max_trace_level 10 |
| 12 | + photons { |
| 13 | + spacing 0.001 |
| 14 | +// jitter 0.5 |
| 15 | + } |
| 16 | +} |
| 17 | +#macro PhotonBlock() |
| 18 | + #if(Photons) |
| 19 | + photons { |
| 20 | + target |
| 21 | + collect off |
| 22 | + reflection on |
| 23 | +// refraction on |
| 24 | + } |
| 25 | + #end |
| 26 | +#end |
| 27 | +//================SCENE CONSTANTS==================== |
| 28 | +// Camera and caustics angle |
| 29 | +#declare CamAngle = -20; // 0 is looking to +z axis |
| 30 | +// Entenposition |
| 31 | +#declare DuckX = 0; |
| 32 | +#declare DuckY = 0; |
| 33 | +#declare DuckZ = 0;//+clock*40; // ca. 200 frames |
| 34 | +#declare DuckRot = <0,-90,0>;//180*clock; |
| 35 | +// Light: Sync light with moon/sun |
| 36 | +#declare LightPos = <0,40,1000>;//<500,500, -1000>; |
| 37 | +// Ducky movement |
| 38 | +#declare KopfAngMax= 25; |
| 39 | +#declare KopfRollMax= 15; |
| 40 | +#declare KopfPitch = 0*KopfAngMax; |
| 41 | +#declare KopfRoll = KopfRollMax*sin(pi*5*clock); |
| 42 | +#declare KopfYaw = 0;//KopfAngMax*sin(pi*5*clock); |
| 43 | +#declare BuerzelPitch= KopfAngMax * abs(sin(pi*5*clock)); |
| 44 | +#declare WingAngMax = 110; |
| 45 | +#declare WingRAngle= WingAngMax * abs(sin(pi*5*clock)); |
| 46 | +#declare WingLAngle = WingRAngle; |
| 47 | +// Water |
| 48 | +#declare WaterTexture = |
| 49 | +texture{ Green_Glass |
| 50 | + normal{ |
| 51 | + ripples 0.3 // More regular, e.g. indoor |
| 52 | +// bumps 0.3 // Mor turbulenced, e.g. outdoor, but no dynamics! |
| 53 | + scale 2 |
| 54 | + turbulence 0.75 |
| 55 | + sine_wave phase -1/2*pi*clock // Dynamic waves |
| 56 | + } |
| 57 | + finish{ |
| 58 | + ambient 0.00 |
| 59 | + diffuse 0.65 |
| 60 | + reflection 0.9 |
| 61 | + } |
| 62 | +}// end of texture |
| 63 | +#declare WaterInterior = interior{I_Glass} |
| 64 | +//================CAMERA============================== |
| 65 | +camera { |
| 66 | +// angle 36 |
| 67 | + location <0,1,-5> |
| 68 | + look_at <DuckX,DuckY+0.2,DuckZ> |
| 69 | + rotate y*CamAngle |
| 70 | +} |
| 71 | +//=================LIGHT SOURCES====================== |
| 72 | +#declare Moon = |
| 73 | +sphere {0, 80 |
| 74 | + pigment{Orange} |
| 75 | +// normal { wrinkles 180 scale 30} |
| 76 | + finish { ambient 20 } |
| 77 | + photons { collect off } |
| 78 | +} |
| 79 | +light_source{ LightPos White*2 |
| 80 | + #if(Photons) |
| 81 | + photons {refraction off reflection on} |
| 82 | + #end |
| 83 | + looks_like {object{Moon}} |
| 84 | +} |
| 85 | +light_source{ // Only used for caustics from camera perspective |
| 86 | + <0,50,-500> White *0.3 |
| 87 | + #if(Photons) |
| 88 | + photons {refraction off reflection on} |
| 89 | + #end |
| 90 | + rotate y*CamAngle |
| 91 | +} |
| 92 | +//==================HORIZONT======================== |
| 93 | +#declare SkyCeiling = |
| 94 | +sky_sphere{ |
| 95 | + S_Cloud1 // Day sky |
| 96 | +// S_Cloud4 // Darker sky |
| 97 | + rotate y*90*clock// Rotate around polaris. |
| 98 | +} |
| 99 | +#declare HorizontFog = |
| 100 | +fog{ fog_type 2 |
| 101 | + distance 85 |
| 102 | +// color rgb<1,0.99,0.9> |
| 103 | +// color rgb <0.687648, 0.692653, 0.443503> |
| 104 | +// rgb <0.646250, 0.351247, 0.174563> |
| 105 | + rgb <0.677562, 0.407568, 0.195331> |
| 106 | + fog_offset 0.1 |
| 107 | + fog_alt 8 |
| 108 | + turbulence 0.2 |
| 109 | +// turbulence 1000 |
| 110 | +// omega 0.5 |
| 111 | +// lambda 0.2*100 |
| 112 | +// octaves 6 |
| 113 | +// turb_depth 0.5 |
| 114 | +} |
| 115 | +//====================WATER COMPONENTS============ |
| 116 | +//Water |
| 117 | +#declare Water = |
| 118 | +difference { |
| 119 | + plane{y, 0 |
| 120 | + texture{WaterTexture} |
| 121 | + interior{WaterInterior} |
| 122 | + }// end of plane 2 |
| 123 | + plane {y, -1.1 pigment{Black} } // Darker |
| 124 | +} |
| 125 | +#declare WaterInner= |
| 126 | +box{ |
| 127 | + <DuckX-2.00001,-1.00001,DuckZ+2.00001>, <DuckX+2.00001,0.00002,DuckZ-2.001> |
| 128 | + texture{WaterTexture }// end of texture |
| 129 | + interior{WaterInterior} |
| 130 | + PhotonBlock() |
| 131 | +} |
| 132 | +#declare WaterOuter= |
| 133 | +difference{ |
| 134 | + object{Water} |
| 135 | + box{ <DuckX-2,-1,DuckZ+2>, <DuckX+2,0.00001,DuckZ-2> |
| 136 | + texture{WaterTexture} |
| 137 | + interior{WaterInterior} |
| 138 | + } |
| 139 | + photons { collect off } |
| 140 | +} |
| 141 | +//==================SCENE OBJECTS HERE================== |
| 142 | +background { |
| 143 | +// rgb <0.208116, 0.000000, 0.000000> |
| 144 | +// rgb <0.157534, 0.079240, 0.201770> |
| 145 | +// rgb <0.080110, 0.000000, 0.200977> |
| 146 | +// rgb <0.748928, 0.357305, 0.068376> |
| 147 | +// rgb <0.874998, 0.526329, 0.252247> |
| 148 | +// rgb <0.194903, 0.465370, 0.539498> |
| 149 | +// rgb <0.084459, 0.201663, 0.233783> |
| 150 | +// rgb <0.025971, 0.062058, 0.071931> |
| 151 | +// rgb <0.000000, 0.015442, 0.017975> |
| 152 | + rgb <0.009369, 0.031022, 0.035950> |
| 153 | +} |
| 154 | +//sky_sphere{SkyCeiling} |
| 155 | +//object{O_Cloud1} // Night sky |
| 156 | +fog{HorizontFog} |
| 157 | +//object{Water} |
| 158 | +merge{ // Mandatory merge to not see gaps into water |
| 159 | + object{WaterOuter} |
| 160 | + object{WaterInner} |
| 161 | +} |
| 162 | +object{ EnteGanz rotate y*(90+CamAngle) translate <DuckX, DuckY+0.1, DuckZ> } |
| 163 | +//object {Clouds scale 300} // distance above ground (y=0) to lowest parts of clouds |
| 164 | + |
0 commit comments