// Neat European-style castle in summer (textured, fast procedural materials) #version 3.7; global_settings { assumed_gamma 1.8 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.60, 0.83, 1.00> } // bright summer sky // --- Camera (slightly higher + wider so the whole castle reads well) --- camera { location <0, 10.5, -28.0> look_at <0, 5.5, 0.0> angle 36 } // --- Warm soft lights (area lights for soft shadows) --- light_source { <45, 60, -40> color rgb <1.00, 0.90, 0.74>*1.20 area_light <7,0,0>, <0,0,7>, 5, 5 adaptive 1 jitter } light_source { <-35, 26, -12> color rgb <1.00, 0.94, 0.86>*0.40 area_light <4,0,0>, <0,0,4>, 4, 4 adaptive 1 jitter } // --- Procedural textures (no image maps; fast) --- #declare StoneFinish = finish { diffuse 0.78 specular 0.12 roughness 0.06 }; #declare StoneTex = texture { pigment { // blocky stone feel using a crackle pattern, slightly varied color crackle color_map { [0.00 color rgb <0.62,0.62,0.59>] [0.45 color rgb <0.74,0.74,0.70>] [0.65 color rgb <0.83,0.82,0.78>] [1.00 color rgb <0.68,0.69,0.66>] } scale 1.15 } normal { // subtle chiseled roughness bumps 0.35 scale 0.22 } finish { StoneFinish } } #declare RoofTex = texture { pigment { // warm clay tiles with gentle variation granite color_map { [0.00 color rgb <0.26,0.10,0.08>] [0.40 color rgb <0.38,0.16,0.11>] [0.75 color rgb <0.52,0.24,0.16>] [1.00 color rgb <0.34,0.14,0.10>] } scale 0.55 } normal { ripples 0.22 scale 0.15 } finish { diffuse 0.78 specular 0.10 roughness 0.07 } } #declare WoodTex = texture { pigment { // simple wood grain wood color_map { [0.00 color rgb <0.22,0.13,0.07>] [0.45 color rgb <0.33,0.20,0.10>] [1.00 color rgb <0.18,0.10,0.05>] } turbulence 0.15 scale 0.38 rotate <0,90,0> } normal { bumps 0.25 scale 0.08 } finish { diffuse 0.75 specular 0.06 roughness 0.10 } } #declare DarkFloorTex = texture { pigment { // courtyard dark packed earth/stone hint bozo color_map { [0.00 color rgb <0.08,0.08,0.09>] [0.55 color rgb <0.12,0.12,0.13>] [1.00 color rgb <0.06,0.06,0.07>] } scale 0.70 } finish { diffuse 0.70 specular 0.02 roughness 0.20 } } #declare GrassTex = texture { pigment { // lively summer grass variation bozo color_map { [0.00 color rgb <0.16,0.45,0.16>] [0.45 color rgb <0.22,0.58,0.20>] [0.70 color rgb <0.30,0.66,0.24>] [1.00 color rgb <0.18,0.52,0.18>] } scale 1.8 } normal { bumps 0.40 scale 0.20 } finish { diffuse 0.88 specular 0.03 roughness 0.25 } } #declare DirtPathTex = texture { pigment { // dry summer dirt/gravel granite color_map { [0.00 color rgb <0.34,0.28,0.20>] [0.50 color rgb <0.46,0.39,0.28>] [1.00 color rgb <0.30,0.25,0.18>] } scale 0.55 } normal { bumps 0.35 scale 0.12 } finish { diffuse 0.85 specular 0.04 roughness 0.18 } } // --- Ground (grass + a simple dirt path using a blended texture) --- plane { y, 0 texture { GrassTex } } // Dirt path strip leading to gate (slightly raised to sit on grass cleanly) box { <-1.8, 0.001, -28>, <1.8, 0.012, -6.9> texture { DirtPathTex } } // Small widening near the gate box { <-3.0, 0.001, -8.2>, <3.0, 0.012, -6.7> texture { DirtPathTex } } // --- Castle dimensions (kept from previous scene for precise fit) --- #declare BaseY0 = 0.0; #declare WallH = 6.0; // --- Main castle union --- union { // --- Outer curtain wall (hollow box) --- difference { box { <-9, BaseY0, -7>, < 9, BaseY0+WallH, 7> } box { <-8, BaseY0-0.01, -6>, < 8, BaseY0+WallH-0.8, 6> } // front gate opening box { <-1.4, BaseY0, -7.2>, <1.4, BaseY0+3.2, -5.9> } texture { StoneTex } } // --- Wall crenellations --- union { #declare Step = 1.6; // front edge #declare X = -8.2; #while (X <= 8.2) box { , } #declare X = X + Step; #end // back edge #declare X2 = -8.2; #while (X2 <= 8.2) box { , } #declare X2 = X2 + Step; #end // left edge #declare Z = -5.6; #while (Z <= 5.6) box { <-9.0, BaseY0+WallH, Z>, <-8.2, BaseY0+WallH+1.0, Z+0.8> } #declare Z = Z + Step; #end // right edge #declare Z2 = -5.6; #while (Z2 <= 5.6) box { <8.2, BaseY0+WallH, Z2>, <9.0, BaseY0+WallH+1.0, Z2+0.8> } #declare Z2 = Z2 + Step; #end texture { StoneTex } } // --- Corner towers --- #declare TowerR = 2.1; #declare TowerH = 9.0; union { cylinder { <-9, BaseY0, -7>, <-9, BaseY0+TowerH, -7>, TowerR } cylinder { < 9, BaseY0, -7>, < 9, BaseY0+TowerH, -7>, TowerR } cylinder { <-9, BaseY0, 7>, <-9, BaseY0+TowerH, 7>, TowerR } cylinder { < 9, BaseY0, 7>, < 9, BaseY0+TowerH, 7>, TowerR } texture { StoneTex } } // --- Tower roofs --- union { cone { <-9, BaseY0+TowerH, -7>, TowerR+0.1, <-9, BaseY0+TowerH+2.4, -7>, 0.2 } cone { < 9, BaseY0+TowerH, -7>, TowerR+0.1, < 9, BaseY0+TowerH+2.4, -7>, 0.2 } cone { <-9, BaseY0+TowerH, 7>, TowerR+0.1, <-9, BaseY0+TowerH+2.4, 7>, 0.2 } cone { < 9, BaseY0+TowerH, 7>, TowerR+0.1, < 9, BaseY0+TowerH+2.4, 7>, 0.2 } texture { RoofTex } } // --- Central keep --- #declare KeepW = 7.0; #declare KeepD = 5.0; #declare KeepH = 10.5; difference { box { <-KeepW/2, BaseY0, -KeepD/2>, } // slit windows #declare WY0 = BaseY0+3.0; #declare WY1 = BaseY0+4.6; // front slits box { <-2.8, WY0, -KeepD/2-0.2>, <-2.4, WY1, -KeepD/2+0.4> } box { < 2.4, WY0, -KeepD/2-0.2>, < 2.8, WY1, -KeepD/2+0.4> } // side slits box { <-KeepW/2-0.2, WY0, -1.4>, <-KeepW/2+0.4, WY1, -1.0> } box { < KeepW/2-0.4, WY0, 1.0>, < KeepW/2+0.2, WY1, 1.4> } // higher slit #declare WY2 = BaseY0+6.3; #declare WY3 = BaseY0+7.9; box { <-0.2, WY2, -KeepD/2-0.2>, <0.2, WY3, -KeepD/2+0.4> } texture { StoneTex } } // Keep crenellations union { #declare S = 1.2; // front #declare KX = -KeepW/2; #while (KX <= KeepW/2-0.6) box { , } #declare KX = KX + S; #end // back #declare KX2 = -KeepW/2; #while (KX2 <= KeepW/2-0.6) box { , } #declare KX2 = KX2 + S; #end // left #declare KZ = -KeepD/2; #while (KZ <= KeepD/2-0.6) box { <-KeepW/2, BaseY0+KeepH, KZ>, <-KeepW/2+0.6, BaseY0+KeepH+1.0, KZ+0.6> } #declare KZ = KZ + S; #end // right #declare KZ2 = -KeepD/2; #while (KZ2 <= KeepD/2-0.6) box { , } #declare KZ2 = KZ2 + S; #end texture { StoneTex } } // --- Gatehouse block with wooden door inset --- union { difference { box { <-3.2, BaseY0, -8.6>, <3.2, BaseY0+5.0, -6.2> } // door recess box { <-1.2, BaseY0, -8.7>, <1.2, BaseY0+3.0, -7.6> } texture { StoneTex } } // wooden door slab box { <-1.15, BaseY0, -7.65>, <1.15, BaseY0+2.95, -7.62> texture { WoodTex } } // small gatehouse crenels #declare GX = -3.0; #while (GX <= 2.4) box { , } #declare GX = GX + 1.2; #end texture { StoneTex } } // --- Courtyard floor hint --- box { <-7.7, BaseY0+0.02, -5.7>, <7.7, BaseY0+0.04, 5.7> texture { DarkFloorTex } } // --- Simple banner on the keep (adds European-castle character) --- union { // pole cylinder { <0, BaseY0+KeepH-0.4, -KeepD/2-0.05>, <0, BaseY0+KeepH+2.0, -KeepD/2-0.05>, 0.06 texture { pigment { color rgb <0.25,0.25,0.26> } finish { diffuse 0.7 specular 0.15 roughness 0.06 } } } // cloth (thin box) box { <0.05, BaseY0+KeepH+1.1, -KeepD/2-0.04>, <1.85, BaseY0+KeepH+1.85, -KeepD/2-0.03> texture { pigment { // simple heraldic two-tone gradient x color_map { [0.00 color rgb <0.75,0.10,0.10>] [0.50 color rgb <0.75,0.10,0.10>] [0.50 color rgb <0.98,0.92,0.70>] [1.00 color rgb <0.98,0.92,0.70>] } scale 1.8 } normal { wrinkles 0.35 scale 0.20 } finish { diffuse 0.85 specular 0.08 roughness 0.10 } } } } // lift slightly above ground translate <0, 0.001, 0> } // --- Simple shrubs (procedural spheres; fast) --- #declare ShrubTex = texture { pigment { bozo color_map { [0.00 color rgb <0.08,0.25,0.08>] [0.60 color rgb <0.12,0.35,0.12>] [1.00 color rgb <0.06,0.20,0.06>] } scale 0.35 } normal { bumps 0.8 scale 0.12 } finish { diffuse 0.85 specular 0.03 roughness 0.25 } } union { sphere { <-6.8, 0.55, -10.0>, 0.65 texture { ShrubTex } } sphere { <-7.6, 0.45, -9.2>, 0.55 texture { ShrubTex } } sphere { < 6.7, 0.55, -10.3>, 0.65 texture { ShrubTex } } sphere { < 7.5, 0.45, -9.4>, 0.55 texture { ShrubTex } } } // --- Summer haze/fog (subtle) --- fog { distance 130 color rgb <0.60, 0.83, 1.00> fog_type 2 fog_offset 0.0 fog_alt 20 turbulence 0.0 }