// Castle in Winter - fast iteration scene (fixed materials) #version 3.7; global_settings { assumed_gamma 1.0 max_trace_level 8 } background { color rgb <0.03, 0.04, 0.07> } // ---------- Camera ---------- camera { location <0, 9, -26> look_at <0, 5, 0> angle 40 } // ---------- Lights (warm, dim, soft shadows) ---------- light_source { <80, 120, -120> color rgb <0.35, 0.33, 0.30> // soft moon fill area_light <18,0,0>, <0,0,18>, 6, 6 adaptive 1 jitter } light_source { <0, 10, -10> color rgb <0.55, 0.42, 0.28> // warm ambient lantern-ish area_light <6,0,0>, <0,6,0>, 5, 5 adaptive 1 jitter } // ---------- Subtle fog for winter air ---------- fog { fog_type 2 distance 55 color rgb <0.05, 0.06, 0.08> fog_offset 0 fog_alt 1.8 turbulence 0.25 } // ---------- Simple materials (FIXED: declare textures, not loose pigment/finish) ---------- #declare TEX_SNOW = texture { pigment { color rgb <0.92, 0.93, 0.96> } finish { diffuse 0.85 specular 0.05 roughness 0.08 ambient 0.0 } }; #declare TEX_STONE = texture { pigment { color rgb <0.45, 0.46, 0.50> } finish { diffuse 0.90 specular 0.05 roughness 0.10 ambient 0.0 } }; #declare TEX_DARK = texture { pigment { color rgb <0.20, 0.20, 0.22> } finish { diffuse 0.90 specular 0.03 roughness 0.15 ambient 0.0 } }; #declare TEX_WARM_WINDOW = texture { pigment { color rgb <1.00, 0.68, 0.28> } finish { emission 0.8 diffuse 0 ambient 0 } }; // ---------- Ground ---------- plane { y, 0 texture { TEX_SNOW } } // Gentle snow mounds (fast blobs) blob { threshold 0.6 sphere { <-10, 0.5, 4>, 3, 1.0 } sphere { < -3, 0.4, 8>, 2.6, 1.0 } sphere { < 6, 0.5, 6>, 3.2, 1.0 } sphere { < 12, 0.4, 2>, 2.8, 1.0 } sphere { < 0, 0.35, -2>, 2.4, 1.0 } texture { TEX_SNOW } } // ---------- Castle dimensions ---------- #declare Base_Min = <-8, 0, -2>; #declare Base_Max = < 8, 7, 10>; #declare Tower_R = 2.4; #declare Tower_H = 10.5; // Helper: battlement blocks along a wall edge #macro Battlements_X(Zpos, Ybase, Xmin, Xmax, Step, BlockW, BlockH, BlockD) #local X = Xmin; #while (X <= Xmax) box { , texture { TEX_STONE } } #local X = X + Step; #end #end #macro Battlements_Z(Xpos, Ybase, Zmin, Zmax, Step, BlockD, BlockH, BlockW) #local Z = Zmin; #while (Z <= Zmax) box { , texture { TEX_STONE } } #local Z = Z + Step; #end #end // ---------- Castle main mass ---------- union { // Base keep box { Base_Min, Base_Max texture { TEX_STONE } } // Hollowed gate opening (subtracted using difference) difference { box { <-2.2, 0, -2.01>, < 2.2, 4.2, -0.6> } // front block to carve box { <-1.3, 0.0, -2.2>, < 1.3, 3.2, -0.55> } // gate void texture { TEX_STONE } } // Front platform/bridge (aligned to gate) box { <-2.0, 0.0, -6.0>, <2.0, 0.25, -2.0> texture { TEX_DARK } } // Four corner towers (precisely aligned with base corners) // Base corners: (-8,-2), (8,-2), (-8,10), (8,10) in XZ cylinder { <-8, 0, -2>, <-8, Tower_H, -2>, Tower_R texture { TEX_STONE } } cylinder { < 8, 0, -2>, < 8, Tower_H, -2>, Tower_R texture { TEX_STONE } } cylinder { <-8, 0, 10>, <-8, Tower_H, 10>, Tower_R texture { TEX_STONE } } cylinder { < 8, 0, 10>, < 8, Tower_H, 10>, Tower_R texture { TEX_STONE } } // Tower caps (simple cones) cone { <-8, Tower_H, -2>, Tower_R+0.2, <-8, Tower_H+2.8, -2>, 0.2 texture { TEX_DARK } } cone { < 8, Tower_H, -2>, Tower_R+0.2, < 8, Tower_H+2.8, -2>, 0.2 texture { TEX_DARK } } cone { <-8, Tower_H, 10>, Tower_R+0.2, <-8, Tower_H+2.8, 10>, 0.2 texture { TEX_DARK } } cone { < 8, Tower_H, 10>, Tower_R+0.2, < 8, Tower_H+2.8, 10>, 0.2 texture { TEX_DARK } } // Battlements on top of keep (y = 7) // Along front/back edges Battlements_X(-2.0, 7.0, -7.5, 6.8, 1.2, 0.6, 0.9, 0.8) Battlements_X(10.0, 7.0, -7.5, 6.8, 1.2, 0.6, 0.9, 0.8) // Along left/right edges Battlements_Z(-8.0, 7.0, -1.5, 9.0, 1.2, 0.6, 0.9, 0.8) Battlements_Z( 8.0, 7.0, -1.5, 9.0, 1.2, 0.6, 0.9, 0.8) } // end castle union // ---------- Warm windows (emissive rectangles) ---------- union { // Front windows box { <-5.6, 3.0, -2.02>, <-4.6, 4.2, -1.98> texture { TEX_WARM_WINDOW } } box { < 4.6, 3.0, -2.02>, < 5.6, 4.2, -1.98> texture { TEX_WARM_WINDOW } } // Side windows box { <-8.02, 3.2, 2.0>, <-7.98, 4.4, 3.2> texture { TEX_WARM_WINDOW } } box { < 7.98, 3.2, 4.8>, < 8.02, 4.4, 6.0> texture { TEX_WARM_WINDOW } } // Rear windows box { <-1.0, 3.3, 9.98>, < 1.0, 4.6, 10.02> texture { TEX_WARM_WINDOW } } } // Extra small warm light sources near windows (dim, soft) light_source { <0, 4.0, 2.0> color rgb <0.9, 0.55, 0.25>*0.6 area_light <2,0,0>, <0,2,0>, 4, 4 adaptive 1 jitter fade_distance 12 fade_power 2 } light_source { <-6, 4.0, -1.0> color rgb <0.9, 0.55, 0.25>*0.35 fade_distance 10 fade_power 2 } // ---------- Snow accents on ledges ---------- box { <-8.4, 6.95, -2.4>, < 8.4, 7.2, -1.6> texture { TEX_SNOW } } // front parapet snow strip box { <-8.4, 6.95, 9.6>, < 8.4, 7.2, 10.4> texture { TEX_SNOW } } // rear parapet snow strip // Tower ring snow torus { Tower_R+0.05, 0.18 rotate <90,0,0> translate <-8, Tower_H-0.25, -2> texture { TEX_SNOW } } torus { Tower_R+0.05, 0.18 rotate <90,0,0> translate < 8, Tower_H-0.25, -2> texture { TEX_SNOW } } torus { Tower_R+0.05, 0.18 rotate <90,0,0> translate <-8, Tower_H-0.25, 10> texture { TEX_SNOW } } torus { Tower_R+0.05, 0.18 rotate <90,0,0> translate < 8, Tower_H-0.25, 10> texture { TEX_SNOW } } // ---------- Light snowfall (sparse, fast) ---------- #declare SnowCount = 140; #declare I = 0; #declare Sx = seed(1234); #declare Sy = seed(5678); #declare Sz = seed(9101); #while (I < SnowCount) sphere { < (rand(Sx)*50 - 25), (rand(Sy)*18 + 4), (rand(Sz)*50 - 20) >, 0.06 pigment { color rgb <0.95, 0.96, 0.98> } finish { diffuse 0.2 ambient 0.8 } } #declare I = I + 1; #end