#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.62, 0.82, 1.00> } camera { location <20, 12, -22> look_at <0, 5, 0> angle 40 up <0,9,0> right <16,0,0> // right,up -> 16:9 } light_source { <35, 40, -30> color rgb <1.00, 0.88, 0.72>*1.2 area_light <6,0,0>, <0,0,6>, 6, 6 adaptive 1 jitter } light_source { <-18, 18, -10> color rgb <1.00, 0.90, 0.78>*0.45 area_light <4,0,0>, <0,0,4>, 5, 5 adaptive 1 jitter } light_source { <0, 25, 20> color rgb <1.00, 0.92, 0.80>*0.25 area_light <5,0,0>, <0,0,5>, 5, 5 adaptive 1 jitter } // Materials (simple shading, no textures) #declare Mat_Stone = finish { diffuse 0.85 specular 0.08 roughness 0.06 }; #declare Mat_Roof = finish { diffuse 0.85 specular 0.10 roughness 0.05 }; #declare Mat_Wood = finish { diffuse 0.85 specular 0.05 roughness 0.08 }; #declare Mat_Iron = finish { diffuse 0.40 specular 0.25 roughness 0.04 }; #declare Col_Stone = color rgb <0.78, 0.78, 0.74>; #declare Col_Stone2 = color rgb <0.72, 0.72, 0.69>; #declare Col_Roof = color rgb <0.35, 0.18, 0.15>; #declare Col_Wood = color rgb <0.46, 0.30, 0.18>; #declare Col_Iron = color rgb <0.22, 0.22, 0.24>; // Ground (summer grass) plane { y, 0 pigment { color rgb <0.35, 0.62, 0.32> } finish { diffuse 0.9 specular 0.02 roughness 0.08 } } // Small garden/pond patch at right difference { box { <-4, -0.001, -18>, <4, 0.03, 18> } box { <-3, -0.01, -16>, <3, 0.05, 16> } pigment { color rgb <0.22, 0.35, 0.24> } finish { diffuse 0.85 specular 0.02 roughness 0.08 } translate <10, 0, 0> } #declare TowerR = 1.6; #declare TowerH = 9.5; #macro TowerAt(PX,PZ) union { cylinder { , , TowerR pigment { Col_Stone2 } finish { Mat_Stone } } // Tower crenellations ring difference { cylinder { , , TowerR+0.25 } cylinder { , , TowerR-0.05 } pigment { Col_Stone } finish { Mat_Stone } } // Simple conical roof cone { , TowerR+0.15, , 0.1 pigment { Col_Roof } finish { Mat_Roof } } } #end #declare Castle = union { // Central keep (base) box { <-4, 0, -4>, <4, 8, 4> pigment { Col_Stone } finish { Mat_Stone } } // Keep crenellations union { #local i = -3.5; #while (i <= 3.5) box { , } box { , } box { <-4.3, 8, i>, <-3.7, 8.8, i+0.6> } box { < 3.7, 8, i>, < 4.3, 8.8, i+0.6> } #local i = i + 1.0; #end pigment { Col_Stone2 } finish { Mat_Stone } } // Corner towers TowerAt(-4, -4) TowerAt( 4, -4) TowerAt(-4, 4) TowerAt( 4, 4) // Gatehouse protrusion box { <-2.2, 0, -6.2>, <2.2, 6.0, -4.0> pigment { Col_Stone2 } finish { Mat_Stone } } // Gate arch cutout surround difference { box { <-1.2, 0.0, -6.21>, <1.2, 3.2, -3.95> } cylinder { <0, 3.2, -6.30>, <0, 3.2, -3.80>, 1.2 } pigment { Col_Stone2 } finish { Mat_Stone } } // Wooden gate slab (inside arch) box { <-1.05, 0.05, -5.05>, <1.05, 2.7, -4.85> pigment { Col_Wood } finish { Mat_Wood } } // Iron band box { <-1.05, 1.25, -4.86>, <1.05, 1.40, -4.82> pigment { Col_Iron } finish { Mat_Iron } } // Simple slit windows on keep (front) #declare SlitW = 0.25; #declare SlitH = 1.2; #declare SlitD = 0.3; union { #local sx = -2.5; #while (sx <= 2.5) box { , pigment { color rgb <0.08,0.08,0.10> } finish { diffuse 0.2 specular 0 } } #local sx = sx + 1.25; #end } // Courtyard wall (low outer wall) difference { box { <-9, 0, -9>, <9, 4.0, 9> pigment { Col_Stone } finish { Mat_Stone } } box { <-7.7, -0.1, -7.7>, <7.7, 4.2, 7.7> pigment { Col_Stone } finish { Mat_Stone } } } // Outer wall crenellations (FIX: don't use 't' as an identifier) union { #local tt = -8.5; #while (tt <= 8.5) box { , } box { , } box { <-9.3, 4.0, tt>, <-8.7, 4.8, tt+0.7> } box { < 8.7, 4.0, tt>, < 9.3, 4.8, tt+0.7> } #local tt = tt + 1.4; #end pigment { Col_Stone2 } finish { Mat_Stone } } // Simple dirt path leading to gate box { <-1.7, 0.001, -20>, <1.7, 0.02, -4.85> pigment { color rgb <0.62, 0.55, 0.40> } finish { diffuse 0.9 specular 0.02 roughness 0.08 } } }; object { Castle translate <0,0,0> } // Slight moat hint (shallow water ring outside wall) difference { cylinder { <0, 0.02, 0>, <0, 0.08, 0>, 13.0 } cylinder { <0, 0.01, 0>, <0, 0.10, 0>, 10.5 } pigment { color rgb <0.18, 0.38, 0.45> } finish { diffuse 0.4 specular 0.10 roughness 0.03 } }