#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.25 area_light <7,0,0>, <0,0,7>, 6, 6 adaptive 1 jitter } light_source { <-18, 18, -10> color rgb <1.00, 0.90, 0.78>*0.40 area_light <5,0,0>, <0,0,5>, 5, 5 adaptive 1 jitter } light_source { <0, 28, 22> color rgb <1.00, 0.92, 0.80>*0.22 area_light <6,0,0>, <0,0,6>, 5, 5 adaptive 1 jitter } // --- Summer sky gradient (fast) --- sky_sphere { pigment { gradient y color_map { [0.00 color rgb <0.70, 0.88, 1.00>] [0.55 color rgb <0.50, 0.78, 1.00>] [1.00 color rgb <0.25, 0.50, 0.95>] } } } // ----------------- Materials / Textures ----------------- #declare Fin_Stone = finish { diffuse 0.85 specular 0.08 roughness 0.06 }; #declare Fin_Roof = finish { diffuse 0.85 specular 0.12 roughness 0.05 }; #declare Fin_Wood = finish { diffuse 0.85 specular 0.06 roughness 0.09 }; #declare Fin_Iron = finish { diffuse 0.35 specular 0.30 roughness 0.04 }; #declare Col_StoneA = color rgb <0.78, 0.78, 0.74>; #declare Col_StoneB = color rgb <0.70, 0.70, 0.67>; #declare Col_Mortar = color rgb <0.56, 0.56, 0.54>; #declare Col_RoofA = color rgb <0.40, 0.19, 0.15>; #declare Col_RoofB = color rgb <0.30, 0.14, 0.12>; #declare Col_WoodA = color rgb <0.52, 0.34, 0.20>; #declare Col_WoodB = color rgb <0.40, 0.26, 0.16>; #declare Col_Iron = color rgb <0.18, 0.18, 0.20>; #declare Tex_StoneBrick = texture { pigment { brick color Col_StoneA color Col_StoneB brick_size <0.75, 0.35, 0.75> mortar 0.12 } normal { bumps 0.35 scale 0.12 } finish { Fin_Stone } } #declare Tex_StoneBrick_Darker = texture { pigment { brick color Col_StoneB color (Col_StoneB*0.92) brick_size <0.70, 0.33, 0.70> mortar 0.13 } normal { bumps 0.40 scale 0.12 } finish { Fin_Stone } } #declare Tex_CrenelStone = texture { pigment { brick color (Col_StoneA*0.97) color (Col_StoneB*0.98) brick_size <0.55, 0.30, 0.55> mortar 0.14 } normal { bumps 0.30 scale 0.10 } finish { Fin_Stone } } #declare Tex_Roof = texture { pigment { bozo scale 0.45 color_map { [0.00 Col_RoofB] [0.55 Col_RoofA] [1.00 Col_RoofB] } } normal { bumps 0.25 scale 0.25 } finish { Fin_Roof } } #declare Tex_Wood = texture { pigment { wood turbulence 0.08 color_map { [0.00 Col_WoodB] [0.35 Col_WoodA] [1.00 Col_WoodB] } scale 0.35 } normal { bumps 0.18 scale 0.10 } finish { Fin_Wood } } #declare Tex_Iron = texture { pigment { color Col_Iron } normal { bumps 0.20 scale 0.04 } finish { Fin_Iron } } #declare Tex_Grass = texture { pigment { bozo scale 0.75 color_map { [0.00 color rgb <0.28, 0.55, 0.26>] [0.55 color rgb <0.34, 0.62, 0.30>] [1.00 color rgb <0.22, 0.48, 0.22>] } } normal { bumps 0.20 scale 0.30 } finish { diffuse 0.9 specular 0.02 roughness 0.09 } } #declare Tex_DirtPath = texture { pigment { bozo scale 0.45 color_map{ [0.00 color rgb <0.52, 0.45, 0.32>] [0.60 color rgb <0.62, 0.54, 0.39>] [1.00 color rgb <0.46, 0.39, 0.28>] } } normal { bumps 0.25 scale 0.18 } finish { diffuse 0.9 specular 0.02 roughness 0.10 } } #declare Tex_Water = texture { pigment { color rgbt <0.18, 0.38, 0.45, 0.45> } normal { ripples 0.25 frequency 1.8 scale 0.65 } finish { diffuse 0.15 specular 0.35 roughness 0.03 reflection 0.10 } } // ----------------- Ground ----------------- plane { y, 0 texture { Tex_Grass } } // Small garden/pond patch at right (kept, but textured) difference { box { <-4, -0.001, -18>, <4, 0.03, 18> } box { <-3, -0.01, -16>, <3, 0.05, 16> } texture { pigment { bozo scale 0.65 color_map { [0.00 color rgb <0.18, 0.30, 0.18>] [0.55 color rgb <0.22, 0.35, 0.22>] [1.00 color rgb <0.16, 0.26, 0.16>] } } normal { bumps 0.20 scale 0.30 } finish { diffuse 0.85 specular 0.02 roughness 0.10 } } translate <10, 0, 0> } // ----------------- Castle geometry ----------------- #declare TowerR = 1.6; #declare TowerH = 9.5; #macro TowerAt(PX,PZ) union { cylinder { , , TowerR texture { Tex_StoneBrick_Darker } } // Tower crenellations ring difference { cylinder { , , TowerR+0.25 } cylinder { , , TowerR-0.05 } texture { Tex_CrenelStone } } // Simple conical roof cone { , TowerR+0.15, , 0.1 texture { Tex_Roof } } } #end #declare Castle = union { // Central keep (base) box { <-4, 0, -4>, <4, 8, 4> texture { Tex_StoneBrick } } // 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 texture { Tex_CrenelStone } } // 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> texture { Tex_StoneBrick_Darker } } // 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 } texture { Tex_StoneBrick_Darker } } // Wooden gate slab (inside arch) box { <-1.05, 0.05, -5.05>, <1.05, 2.7, -4.85> texture { Tex_Wood } } // Iron band box { <-1.05, 1.25, -4.86>, <1.05, 1.40, -4.82> texture { Tex_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.06,0.06,0.08> } 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> texture { Tex_StoneBrick } } box { <-7.7, -0.1, -7.7>, <7.7, 4.2, 7.7> texture { Tex_StoneBrick } } } // Outer wall crenellations 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 texture { Tex_CrenelStone } } // Dirt path leading to gate (textured) box { <-1.7, 0.001, -20>, <1.7, 0.02, -4.85> texture { Tex_DirtPath } } }; 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 } texture { Tex_Water } }