#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 -------------------- background { color rgb <0.98, 0.72, 0.48> } // warm sunset base // -------------------- Camera -------------------- camera { location <0, 6.6, -19.4> look_at <0, 2.8, 9.0> angle 40 up <0,9,0> right <16,0,0> // right,up -> 16:9 } // -------------------- Lights (warm + soft) -------------------- light_source { <55, 24, -55> color rgb <1.00, 0.56, 0.26>*1.25 spotlight point_at <0, 2.2, 14> radius 24 falloff 42 tightness 10 area_light <8,0,0>, <0,0,8>, 4, 4 adaptive 1 jitter } light_source { <-44, 30, -6> color rgb <1.00, 0.72, 0.40>*0.55 spotlight point_at <0, 3.0, 22> radius 34 falloff 50 tightness 9 area_light <7,0,0>, <0,0,7>, 3, 3 adaptive 1 jitter } // subtle fills (non-shadowing) light_source { <0, 160, -20> color rgb <0.85, 0.60, 0.55>*0.10 shadowless } light_source { <0, 260, 120> color rgb <0.55, 0.68, 0.95>*0.06 shadowless } // -------------------- Atmosphere (sunset haze) -------------------- fog { distance 60 color rgb <1.00, 0.62, 0.40>*0.74 fog_type 2 fog_offset 0.0 fog_alt 14 turbulence 0.12 } // -------------------- Finishes -------------------- #declare F_Brick = finish { diffuse 0.86 roughness 0.10 specular 0.04 }; #declare F_Mortar = finish { diffuse 0.88 roughness 0.12 specular 0.02 }; #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_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>; #declare C_BrickA = color rgb <0.70, 0.32, 0.22>; #declare C_BrickB = color rgb <0.58, 0.26, 0.18>; #declare C_Mortar = color rgb <0.86, 0.80, 0.74>; // -------------------- Procedural textures (fast, simple) -------------------- #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 } }; // --- BRICK wall texture (correct syntax + subtle variation) --- #declare T_BrickWall = texture { pigment { // Correct POV-Ray syntax: // brick , // plus optional mortar width and brick_size brick C_BrickA, C_Mortar mortar 0.18 brick_size <0.55, 0.28, 0.55> // length, height, depth // slight color wandering to avoid perfectly uniform blocks warp { turbulence 0.03 } } normal { average normal_map { [1 brick 0.55 brick_size <0.55, 0.28, 0.55> mortar 0.18] [1 bumps 0.10 scale 0.18] } } finish { F_Brick } }; // A second brick variant for alternating buildings (old-town variety) #declare T_BrickWall_Darker = texture { pigment { brick (C_BrickB*0.98), C_Mortar mortar 0.17 brick_size <0.55, 0.28, 0.55> warp { turbulence 0.035 } } normal { average normal_map { [1 brick 0.55 brick_size <0.55, 0.28, 0.55> mortar 0.17] [1 bumps 0.10 scale 0.18] } } finish { F_Brick } }; #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 // -------------------- Sky -------------------- sphere { <0,0,0>, 500 hollow texture { pigment { gradient y color_map { [0.00 color rgb <1.00, 0.52, 0.28>] [0.22 color rgb <0.98, 0.70, 0.42>] [0.55 color rgb <0.64, 0.62, 0.86>] [1.00 color rgb <0.28, 0.36, 0.62>] } scale 300 translate <0,-35,0> } finish { diffuse 0 emission 1 } } no_shadow } disc { <0,0,0>, y, 420, 0 translate <0, 8, 240> texture { pigment { color rgb <1.00, 0.55, 0.25>*0.18 } 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 (slightly raised for edges) union { box { <-3.2, 0.012, -2>, < 3.2, 0.050, 24> Tex_Cobble(C_RoadA, C_RoadB, 1.55) } box { <-6.6, 0.010, -2>, <-3.2, 0.060, 24> Tex_Cobble(C_SideA, C_SideB, 1.20) } box { < 3.2, 0.010, -2>, < 6.6, 0.060, 24> Tex_Cobble(C_SideA, C_SideB, 1.20) } } // Low curb stones union { box { <-3.25, 0.00, -2>, <-3.12, 0.09, 24> texture { T_StoneBlocks } } box { < 3.12, 0.00, -2>, < 3.25, 0.09, 24> texture { T_StoneBlocks } } } // -------------------- 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 { // corner timbers (front) box { , texture { T_Wood } } box { , texture { T_Wood } } // stone base plinth box { , texture { T_StoneBlocks } } // wall body with cutouts difference { box { BaseMin, BaseMax texture { WallTex } } // door void box { , } #local H = 0.62; #local Re = 0.12; #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 } // door + windows inserted DoorSimple(Xc-0.58, Xc+0.58, 0.00, 1.85, Zf+0.21, 0.19) #if (YTop > 2.9) WindowSet(Xc-1.10, Xc-0.10, 2.05, 2.65, Zf+0.12, 0.14) WindowSet(Xc+0.10, Xc+1.10, 2.05, 2.65, Zf+0.12, 0.14) #end #if (YTop > 3.95) WindowSet(Xc-1.10, Xc-0.10, 3.10, 3.70, Zf+0.12, 0.14) WindowSet(Xc+0.10, Xc+1.10, 3.10, 3.70, Zf+0.12, 0.14) #end #if (YTop > 4.8) WindowSet(Xc-1.10, Xc-0.10, 4.15, 4.75, Zf+0.12, 0.14) WindowSet(Xc+0.10, Xc+1.10, 4.15, 4.75, Zf+0.12, 0.14) #end // top beam 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 } } // ridge beam box { , texture { T_Wood } } // eaves caps (front/back edges) box { , texture { T_Wood } } box { , texture { T_Wood } } } #end // -------------------- Street props -------------------- #macro StreetLamp(X, Z) union { cylinder { , , 0.06 texture { pigment { color rgb <0.10,0.08,0.07> } finish { diffuse 0.65 specular 0.15 roughness 0.08 } } } cylinder { , , 0.08 texture { pigment { color rgb <0.16,0.12,0.10> } finish { diffuse 0.65 specular 0.15 roughness 0.08 } } } sphere { , 0.14 texture { pigment { color rgbf <1.0,0.75,0.45,0.25> } finish { diffuse 0.1 specular 0.35 roughness 0.03 reflection 0.04 } } } light_source { color rgb <1.0,0.70,0.40>*0.22 shadowless } } #end #macro Crate(X,Z,S) box { , texture { T_Wood } } #end StreetLamp(-2.8, 5.0) StreetLamp( 2.8, 10.0) Crate(-5.4, 3.2, 0.30) Crate( 5.5, 6.1, 0.34) // -------------------- Left street buildings (BRICK WALLS) -------------------- union { Building(<-6.25, 0, 0>, <-3.35, 4.2, 6>, T_BrickWall) RoofGable(-4.80, 0, 6, 4.2, 1.60, 1.15) Building(<-6.45, 0, 7>, <-3.55, 5.0, 13>, T_BrickWall_Darker) RoofGable(-5.00, 7, 13, 5.0, 1.65, 1.30) Building(<-6.15, 0, 14>, <-3.25, 4.6, 20>, T_BrickWall) RoofGable(-4.70, 14, 20, 4.6, 1.60, 1.22) } // -------------------- Right street buildings (BRICK WALLS) -------------------- union { Building(< 3.35, 0, 1>, < 6.25, 4.8, 7>, T_BrickWall_Darker) RoofGable(4.80, 1, 7, 4.8, 1.60, 1.22) Building(< 3.55, 0, 8>, < 6.45, 4.2, 14>, T_BrickWall) RoofGable(5.00, 8, 14, 4.2, 1.65, 1.08) Building(< 3.25, 0, 15>, < 6.15, 5.2, 21>, T_BrickWall_Darker) RoofGable(4.70, 15, 21, 5.2, 1.60, 1.35) } // -------------------- Castle / gate (more presence) -------------------- union { // main gate block box { <-2.4, 0, 22>, <2.4, 3.4, 26> texture { T_StoneBlocks } } box { <-2.9, 0, 21.6>, <2.9, 0.40, 26.4> texture { T_StoneBlocks } } // towers at corners #declare TwR = 0.72; cylinder { <-2.9, 0, 22>, <-2.9, 4.3, 22>, TwR texture { T_StoneBlocks } } cylinder { < 2.9, 0, 22>, < 2.9, 4.3, 22>, TwR texture { T_StoneBlocks } } cylinder { <-2.9, 0, 26>, <-2.9, 4.3, 26>, TwR texture { T_StoneBlocks } } cylinder { < 2.9, 0, 26>, < 2.9, 4.3, 26>, TwR texture { T_StoneBlocks } } // battlements caps box { <-3.65, 4.30, 21.30>, <-2.15, 4.75, 22.70> texture { T_StoneBlocks } } box { < 2.15, 4.30, 21.30>, < 3.65, 4.75, 22.70> texture { T_StoneBlocks } } box { <-3.65, 4.30, 25.30>, <-2.15, 4.75, 26.70> texture { T_StoneBlocks } } box { < 2.15, 4.30, 25.30>, < 3.65, 4.75, 26.70> texture { T_StoneBlocks } } // gate door box { <-0.70, 0, 22.03>, <0.70, 1.85, 22.30> texture { T_Door } } box { <-0.95, 1.85, 22.03>, <0.95, 2.20, 22.20> texture { T_StoneBlocks } } // crenellations on main block (front & back) union { #local i = -5; #while (i <= 5) box { , texture { T_StoneBlocks } } box { , texture { T_StoneBlocks } } #local i = i + 1; #end } // side walls hint behind gate to add depth box { <-5.8, 0.00, 25.6>, <-2.4, 2.1, 26.2> texture { T_StoneBlocks } } box { < 2.4, 0.00, 25.6>, < 5.8, 2.1, 26.2> texture { T_StoneBlocks } } }