// Textured village + castle scene (fast iteration, atmospheric warm lighting) - corrected (no mist{}) #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 (supported in POV-Ray 3.7) --- // General distance fog + ground-hugging fog layer for mood fog { distance 120 color rgb <0.70, 0.75, 0.82> fog_type 2 fog_offset 0.5 fog_alt 6 turbulence 0.6 } fog { distance 38 color rgb <0.76, 0.78, 0.82> fog_type 2 fog_offset 0.05 fog_alt 1.8 turbulence 0.9 } // Very subtle global haze using a thin scattering media (kept light for speed) #declare Use_Haze = 1; #if (Use_Haze) sphere { <0, 6, 0>, 120 hollow texture { pigment { color rgbt <1,1,1,1> } } interior { media { scattering { 1, rgb <0.60, 0.67, 0.78>*0.20 } absorption rgb <0.15, 0.17, 0.20>*0.02 density { gradient y color_map { [0.00 rgb 0.25] [0.15 rgb 0.15] [0.55 rgb 0.05] [1.00 rgb 0.00] } scale 18 translate <0,-1.5,0> } samples 6, 12 method 2 } } no_shadow } #end // --- Warm, soft lighting --- light_source { <60, 55, -40> color rgb <1.00, 0.86, 0.72>*1.10 area_light <10,0,0>, <0,0,10>, 5, 5 adaptive 1 jitter circular } light_source { <-35, 28, -12> color rgb <0.85, 0.88, 1.00>*0.35 area_light <7,0,0>, <0,0,7>, 4, 4 adaptive 1 jitter } light_source { <0, 22, 0> color rgb <1.00, 0.93, 0.82>*0.20 } // --- Materials (procedural, fast) --- #declare T_Grass = texture { pigment { bozo color_map { [0.00 color rgb <0.12, 0.22, 0.12>] [0.55 color rgb <0.18, 0.30, 0.16>] [1.00 color rgb <0.10, 0.18, 0.10>] } scale 3.0 } normal { bumps 0.5 scale 0.35 } finish { diffuse 0.85 specular 0.02 roughness 0.08 } } #declare T_Brick = texture { pigment { brick color rgb <0.56, 0.20, 0.15> // brick color rgb <0.72, 0.66, 0.60> // mortar brick_size <0.38, 0.20, 0.18> mortar 0.065 scale 0.95 // subtle per-building variation happens via translate/rotate at object-level } normal { // slightly stronger relief for bricks bumps 0.35 scale 0.10 } finish { diffuse 0.85 specular 0.06 roughness 0.06 } } #declare T_Stone = texture { pigment { granite color_map { [0.00 color rgb <0.22, 0.22, 0.24>] [0.45 color rgb <0.36, 0.36, 0.38>] [0.80 color rgb <0.52, 0.52, 0.54>] [1.00 color rgb <0.62, 0.62, 0.63>] } scale 0.65 } normal { // composite-ish feel: larger bumps + small detail average normal_map { [1.0 bumps 0.65 scale 0.22] [0.7 bumps 0.30 scale 0.06] } } finish { diffuse 0.80 specular 0.05 roughness 0.09 } } #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_Plaster = texture { pigment { color rgb <0.78, 0.76, 0.70> } normal { bumps 0.20 scale 0.25 } finish { diffuse 0.90 specular 0.03 roughness 0.08 } } #declare T_Roof = texture { pigment { bozo color_map { [0.00 color rgb <0.16, 0.16, 0.18>] [0.60 color rgb <0.22, 0.20, 0.22>] [1.00 color rgb <0.12, 0.12, 0.14>] } scale 0.7 } normal { bumps 0.30 scale 0.14 } finish { diffuse 0.85 specular 0.04 roughness 0.09 } } // --- Ground --- plane { y, 0 texture { T_Grass } } // --- Simple modular house macro --- #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 // per-house slight variation so bricks don't look cloned pigment { brick color rgb <0.56, 0.20, 0.15> color rgb <0.72, 0.66, 0.60> brick_size <0.38, 0.20, 0.18> mortar 0.065 scale 0.95 translate } } } // Plaster upper band box { <-W/2, H*0.62, -D/2>, < W/2, H, D/2> texture { T_Plaster } translate <0,0.02,0> // avoid z-fighting with brick } // 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 (simple gable via two slabs) union { box { <-W/2-0.15, 0, -D/2-0.15>, < W/2+0.15, 0.18, D/2+0.15> texture { T_Roof } rotate <0,0,35> translate <0, H+0.55, 0> } box { <-W/2-0.15, 0, -D/2-0.15>, < W/2+0.15, 0.18, D/2+0.15> texture { T_Roof } rotate <0,0,-35> translate <0, H+0.55, 0> } } rotate <0, RotY, 0> translate Pos } #end // --- Castle macro --- #macro Castle(Pos) union { // Main keep box { <-5.0, 0, -4.0>, <5.0, 7.0, 4.0> texture { T_Stone } } // Battlements on keep #local i = -4; #while (i <= 4) box { , texture { T_Stone } } box { , texture { T_Stone } } #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 } } box { < 4.6, 7.0, k-0.35>, < 5.2, 7.8, k+0.35> texture { T_Stone } } #local k = k + 1; #end // Corner towers (cylinders) + battlements #local TowerR = 1.35; #local TowerH = 9.0; #declare TowerTex = texture { T_Stone }; union { cylinder { < -5.0, 0, -4.0>, < -5.0, TowerH, -4.0>, TowerR texture { TowerTex } } cylinder { < 5.0, 0, -4.0>, < 5.0, TowerH, -4.0>, TowerR texture { TowerTex } } cylinder { < -5.0, 0, 4.0>, < -5.0, TowerH, 4.0>, TowerR texture { TowerTex } } cylinder { < 5.0, 0, 4.0>, < 5.0, TowerH, 4.0>, TowerR texture { TowerTex } } #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 { TowerTex } 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 { TowerTex } 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 { TowerTex } 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 { TowerTex } rotate <0, ang, 0> translate <5.0, 0, 4.0> } #local a = a + 1; #end } // Simple gatehouse front box { <-1.6, 0, -6.0>, <1.6, 6.2, -4.0> texture { T_Stone } } 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 } } 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 (fast) --- box { <-18, 0.001, -1.2>, <18, 0.02, 1.2> texture { pigment { bozo color_map { [0.00 color rgb <0.30, 0.26, 0.22>] [0.70 color rgb <0.36, 0.32, 0.28>] [1.00 color rgb <0.25, 0.22, 0.19>] } scale 1.4 } normal { bumps 0.25 scale 0.25 } finish { diffuse 0.85 specular 0.02 roughness 0.08 } } translate <0,0, -2.0> }