#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 } } background { color rgb <0.70, 0.82, 0.95> } camera { location <22, 12, -22> look_at <0, 4.5, 0> angle 40 up <0,9,0> right <16,0,0> // right,up -> 16:9 } light_source { <35, 35, -30> color rgb <1.00, 0.86, 0.70>*1.25 area_light <6,0,0>, <0,0,6>, 7, 7 adaptive 1 jitter } light_source { <-20, 20, -10> color rgb <1.00, 0.90, 0.80>*0.45 area_light <4,0,0>, <0,0,4>, 5, 5 adaptive 1 jitter } // --- Colors / Materials --- #declare Col_Stone = rgb <0.70, 0.70, 0.72>; #declare Col_Stone2 = rgb <0.62, 0.62, 0.66>; #declare Col_RoofRed = rgb <0.62, 0.20, 0.18>; #declare Col_RoofTan = rgb <0.55, 0.42, 0.22>; #declare Col_Wood = rgb <0.45, 0.28, 0.16>; #declare Col_Ground = rgb <0.34, 0.42, 0.30>; #declare Col_Path = rgb <0.45, 0.45, 0.46>; #declare MatStone = finish { diffuse 0.75 specular 0.10 roughness 0.08 }; #declare MatRoof = finish { diffuse 0.80 specular 0.08 roughness 0.10 }; #declare MatGround = finish { diffuse 0.90 specular 0.02 roughness 0.20 }; // --- Ground --- plane { y, 0 pigment { color Col_Ground } finish { MatGround } } // Slight hill under the castle sphere { <0, 0.8, 4>, 5.2 scale <1.35, 0.55, 1.15> pigment { color rgb <0.30,0.38,0.27> } finish { MatGround } } // Main path through town box { <-10, 0.001, -12>, <10, 0.02, 10> pigment { color Col_Path } finish { diffuse 0.85 specular 0.03 roughness 0.2 } } // --- Castle (keep + towers) --- #declare Keep = union { // Keep body box { <-2.2, 1.2, 2.2>, <2.2, 8.2, 6.6> pigment { color Col_Stone } finish { MatStone } } // Crenellations #local ii = -2; #while (ii <= 2) box { , pigment { color Col_Stone2 } finish { MatStone } } box { , pigment { color Col_Stone2 } finish { MatStone } } #local ii = ii + 1; #end // Corner towers #declare Tower = union { cylinder { <0,1.2,0>, <0,7.7,0>, 0.9 pigment { color Col_Stone2 } finish { MatStone } } cone { <0,7.7,0>, 1.1, <0,9.2,0>, 0.0 pigment { color Col_RoofTan } finish { MatRoof } } } object { Tower translate <-2.2,0,2.2> } object { Tower translate < 2.2,0,2.2> } object { Tower translate <-2.2,0,6.6> } object { Tower translate < 2.2,0,6.6> } // Entrance block box { <-0.9, 1.2, 1.1>, <0.9, 4.2, 2.2> pigment { color Col_Stone2 } finish { MatStone } } // Gate opening (darker inset) box { <-0.45, 1.2, 1.08>, <0.45, 3.0, 1.6> pigment { color rgb <0.15,0.15,0.16> } finish { diffuse 0.9 } } } object { Keep } // --- City walls --- #declare WallH = 2.4; #declare WallT = 0.55; #declare WallSeg = union { box { <-1, 0, -WallT/2>, <1, WallH, WallT/2> pigment { color Col_Stone2 } finish { MatStone } } // simple crenels #local kk = -0.8; #while (kk <= 0.8) box { , pigment { color Col_Stone } finish { MatStone } } #local kk = kk + 0.4; #end } #declare CornerTower = union { cylinder { <0,0,0>, <0,3.4,0>, 1.05 pigment { color Col_Stone } finish { MatStone } } cone { <0,3.4,0>, 1.25, <0,4.7,0>, 0 pigment { color Col_RoofRed } finish { MatRoof } } } union { // Rectangular perimeter around town #local x1 = -12; #local x2 = 12; #local z1 = -10; #local z2 = 12; // North wall (z2) #local wx = x1; #while (wx < x2) object { WallSeg translate } #local wx = wx + 2; #end // South wall (z1) #local wx = x1; #while (wx < x2) object { WallSeg translate } #local wx = wx + 2; #end // East wall (x2) #local wz = z1; #while (wz < z2) object { WallSeg rotate <0,90,0> translate } #local wz = wz + 2; #end // West wall (x1) #local wz = z1; #while (wz < z2) object { WallSeg rotate <0,90,0> translate } #local wz = wz + 2; #end // Gatehouse at south wall center (aligned to wall thickness) union { box { <-1.8, 0, 0>, <1.8, 2.9, 1.6> pigment { color Col_Stone } finish { MatStone } } box { <-0.7, 0, 0.02>, <0.7, 2.0, 1.62> pigment { color rgb <0.14,0.14,0.15> } finish { diffuse 0.9 } } // small roof prism { linear_sweep linear_spline 0, 1.6, 3, <-2.1, 2.9>, <0, 3.7>, <2.1, 2.9> pigment { color Col_RoofTan } finish { MatRoof } rotate <0,90,0> } // place it just outside the south wall, centered at x=0 translate <0,0,z1-0.8> } // Corner towers object { CornerTower translate } object { CornerTower translate } object { CornerTower translate } object { CornerTower translate } } // --- Old town houses (simple blocks + gable roofs) --- #declare House = union { box { <-0.9, 0, -0.7>, <0.9, 1.5, 0.7> pigment { color rgb <0.78,0.74,0.68> } finish { diffuse 0.8 specular 0.06 roughness 0.12 } } box { <-0.9, 0, -0.7>, <-0.75, 1.5, 0.7> pigment { color Col_Wood } finish { diffuse 0.85 specular 0.03 roughness 0.2 } } box { <0.75, 0, -0.7>, <0.9, 1.5, 0.7> pigment { color Col_Wood } finish { diffuse 0.85 specular 0.03 roughness 0.2 } } prism { linear_sweep linear_spline -0.7, 0.7, 3, <-0.95, 1.5>, <0, 2.3>, <0.95, 1.5> pigment { color Col_RoofRed } finish { MatRoof } } } #declare House2 = union { box { <-0.7, 0, -0.6>, <0.7, 1.2, 0.6> pigment { color rgb <0.72,0.76,0.80> } finish { diffuse 0.8 specular 0.05 roughness 0.14 } } prism { linear_sweep linear_spline -0.6, 0.6, 3, <-0.8, 1.2>, <0, 1.85>, <0.8, 1.2> pigment { color Col_RoofTan } finish { MatRoof } } } // Place a cluster in the foreground and midground union { object { House rotate <0, 10,0> scale 1.0 translate <-6,0,-7> } object { House2 rotate <0, -15,0> scale 1.1 translate <-3.5,0,-6.2> } object { House rotate <0, 22,0> scale 0.95 translate <-1.2,0,-7.6> } object { House2 rotate <0, 35,0> scale 0.9 translate < 1.8,0,-6.8> } object { House rotate <0, -18,0> scale 1.05 translate < 4.6,0,-7.4> } object { House2 rotate <0, -28,0> scale 1.0 translate < 7.4,0,-6.5> } object { House2 rotate <0, 12,0> scale 0.9 translate <-7.8,0,-2.4> } object { House rotate <0, -12,0> scale 1.0 translate <-5.3,0,-2.0> } object { House2 rotate <0, 20,0> scale 1.0 translate <-2.2,0,-2.5> } object { House rotate <0, -20,0> scale 0.95 translate < 1.0,0,-2.0> } object { House2 rotate <0, 18,0> scale 1.05 translate < 3.8,0,-1.8> } object { House rotate <0, -10,0> scale 0.9 translate < 6.6,0,-2.3> } object { House rotate <0, 15,0> scale 0.9 translate <-6.6,0, 2.5> } object { House2 rotate <0, -18,0> scale 0.95 translate <-4.0,0, 2.2> } object { House rotate <0, 30,0> scale 0.85 translate <-1.5,0, 2.4> } object { House2 rotate <0, -25,0> scale 0.9 translate < 1.2,0, 2.0> } object { House rotate <0, 12,0> scale 0.85 translate < 4.1,0, 2.3> } object { House2 rotate <0, -8,0> scale 0.9 translate < 6.9,0, 2.6> } } // A few tall church-like spires to enrich skyline union { cylinder { <-8,0,-0.5>, <-8,5.8,-0.5>, 0.55 pigment { color Col_Stone } finish { MatStone } } cone { <-8,5.8,-0.5>, 0.75, <-8,8.2,-0.5>, 0 pigment { color Col_RoofTan } finish { MatRoof } } cylinder { <9,0,1.0>, <9,5.2,1.0>, 0.50 pigment { color Col_Stone2 } finish { MatStone } } cone { <9,5.2,1.0>, 0.70, <9,7.5,1.0>, 0 pigment { color Col_RoofRed } finish { MatRoof } } } // Subtle atmospheric band (distant haze plane) plane { z, 60 pigment { color rgbt <0.70, 0.82, 0.95, 0.85> } finish { diffuse 0 } }