#version 3.7; global_settings { assumed_gamma 1.3 max_trace_level 16 radiosity { pretrace_start 0.08 pretrace_end 0.01 count 200 nearest_count 10 error_bound 0.5 recursion_limit 2 low_error_factor 0.5 gray_threshold 0.0 } } #include "colors.inc" background { color rgb <0.98, 0.72, 0.48> } // warm sunset base // -------------------- Camera -------------------- camera { location <0, 6.6, -18.5> look_at <0, 2.9, 7.5> angle 40 up <0,9,0> right <16,0,0> // right,up -> 16:9 } // -------------------- Lights (sunset, conical, soft-ish) -------------------- // Key "sun" spotlight: low angle, warm, long shadows light_source { <55, 22, -55> color rgb <1.00, 0.56, 0.26>*1.55 spotlight point_at <0, 2.0, 12> radius 18 falloff 32 tightness 12 } // Secondary warm rim: helps separate silhouettes from fog light_source { <-40, 28, -10> color rgb <1.00, 0.72, 0.40>*0.70 spotlight point_at <0, 3.0, 18> radius 28 falloff 44 tightness 10 } // Very soft ambient sky fill (kept low so sunset stays directional) light_source { <0, 160, -20> color rgb <0.85, 0.60, 0.55>*0.10 shadowless } // Cool distant fill from upper sky to prevent crushed shadows light_source { <0, 260, 120> color rgb <0.55, 0.68, 0.95>*0.05 shadowless } // -------------------- Atmosphere (sunset haze) -------------------- fog { distance 55 color rgb <1.00, 0.62, 0.40>*0.78 fog_type 2 fog_offset 0.0 fog_alt 14 turbulence 0.15 } // -------------------- Finishes -------------------- #declare F_Plaster = finish { diffuse 0.86 roughness 0.07 specular 0.06 }; #declare F_Stone = finish { diffuse 0.82 roughness 0.12 specular 0.05 }; #declare F_Wood = finish { diffuse 0.70 roughness 0.10 specular 0.10 }; #declare F_Roof = finish { diffuse 0.78 roughness 0.09 specular 0.06 }; #declare F_Ground = finish { diffuse 0.92 roughness 0.14 specular 0.02 }; #declare F_Glass = finish { diffuse 0.03 specular 0.55 roughness 0.01 reflection 0.08 }; // -------------------- Palette -------------------- #declare C_Plaster1 = color rgb <0.88, 0.84, 0.78>; #declare C_Plaster2 = color rgb <0.80, 0.85, 0.86>; #declare C_Trim = color rgb <0.32, 0.20, 0.12>; #declare C_Roof = color rgb <0.55, 0.25, 0.18>; #declare C_Stone = color rgb <0.72, 0.72, 0.70>; #declare C_RoadA = color rgb <0.52, 0.50, 0.48>; #declare C_RoadB = color rgb <0.62, 0.60, 0.57>; #declare C_SideA = color rgb <0.70, 0.68, 0.64>; #declare C_SideB = color rgb <0.78, 0.76, 0.72>; // -------------------- Procedural textures (fast) -------------------- #declare T_Wood = texture { pigment { wood color_map { [0.00 color C_Trim*0.70] [0.30 color C_Trim*0.95] [0.60 color C_Trim*1.08] [1.00 color C_Trim*0.78] } scale 0.22 rotate <0,90,0> } normal { ripples 0.14 scale 0.16 } finish { F_Wood } }; #declare T_Roof = texture { pigment { average pigment_map { [1 gradient x color_map { [0.00 color C_Roof*0.78] [0.10 color C_Roof*1.12] [0.20 color C_Roof*0.84] [1.00 color C_Roof*0.84] } scale 0.20 ] [1 granite color_map { [0.00 color C_Roof*0.90] [1.00 color C_Roof*1.12] } scale 0.35 ] } } normal { bumps 0.25 scale 0.09 } finish { F_Roof } }; #declare T_StoneBlocks = texture { pigment { average pigment_map { [2 crackle color_map { [0.00 color C_Stone*0.82] [0.45 color C_Stone*1.05] [1.00 color C_Stone*0.76] } scale 0.85 ] [1 granite color_map { [0.00 color C_Stone*0.86] [1.00 color C_Stone*1.18] } scale 0.55 ] } } normal { average normal_map { [1 crackle 0.55 scale 0.55] [1 bumps 0.25 scale 0.35] } } finish { F_Stone } }; #declare T_Plaster1 = texture { pigment { granite color_map { [0.00 color C_Plaster1*0.86] [0.55 color C_Plaster1*1.03] [1.00 color C_Plaster1*1.14] } scale 0.55 } normal { bumps 0.12 scale 0.22 } finish { F_Plaster } }; #declare T_Plaster2 = texture { pigment { granite color_map { [0.00 color C_Plaster2*0.86] [0.55 color C_Plaster2*1.03] [1.00 color C_Plaster2*1.14] } scale 0.55 } normal { bumps 0.12 scale 0.22 } finish { F_Plaster } }; #declare T_Door = texture { pigment { wood color_map { [0.00 color rgb <0.14,0.10,0.07>] [0.55 color rgb <0.23,0.16,0.11>] [1.00 color rgb <0.11,0.08,0.05>] } scale 0.20 rotate <0,90,0> } normal { ripples 0.18 scale 0.12 } finish { diffuse 0.66 roughness 0.10 specular 0.10 } }; #declare T_Glass = texture { pigment { color rgbf <0.70, 0.85, 0.95, 0.82> } finish { F_Glass } }; #macro Tex_Cobble(ColA, ColB, ScaleV) texture { pigment { crackle color_map { [0.00 color (ColA*0.78)] [0.55 color (ColB*1.08)] [1.00 color (ColA*0.74)] } scale (ScaleV) } normal { average normal_map { [1 crackle 0.65 scale (ScaleV*0.55)] [1 bumps 0.18 scale (ScaleV*0.30)] } } finish { F_Ground } } #end // -------------------- Sunset sky gradient + horizon glow -------------------- sphere { <0,0,0>, 500 hollow texture { pigment { gradient y color_map { [0.00 color rgb <1.00, 0.52, 0.28>] // near horizon [0.22 color rgb <0.98, 0.70, 0.42>] [0.55 color rgb <0.64, 0.62, 0.86>] // lavender transition [1.00 color rgb <0.28, 0.36, 0.62>] // upper sky } scale 300 translate <0,-35,0> } finish { diffuse 0 emission 1 } } no_shadow } // Horizon glow disk (atmospheric "sun" bloom without heavy scattering) disc { <0,0,0>, y, 420, 0 translate <0, 8, 240> texture { pigment { color rgb <1.00, 0.55, 0.25>*0.20 } finish { diffuse 0 emission 1 } } no_shadow } // -------------------- Ground -------------------- plane { y, 0 Tex_Cobble(color rgb <0.70,0.72,0.70>, color rgb <0.76,0.78,0.76>, 2.9) } // Road + sidewalks union { box { <-3.2, 0.01, -2>, < 3.2, 0.04, 24> Tex_Cobble(C_RoadA, C_RoadB, 1.55) } box { <-6.5, 0.01, -2>, <-3.2, 0.05, 24> Tex_Cobble(C_SideA, C_SideB, 1.20) } box { < 3.2, 0.01, -2>, < 6.5, 0.05, 24> Tex_Cobble(C_SideA, C_SideB, 1.20) } } // -------------------- Building details -------------------- #macro WindowSet(X1,X2, Y1,Y2, Z, Depth) union { box { , texture { T_Wood } } box { <(X1+X2)/2-0.03, Y1+0.05, Z-Depth>, <(X1+X2)/2+0.03, Y2-0.05, Z> texture { T_Wood } } box { , texture { T_Glass } } } #end #macro DoorSimple(X1,X2, Y1,Y2, Z, Depth) union { box { , texture { T_Door } } box { , texture { T_Wood } } box { , texture { T_StoneBlocks } } } #end #macro Building(BaseMin, BaseMax, WallTex) #local Zf = BaseMin.z; #local Xc = (BaseMin.x+BaseMax.x)/2; #local YTop = BaseMax.y; union { box { , texture { T_Wood } } box { , texture { T_Wood } } box { , texture { T_StoneBlocks } } difference { box { BaseMin, BaseMax texture { WallTex } } box { , } #local H = 0.62; #local Re = 0.10; #local Yw1 = 2.05; #local Yw2 = 3.10; #local Yw3 = 4.15; #if (YTop > 2.9) box { , } box { , } #end #if (YTop > 3.95) box { , } box { , } #end #if (YTop > 4.8) box { , } box { , } #end } DoorSimple(Xc-0.58, Xc+0.58, 0.00, 1.85, Zf+0.19, 0.17) #if (YTop > 2.9) WindowSet(Xc-1.10, Xc-0.10, 2.05, 2.65, Zf+0.10, 0.12) WindowSet(Xc+0.10, Xc+1.10, 2.05, 2.65, Zf+0.10, 0.12) #end #if (YTop > 3.95) WindowSet(Xc-1.10, Xc-0.10, 3.10, 3.70, Zf+0.10, 0.12) WindowSet(Xc+0.10, Xc+1.10, 3.10, 3.70, Zf+0.10, 0.12) #end #if (YTop > 4.8) WindowSet(Xc-1.10, Xc-0.10, 4.15, 4.75, Zf+0.10, 0.12) WindowSet(Xc+0.10, Xc+1.10, 4.15, 4.75, Zf+0.10, 0.12) #end box { , texture { T_Wood } } } #end #macro RoofGable(CenterX, Z1, Z2, YBase, HalfW, Height) union { prism { linear_sweep linear_spline Z1, Z2, 3, <-HalfW, YBase>, < 0, YBase+Height>, < HalfW, YBase> translate texture { T_Roof } } box { , texture { T_Wood } } } #end // -------------------- Left street buildings -------------------- union { Building(<-6.2, 0, 0>, <-3.4, 4.2, 6>, T_Plaster1) RoofGable(-4.8, 0, 6, 4.2, 1.55, 1.15) Building(<-6.4, 0, 7>, <-3.6, 5.0, 13>, T_Plaster2) RoofGable(-5.0, 7, 13, 5.0, 1.60, 1.30) Building(<-6.1, 0, 14>, <-3.3, 4.6, 20>, T_Plaster1) RoofGable(-4.7, 14, 20, 4.6, 1.55, 1.22) } // -------------------- Right street buildings -------------------- union { Building(< 3.4, 0, 1>, < 6.2, 4.8, 7>, T_Plaster2) RoofGable(4.8, 1, 7, 4.8, 1.55, 1.22) Building(< 3.6, 0, 8>, < 6.4, 4.2, 14>, T_Plaster1) RoofGable(5.0, 8, 14, 4.2, 1.60, 1.08) Building(< 3.3, 0, 15>, < 6.1, 5.2, 21>, T_Plaster2) RoofGable(4.7, 15, 21, 5.2, 1.55, 1.35) } // -------------------- Castle / gate -------------------- union { box { <-2.2, 0, 22>, <2.2, 3.2, 26> texture { T_StoneBlocks } } box { <-2.6, 0, 21.6>, <2.6, 0.35, 26.4> texture { T_StoneBlocks } } union { cylinder { <-2.6, 0, 22>, <-2.6, 4.0, 22>, 0.65 texture { T_StoneBlocks } } box { <-3.25, 4.0, 21.35>, <-1.95, 4.5, 22.65> texture { T_StoneBlocks } } } union { cylinder { <2.6, 0, 22>, <2.6, 4.0, 22>, 0.65 texture { T_StoneBlocks } } box { <1.95, 4.0, 21.35>, <3.25, 4.5, 22.65> texture { T_StoneBlocks } } } union { cylinder { <-2.6, 0, 26>, <-2.6, 4.0, 26>, 0.65 texture { T_StoneBlocks } } box { <-3.25, 4.0, 25.35>, <-1.95, 4.5, 26.65> texture { T_StoneBlocks } } } union { cylinder { <2.6, 0, 26>, <2.6, 4.0, 26>, 0.65 texture { T_StoneBlocks } } box { <1.95, 4.0, 25.35>, <3.25, 4.5, 26.65> texture { T_StoneBlocks } } } box { <-0.60, 0, 22.02>, <0.60, 1.65, 22.26> texture { T_Door } } union { #local i = -4; #while (i <= 4) box { , texture { T_StoneBlocks } } box { , texture { T_StoneBlocks } } #local i = i + 1; #end } box { <-0.85, 1.65, 22.03>, <0.85, 2.05, 22.18> texture { T_StoneBlocks } } }