#version 3.7; global_settings { assumed_gamma 1.0 max_trace_level 8 } background { color rgb <0.70, 0.84, 1.00> } #declare SunDir = vnormalize(<-0.6, 1.0, -0.3>); camera { location <0, 3.2, -12> look_at <0, 2.0, 0> angle 45 } light_source { <0,0,0> color rgb <1.0, 0.98, 0.92>*1.1 parallel point_at SunDir } light_source { <2, 6, -8> color rgb <0.5, 0.65, 0.9>*0.35 area_light <2,0,0>, <0,0,2>, 5, 5 adaptive 1 jitter } #default { finish { diffuse 0.9 specular 0.12 roughness 0.04 } } fog { distance 55 color rgb <0.70, 0.84, 1.00> fog_type 2 fog_offset 0.0 fog_alt 2.0 turbulence 0.2 } #declare Tex_Grass = texture { pigment { bozo color_map { [0.00 color rgb <0.12, 0.28, 0.10>] [0.55 color rgb <0.16, 0.36, 0.14>] [1.00 color rgb <0.10, 0.24, 0.10>] } scale 0.8 } normal { bumps 0.45 scale 0.12 } finish { diffuse 0.95 specular 0.05 roughness 0.08 } } plane { y, 0 texture { Tex_Grass } } #declare Tex_Brick = texture { pigment { brick color rgb <0.55, 0.20, 0.16>, color rgb <0.46, 0.16, 0.12> brick_size <0.36, 0.18, 0.18> mortar 0.13 scale 1 } normal { bumps 0.35 scale 0.06 } finish { diffuse 0.92 specular 0.10 roughness 0.06 } } #declare Tex_MortarWash = texture { pigment { bozo color_map { [0.0 color rgbt <1,1,1,0.85>] [1.0 color rgbt <1,1,1,1.00>] } scale 1.6 } finish { diffuse 0.0 } } #declare Tex_Wood = texture { pigment { wood color_map { [0.00 color rgb <0.36, 0.20, 0.10>] [0.35 color rgb <0.44, 0.25, 0.13>] [1.00 color rgb <0.28, 0.16, 0.08>] } turbulence 0.15 scale 0.35 rotate <0,90,0> } normal { bumps 0.35 scale 0.02 } finish { diffuse 0.85 specular 0.18 roughness 0.05 } } #declare Tex_Roof = texture { pigment { gradient y color_map { [0.0 color rgb <0.20, 0.20, 0.22>] [1.0 color rgb <0.12, 0.12, 0.14>] } scale 2 } normal { bumps 0.25 scale 0.06 } finish { diffuse 0.85 specular 0.12 roughness 0.08 } } #declare Tex_Glass = texture { pigment { color rgbt <0.75, 0.88, 1.0, 0.75> } finish { diffuse 0.1 specular 0.65 roughness 0.01 reflection 0.10 } } #declare Tex_WindowGlow = texture { pigment { color rgb <1.0, 0.78, 0.40> } finish { emission 1.2 diffuse 0 } } #declare BuildingW = 8.0; #declare BuildingD = 5.0; #declare WallH = 3.4; #declare WallT = 0.28; #declare House = union { difference { box { <-BuildingW/2, 0, -BuildingD/2>, } // hollow interior box { <-BuildingW/2+WallT, 0.05, -BuildingD/2+WallT>, } // door opening on front (z = -BuildingD/2) box { <-0.9, 0.0, -BuildingD/2-0.01>, <0.9, 2.2, -BuildingD/2+0.35> } // window openings (front) box { <-3.2, 1.2, -BuildingD/2-0.01>, <-2.0, 2.3, -BuildingD/2+0.35> } box { < 2.0, 1.2, -BuildingD/2-0.01>, < 3.2, 2.3, -BuildingD/2+0.35> } // window openings (side right, x = +BuildingW/2) box { , } box { , } // window openings (side left, x = -BuildingW/2) box { <-BuildingW/2-0.01, 1.1, -1.6>, <-BuildingW/2+0.35, 2.2, -0.3> } box { <-BuildingW/2-0.01, 1.1, 0.3>, <-BuildingW/2+0.35, 2.2, 1.6> } texture { Tex_Brick } } // subtle mortar wash variation to soften bricks (overlay shell) box { <-BuildingW/2, 0, -BuildingD/2>, texture { Tex_MortarWash } no_shadow } } object { House } #declare Roof = union { prism { linear_sweep linear_spline -BuildingD/2-0.1, BuildingD/2+0.1, 5, <-BuildingW/2-0.15, WallH>, < 0.0, WallH+1.7>, < BuildingW/2+0.15, WallH>, < BuildingW/2+0.15, WallH-0.05>, <-BuildingW/2-0.15, WallH-0.05> texture { Tex_Roof } } } object { Roof } #declare Door = union { // frame box { <-0.98, 0.0, -BuildingD/2-0.03>, <0.98, 2.28, -BuildingD/2+0.10> texture { pigment { color rgb <0.12,0.07,0.04> } finish { diffuse 0.8 specular 0.15 roughness 0.05 } } } // left panel box { <-0.90, 0.02, -BuildingD/2-0.02>, <-0.02, 2.18, -BuildingD/2+0.06> texture { Tex_Wood } } // right panel box { < 0.02, 0.02, -BuildingD/2-0.02>, < 0.90, 2.18, -BuildingD/2+0.06> texture { Tex_Wood } } // vertical planks impression #local i = -7; #while (i <= 7) cylinder { <-0.46 + i*0.06, 0.1, -BuildingD/2+0.055>, <-0.46 + i*0.06, 2.1, -BuildingD/2+0.055>, 0.006 texture { pigment { color rgb <0.08,0.05,0.03> } finish { diffuse 0.7 specular 0.2 roughness 0.06 } } } cylinder { < 0.14 + i*0.06, 0.1, -BuildingD/2+0.055>, < 0.14 + i*0.06, 2.1, -BuildingD/2+0.055>, 0.006 texture { pigment { color rgb <0.08,0.05,0.03> } finish { diffuse 0.7 specular 0.2 roughness 0.06 } } } #local i = i + 1; #end // handles sphere { <-0.10, 1.10, -BuildingD/2+0.08>, 0.04 texture { pigment { color rgb <0.85,0.72,0.35> } finish { specular 0.55 roughness 0.03 } } } sphere { < 0.10, 1.10, -BuildingD/2+0.08>, 0.04 texture { pigment { color rgb <0.85,0.72,0.35> } finish { specular 0.55 roughness 0.03 } } } } object { Door } #macro WindowAt(Pos, Size) union { // frame box { Pos + <-Size.x/2-0.06, -0.06, -0.06>, Pos + texture { pigment { color rgb <0.14,0.09,0.06> } finish { diffuse 0.85 specular 0.15 roughness 0.06 } } } // glass box { Pos + <-Size.x/2, 0, -0.02>, Pos + texture { Tex_Glass } } // warm glow plane behind glass box { Pos + <-Size.x/2+0.02, 0.02, 0.04>, Pos + texture { Tex_WindowGlow } no_shadow } // muntins box { Pos + <-0.02, 0.05, -0.03>, Pos + <0.02, Size.y-0.05, 0.03> texture { pigment { color rgb <0.10,0.06,0.04> } finish { diffuse 0.8 } } } box { Pos + <-Size.x/2+0.05, Size.y/2-0.02, -0.03>, Pos + texture { pigment { color rgb <0.10,0.06,0.04> } finish { diffuse 0.8 } } } } #end // Front windows object { WindowAt(<-2.6, 1.2, -BuildingD/2+0.12>, <1.15, 1.05, 0>) } object { WindowAt(< 2.6, 1.2, -BuildingD/2+0.12>, <1.15, 1.05, 0>) } // Side windows (right) object { WindowAt(< BuildingW/2-0.12, 1.1, -0.95>, <1.00, 1.00, 0>) rotate <0,90,0> } object { WindowAt(< BuildingW/2-0.12, 1.1, 0.95>, <1.00, 1.00, 0>) rotate <0,90,0> } // Side windows (left) object { WindowAt(<-BuildingW/2+0.12, 1.1, -0.95>, <1.00, 1.00, 0>) rotate <0,90,0> } object { WindowAt(<-BuildingW/2+0.12, 1.1, 0.95>, <1.00, 1.00, 0>) rotate <0,90,0> } // Warm interior light leaking out light_source { <0, 1.8, 0> color rgb <1.0, 0.78, 0.45>*0.55 fade_distance 6 fade_power 2 } // Small exterior lanterns by the door #declare LanternTex = texture { pigment { color rgb <0.08,0.08,0.09> } finish { diffuse 0.7 specular 0.35 roughness 0.04 } }; union { box { <-1.35, 1.55, -BuildingD/2-0.02>, <-1.15, 1.85, -BuildingD/2+0.18> texture { LanternTex } } cylinder { <-1.25, 1.55, -BuildingD/2+0.08>, <-1.25, 1.40, -BuildingD/2+0.08>, 0.02 texture { LanternTex } } sphere { <-1.25, 1.70, -BuildingD/2+0.08>, 0.08 texture { Tex_Glass } } sphere { <-1.25, 1.70, -BuildingD/2+0.08>, 0.06 texture { Tex_WindowGlow } no_shadow } } light_source { <-1.25, 1.70, -BuildingD/2+0.10> color rgb <1.0, 0.78, 0.40>*0.65 fade_distance 5 fade_power 2 } union { box { < 1.15, 1.55, -BuildingD/2-0.02>, < 1.35, 1.85, -BuildingD/2+0.18> texture { LanternTex } } cylinder { < 1.25, 1.55, -BuildingD/2+0.08>, < 1.25, 1.40, -BuildingD/2+0.08>, 0.02 texture { LanternTex } } sphere { < 1.25, 1.70, -BuildingD/2+0.08>, 0.08 texture { Tex_Glass } } sphere { < 1.25, 1.70, -BuildingD/2+0.08>, 0.06 texture { Tex_WindowGlow } no_shadow } } light_source { <1.25, 1.70, -BuildingD/2+0.10> color rgb <1.0, 0.78, 0.40>*0.65 fade_distance 5 fade_power 2 } // A small path patch in front of door box { <-1.2, 0.001, -BuildingD/2-0.85>, <1.2, 0.02, -BuildingD/2-0.10> texture { pigment { granite color_map { [0.0 color rgb <0.22,0.20,0.18>] [1.0 color rgb <0.38,0.36,0.33>] } scale 0.35 } normal { bumps 0.3 scale 0.08 } finish { diffuse 0.95 specular 0.08 roughness 0.07 } } }