// scene090.pov - Textured village + castle, atmospheric lighting, fixed 45° roofs (no interlap) #version 3.7; global_settings { assumed_gamma 1.0 max_trace_level 8 } #include "colors.inc" #include "textures.inc" #include "functions.inc" background { color rgb <0.70, 0.78, 0.88> } // -------------------- Camera -------------------- camera { location <22, 14, -26> look_at <0, 4.2, 0> angle 40 } // -------------------- Atmosphere -------------------- // Distance fog (bluish) + low fog band fog { distance 120 color rgb <0.70, 0.75, 0.82> fog_type 2 fog_offset 0.6 fog_alt 7 turbulence 0.55 } fog { distance 40 color rgb <0.78, 0.79, 0.82> fog_type 2 fog_offset 0.06 fog_alt 2.0 turbulence 0.9 } // Subtle haze volume (kept light for speed) #declare Use_Haze = 1; #if (Use_Haze) sphere { <0, 7, 0>, 140 hollow texture { pigment { color rgbt <1,1,1,1> } } interior { media { scattering { 1, rgb <0.62, 0.68, 0.78>*0.18 } absorption rgb <0.15, 0.17, 0.20>*0.02 density { gradient y color_map { [0.00 rgb 0.22] [0.12 rgb 0.14] [0.55 rgb 0.05] [1.00 rgb 0.00] } scale 20 translate <0,-2.0,0> } samples 6, 12 method 2 } } no_shadow } #end // -------------------- Lighting (warm + soft shadows) -------------------- light_source { <70, 60, -45> color rgb <1.00, 0.86, 0.72>*1.25 area_light <12,0,0>, <0,0,12>, 5, 5 adaptive 1 jitter circular } light_source { <-40, 30, -12> color rgb <0.80, 0.88, 1.00>*0.32 area_light <9,0,0>, <0,0,9>, 4, 4 adaptive 1 jitter } light_source { <0, 28, 10> color rgb <1.00, 0.94, 0.84>*0.18 } // A faint “sky dome” ambience without expensive radiosity sphere { <0,0,0>, 300 hollow no_shadow texture { pigment { gradient y color_map { [0.00 rgb <0.60,0.70,0.82>] [0.60 rgb <0.78,0.84,0.92>] [1.00 rgb <0.92,0.94,0.98>] } scale 2 translate <0,-1,0> } finish { emission 0.18 diffuse 0 } } } // -------------------- Materials (procedural, fast) -------------------- #declare T_Grass = texture { pigment { bozo color_map { [0.00 color rgb <0.10, 0.20, 0.10>] [0.55 color rgb <0.16, 0.30, 0.16>] [1.00 color rgb <0.08, 0.16, 0.08>] } scale 3.2 } normal { bumps 0.55 scale 0.35 } finish { diffuse 0.88 specular 0.02 roughness 0.09 } } #declare T_Plaster = texture { pigment { color rgb <0.78, 0.76, 0.70> } normal { bumps 0.22 scale 0.25 } finish { diffuse 0.92 specular 0.03 roughness 0.08 } } #declare T_Wood = texture { pigment { wood color_map { [0.00 color rgb <0.20, 0.12, 0.06>] [0.35 color rgb <0.33, 0.20, 0.10>] [1.00 color rgb <0.18, 0.10, 0.05>] } scale 0.6 rotate <0, 90, 0> } normal { bumps 0.25 scale 0.10 } finish { diffuse 0.80 specular 0.05 roughness 0.07 } } #declare T_Roof = texture { pigment { bozo color_map { [0.00 color rgb <0.18, 0.18, 0.20>] [0.60 color rgb <0.26, 0.24, 0.26>] [1.00 color rgb <0.13, 0.13, 0.15>] } scale 0.75 } normal { bumps 0.35 scale 0.14 } finish { diffuse 0.86 specular 0.05 roughness 0.10 } } // Brick with better relief + mild color variation #declare T_Brick_Base = texture { pigment { brick color rgb <0.58, 0.22, 0.16> color rgb <0.74, 0.68, 0.62> brick_size <0.38, 0.20, 0.18> mortar 0.07 scale 0.95 } normal { average normal_map { [1.0 bumps 0.50 scale 0.10] [0.6 dents 0.25 scale 0.03] } } finish { diffuse 0.85 specular 0.06 roughness 0.06 } } // Stone for castle (granite + roughness detail) #declare T_Stone_Base = texture { pigment { granite color_map { [0.00 color rgb <0.20, 0.20, 0.22>] [0.45 color rgb <0.34, 0.34, 0.36>] [0.80 color rgb <0.52, 0.52, 0.54>] [1.00 color rgb <0.64, 0.64, 0.66>] } scale 0.70 } normal { average normal_map { [1.0 bumps 0.75 scale 0.22] [0.8 bumps 0.25 scale 0.06] } } finish { diffuse 0.80 specular 0.05 roughness 0.10 } } // -------------------- Ground -------------------- plane { y, 0 texture { T_Grass } } // -------------------- House macro (fixed 45° roof, no interlap) -------------------- #macro House(Pos, RotY, W, D, H, SeedOffset) union { // Base brick walls box { <-W/2, 0, -D/2>, < W/2, H, D/2> texture { T_Brick_Base pigment { brick color rgb <0.58, 0.22, 0.16> color rgb <0.74, 0.68, 0.62> brick_size <0.38, 0.20, 0.18> mortar 0.07 scale 0.95 translate } } } // Plaster upper band (slight lift to avoid z-fight) box { <-W/2, H*0.62, -D/2>, < W/2, H, D/2> texture { T_Plaster } translate <0,0.02,0> } // Wood corner posts #local Post = 0.10; #local Inset = 0.02; box { <-W/2-Inset, 0, -D/2-Inset>, <-W/2+Post, H, -D/2+Post> texture { T_Wood } } box { < W/2-Post, 0, -D/2-Inset>, < W/2+Inset, H, -D/2+Post> texture { T_Wood } } box { <-W/2-Inset, 0, D/2-Post>, <-W/2+Post, H, D/2+Inset> texture { T_Wood } } box { < W/2-Post, 0, D/2-Post>, < W/2+Inset, H, D/2+Inset> texture { T_Wood } } // --- Roof: true 45° gable, two halves meet at ridge without overlap --- // Geometry notes: // - Ridge runs along Z (length D), centered at X=0 // - Each half spans from ridge to one eave. // - Rotate around Z-axis by +/-45° about the ridge line. #local Overhang = 0.18; #local Thk = 0.16; #local RidgeY = H + (W/4); // For 45°, rise = run = W/4 (half of half-width) #local EaveY = H + 0.02; #local HalfRun = (W/4) + Overhang; // half-roof width from ridge to eave (incl. overhang) #local HalfLen = (D/2) + Overhang; // along Z union { // Left half (covers X <= 0) box { <-HalfRun, -Thk/2, -HalfLen>, <0, Thk/2, HalfLen> texture { T_Roof } translate <0, RidgeY, 0> rotate <0,0, 45> // 45° pitch } // Right half (covers X >= 0) box { <0, -Thk/2, -HalfLen>, texture { T_Roof } translate <0, RidgeY, 0> rotate <0,0,-45> } // Small ridge cap to hide any seam (very thin, no big overlap) box { <-0.03, -0.03, -HalfLen>, <0.03, 0.03, HalfLen> texture { T_Roof } translate <0, RidgeY, 0> } } rotate <0, RotY, 0> translate Pos } #end // -------------------- Castle macro (stone) -------------------- #macro Castle(Pos) union { // Main keep box { <-5.0, 0, -4.0>, <5.0, 7.0, 4.0> texture { T_Stone_Base } } // Battlements on keep #local i = -4; #while (i <= 4) box { , texture { T_Stone_Base } } box { , texture { T_Stone_Base } } #local i = i + 1; #end #local k = -3; #while (k <= 3) box { <-5.2, 7.0, k-0.35>, <-4.6, 7.8, k+0.35> texture { T_Stone_Base } } box { < 4.6, 7.0, k-0.35>, < 5.2, 7.8, k+0.35> texture { T_Stone_Base } } #local k = k + 1; #end // Corner towers + battlements #local TowerR = 1.35; #local TowerH = 9.0; union { cylinder { < -5.0, 0, -4.0>, < -5.0, TowerH, -4.0>, TowerR texture { T_Stone_Base } } cylinder { < 5.0, 0, -4.0>, < 5.0, TowerH, -4.0>, TowerR texture { T_Stone_Base } } cylinder { < -5.0, 0, 4.0>, < -5.0, TowerH, 4.0>, TowerR texture { T_Stone_Base } } cylinder { < 5.0, 0, 4.0>, < 5.0, TowerH, 4.0>, TowerR texture { T_Stone_Base } } #local a = 0; #while (a < 12) #local ang = a*30; box { <-0.22, TowerH, TowerR-0.15>, <0.22, TowerH+0.85, TowerR+0.35> texture { T_Stone_Base } rotate <0, ang, 0> translate <-5.0, 0, -4.0> } box { <-0.22, TowerH, TowerR-0.15>, <0.22, TowerH+0.85, TowerR+0.35> texture { T_Stone_Base } rotate <0, ang, 0> translate <5.0, 0, -4.0> } box { <-0.22, TowerH, TowerR-0.15>, <0.22, TowerH+0.85, TowerR+0.35> texture { T_Stone_Base } rotate <0, ang, 0> translate <-5.0, 0, 4.0> } box { <-0.22, TowerH, TowerR-0.15>, <0.22, TowerH+0.85, TowerR+0.35> texture { T_Stone_Base } rotate <0, ang, 0> translate <5.0, 0, 4.0> } #local a = a + 1; #end } // Gatehouse box { <-1.6, 0, -6.0>, <1.6, 6.2, -4.0> texture { T_Stone_Base } } difference { box { <-0.9, 0, -6.02>, <0.9, 3.1, -3.95> } cylinder { <0, 3.1, -6.1>, <0, 3.1, -3.9>, 0.9 rotate <90,0,0> } texture { T_Stone_Base } } // Subtle stone variation across the whole castle texture { pigment { granite color_map { [0 rgb 0.95] [1 rgb 1.05] } scale 1.8 } finish { diffuse 0.0 } } translate Pos } #end // -------------------- Place village houses (brick) -------------------- House(<-12, 0, 6>, 18, 5.0, 4.2, 3.4, 0.15) House(<-15, 0, -3>, -12, 4.6, 3.8, 3.2, 0.65) House(< -8, 0, -8>, 25, 5.4, 4.2, 3.6, 1.10) House(< 8, 0, 8>, -20, 5.2, 4.0, 3.5, 1.55) House(< 12, 0, -2>, 10, 4.8, 3.7, 3.2, 2.05) // -------------------- Place castle (stone) -------------------- Castle(<0, 0, 0>) // -------------------- Subtle path -------------------- box { <-18, 0.001, -1.2>, <18, 0.02, 1.2> texture { pigment { bozo color_map { [0.00 color rgb <0.28, 0.24, 0.20>] [0.70 color rgb <0.38, 0.34, 0.30>] [1.00 color rgb <0.24, 0.21, 0.18>] } scale 1.35 } normal { bumps 0.28 scale 0.25 } finish { diffuse 0.86 specular 0.02 roughness 0.09 } } translate <0,0, -2.0> }