#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.78, 0.86, 0.98> } // -------------------- 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 (warm, soft shadows) -------------------- light_source { <45, 60, -35> color rgb <1.00, 0.92, 0.80>*1.10 area_light <10,0,0>, <0,0,10>, 6, 6 adaptive 1 jitter } light_source { <-28, 28, -8> color rgb <1.00, 0.90, 0.78>*0.55 area_light <8,0,0>, <0,0,8>, 5, 5 adaptive 1 jitter } // subtle sky fill (fast) light_source { <0, 200, 0> color rgb <0.78, 0.86, 0.98>*0.18 shadowless } // -------------------- Atmosphere -------------------- fog { distance 90 color rgb <0.78, 0.86, 0.98> fog_type 2 fog_offset 0.0 fog_alt 20 turbulence 0.0 } // -------------------- 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, no image maps) -------------------- #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 { // tile-row suggestion + gentle speckle 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 { // blocky stone feel using crackle + granite variation 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 } }; // --- FIX: proper macro that EXPANDS a texture block (no invalid function()) --- #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 gradient (fast) -------------------- sphere { <0,0,0>, 500 hollow texture { pigment { gradient y color_map { [0.00 color rgb <0.65,0.76,0.90>] [0.55 color rgb <0.78,0.86,0.98>] [1.00 color rgb <0.92,0.95,1.00>] } scale 300 translate <0,-30,0> } 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 clean edges) 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 { // frame box { , texture { T_Wood } } // mullion (simple) box { <(X1+X2)/2-0.03, Y1+0.05, Z-Depth>, <(X1+X2)/2+0.03, Y2-0.05, Z> texture { T_Wood } } // glass inset box { , texture { T_Glass } } } #end #macro DoorSimple(X1,X2, Y1,Y2, Z, Depth) union { box { , texture { T_Door } } // small top lintel trim box { , texture { T_Wood } } // threshold stone 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 { // subtle corner trim pilasters box { , texture { T_Wood } } box { , texture { T_Wood } } // plinth band (stone base) box { , texture { T_StoneBlocks } } // main volume with cutouts difference { box { BaseMin, BaseMax texture { WallTex } } // door on front face box { , } // window recesses #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 } // door + windows placed into recesses 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 // roof trim band (sits on top) box { , texture { T_Wood } } } #end #macro RoofGable(CenterX, Z1, Z2, YBase, HalfW, Height) union { // main gable prism prism { linear_sweep linear_spline Z1, Z2, 3, <-HalfW, YBase>, < 0, YBase+Height>, < HalfW, YBase> translate texture { T_Roof } } // thin cap ridge for readability 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 { // main block + plinth 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 } } // corner towers 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 } } } // gate door inset box { <-0.60, 0, 22.02>, <0.60, 1.65, 22.26> texture { T_Door } } // crenellations union { #local i = -4; #while (i <= 4) box { , texture { T_StoneBlocks } } box { , texture { T_StoneBlocks } } #local i = i + 1; #end } // arch hint above gate box { <-0.85, 1.65, 22.03>, <0.85, 2.05, 22.18> texture { T_StoneBlocks } } }