Skip to content

Commit 1c8a576

Browse files
committed
Merge branch 'master' of github.com:buzzer/Computer-Graphics
* 'master' of github.com:buzzer/Computer-Graphics: Added 2 static scenes for movie poster. Added missing texture include.
2 parents 8be5a9b + f38d4a9 commit 1c8a576

File tree

3 files changed

+235
-0
lines changed

3 files changed

+235
-0
lines changed

_bath/BathScenePic.pov

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
//================POVRAY SPECIFIC======================
2+
#include "ScenesGlobals.inc"
3+
//================SCENE EFFECTS=======================
4+
#declare EffCamWave = false; // Make intro wave disturbance, camera
5+
#declare EffWaterHose = on; // Let the tub filler produce water
6+
#declare EffSteamDist = false; // Fill the room with fine steam with disturbance
7+
//================SCENE CONSTANTS====================
8+
// Room geometry
9+
#declare RoomHeight = 20;
10+
#declare RoomWidth = 30;
11+
#declare RoomDepth = 20;
12+
// Room walls
13+
#declare TileScaleWall = 2.5;
14+
#declare TileScaleFloor = 3.5;
15+
// Ducky
16+
// Entenposition
17+
#declare DuckX = 22;//27-11*clock;
18+
#declare DuckY = 4;
19+
#declare DuckZ = -4;
20+
#declare DuckRot = 20;//180*clock;
21+
//Tub Filler
22+
#declare TubFillerPos = <RoomWidth*13/18, 6.5, 0>;
23+
#declare TubFillerOpening = TubFillerPos - < 0, 0.4, 2.2>;
24+
//==================INCLUDE FILES HERE=================
25+
#include "toiletx01.inc"
26+
#include "Ente.inc"
27+
#include "tileWall.inc"
28+
//#include "bathCamera01.inc"
29+
//camera{BathCamera}
30+
camera { perspective
31+
angle 80 location < DuckX-4, DuckY+1, DuckZ-1> look_at < DuckX, DuckY+1, DuckZ+0.8>}
32+
light_source { < RoomWidth/2, RoomHeight-1, -RoomDepth/2> White*0.6 }
33+
#include "bathtub.inc" // Has to be included after Ducky position declaration for normals!
34+
#include "roomSteam.inc" // Needs Room geometry declarations
35+
#include "roomWalls.inc" // Needs Room geometry declarations
36+
#include "bathShelf.inc"
37+
#include "tubFiller.inc"
38+
#include "washTub.inc"
39+
#include "bathDoor.inc"
40+
#if (EffWaterHose)
41+
#include "tubHose.inc" // Hose particles
42+
#end
43+
#include "furniture.inc"
44+
#include "mirror.inc"
45+
//==================SCENE OBJECTS HERE==================
46+
object{RoomWalls}
47+
object{BathDoor scale <3,3.5,1> rotate y*-90 translate z*-4/5*RoomDepth }
48+
#declare ToiletWidth = 6; // Approximated !!!
49+
object{toiletx01 translate <1/4*RoomWidth, 0, 0> }
50+
// Ducky
51+
object{EnteGanz rotate y*(180-DuckRot) translate <DuckX, DuckY, DuckZ>}
52+
53+
object{Bathtub translate <(RoomWidth-TubWidth), 0, 0>}
54+
object{tub_filler scale 0.4 rotate y*180 translate TubFillerPos }
55+
object{FillerKnob scale 2 translate TubFillerPos-x*2}
56+
object{FillerKnob scale 2 translate TubFillerPos+x*2}
57+
58+
// Steam
59+
#if (EffSteamDist) object{Steam} #end
60+
// Furniture
61+
object{BathShelf scale 5 rotate y*-90 translate <0, 0, -RoomDepth*0.3>}
62+
object{Wardrobe scale 8 rotate y*180 translate <RoomWidth-1, 0, -0.97*RoomDepth> }
63+
object{Chest1 scale 8 rotate y*180 translate <RoomWidth*3/4, 0, -0.97*RoomDepth> }
64+
object{Chest2 scale 10 translate <1/6*RoomWidth, 1/2*RoomHeight, 0> }
65+
// Mirror
66+
object{Mirror scale 7 rotate y*180 translate <0.3*RoomWidth, 0.5*RoomHeight, -0.99*RoomDepth>}
67+
object{Washtub scale 2 rotate y*180 translate <0.3*RoomWidth, 0.4*RoomHeight, -RoomDepth>}
68+
object{tub_filler scale 0.3 translate <0.3*RoomWidth, 0.45*RoomHeight, -RoomDepth> }
69+
object{FillerKnob scale 2 rotate y*180 translate <0.25*RoomWidth, 0.45*RoomHeight, -RoomDepth>}
70+
object{FillerKnob scale 2 rotate y*180 translate <0.35*RoomWidth, 0.45*RoomHeight, -RoomDepth>}

_include/tubwater.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "glass.inc" // for Water
2+
#include "textures.inc" // for green glass texture
23

34
// Water
45
#declare Water =

_openwater/openWaterScenePic.pov

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
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

Comments
 (0)