// Textured European-style summer castle (fast iteration scene) #version 3.7; global_settings { assumed_gamma 1.0 max_trace_level 8 } background { color rgb <0.62, 0.84, 1.00> } // ---------------- Camera ---------------- camera { location <0, 10.8, -26> look_at <0, 6.2, 1.0> angle 36 } // ---------------- Lights (warm + soft) ---------------- light_source { <55, 70, -45> color rgb <1.00, 0.92, 0.78>*1.20 area_light <7,0,0>, <0,0,7>, 4, 4 adaptive 1 jitter } light_source { <-35, 30, -10> color rgb <0.85, 0.92, 1.00>*0.40 area_light <5,0,0>, <0,0,5>, 3, 3 adaptive 1 jitter } // ---------------- Sky gradient (cheap) ---------------- plane { y, 1 pigment { gradient y color_map { [0.00 color rgb <0.62, 0.84, 1.00>] [0.55 color rgb <0.80, 0.93, 1.00>] [1.00 color rgb <0.98, 0.99, 1.00>] } scale 140 translate -70 } finish { ambient 1 diffuse 0 } hollow } // ---------------- Fast distant hills for summer depth ---------------- sphere { <0, -120, 220>, 170 pigment { color rgb <0.72, 0.82, 0.74> } finish { diffuse 0.35 ambient 0 } } sphere { <-160, -135, 250>, 190 pigment { color rgb <0.70, 0.80, 0.72> } finish { diffuse 0.32 ambient 0 } } sphere { <170, -140, 260>, 200 pigment { color rgb <0.68, 0.78, 0.70> } finish { diffuse 0.30 ambient 0 } } // ---------------- Materials ---------------- #declare MortarCol = <0.86, 0.84, 0.80>; #declare StoneACol = <0.78, 0.76, 0.72>; #declare StoneBCol = <0.70, 0.68, 0.64>; #declare StoneBlocksPig = pigment { // "blocky" cut-stone look using a crackle pattern (mortar lines) crackle color_map { [0.00 color rgb StoneACol] [0.62 color rgb StoneACol] [0.78 color rgb StoneBCol] [0.92 color rgb MortarCol] [1.00 color rgb MortarCol] } scale <1.20, 0.55, 1.10> // rectangular block proportions warp { turbulence 0.20 } }; #declare StoneAgingPig = pigment { // subtle soot/moss variation bozo color_map { [0.00 color rgb <0.95,0.98,0.95>] [0.55 color rgb <0.88,0.92,0.88>] [1.00 color rgb <0.72,0.80,0.72>] } scale 6 }; #declare StoneTex = texture { pigment { average pigment_map { [0.70 StoneBlocksPig] [0.30 StoneAgingPig] } } normal { average normal_map { [0.70 crackle 0.65 scale <1.20,0.55,1.10>] [0.30 bumps 0.25 scale 0.25] } } finish { diffuse 0.88 specular 0.10 roughness 0.06 } } #declare StoneTrimTex = texture { pigment { crackle color_map { [0.00 color rgb <0.82,0.80,0.76>] [0.80 color rgb <0.74,0.72,0.68>] [0.95 color rgb <0.90,0.88,0.84>] [1.00 color rgb <0.90,0.88,0.84>] } scale <0.85,0.42,0.85> } normal { crackle 0.55 scale <0.85,0.42,0.85> } finish { diffuse 0.88 specular 0.10 roughness 0.06 } } #declare RoofShingleTex = texture { pigment { // simple shingle rows by y-gradient modulation + noise gradient y color_map { [0.00 color rgb <0.40, 0.28, 0.22>] [0.50 color rgb <0.33, 0.23, 0.18>] [1.00 color rgb <0.42, 0.30, 0.24>] } scale 0.22 } pigment { bozo color_map { [0.00 color rgbt <1,1,1,0.65>] [1.00 color rgbt <1,1,1,0.85>] } scale 0.65 } normal { bumps 0.35 scale 0.18 } finish { diffuse 0.85 specular 0.14 roughness 0.07 } } #declare DarkWoodTex = texture { pigment { wood color_map { [0.00 color rgb <0.20, 0.13, 0.08>] [0.55 color rgb <0.28, 0.18, 0.11>] [1.00 color rgb <0.16, 0.10, 0.06>] } scale <0.25, 0.25, 1.80> rotate <0,90,0> } normal { bumps 0.25 scale 0.10 } finish { diffuse 0.85 specular 0.08 roughness 0.10 } } #declare IronTex = texture { pigment { color rgb <0.12,0.12,0.13> } finish { diffuse 0.65 specular 0.25 roughness 0.05 } } #declare GrassTex = texture { pigment { bozo color_map { [0.00 color rgb <0.22, 0.55, 0.22>] [0.55 color rgb <0.30, 0.64, 0.25>] [1.00 color rgb <0.16, 0.44, 0.18>] } scale 2.2 } normal { bumps 0.40 scale 0.35 } finish { diffuse 0.95 specular 0.03 roughness 0.20 } } #declare CourtyardGravelTex = texture { pigment { granite color_map { [0.00 color rgb <0.72, 0.70, 0.66>] [0.55 color rgb <0.62, 0.60, 0.56>] [1.00 color rgb <0.78, 0.76, 0.72>] } scale 0.55 } normal { bumps 0.30 scale 0.20 } finish { diffuse 0.85 specular 0.06 roughness 0.10 } } #declare PathStoneTex = texture { pigment { crackle color_map { [0.00 color rgb <0.74,0.72,0.68>] [0.82 color rgb <0.66,0.64,0.60>] [0.94 color rgb <0.86,0.84,0.80>] [1.00 color rgb <0.86,0.84,0.80>] } scale <0.90,0.40,0.90> } normal { crackle 0.60 scale <0.90,0.40,0.90> } finish { diffuse 0.88 specular 0.08 roughness 0.08 } } // ---------------- Ground / hill ---------------- plane { y, 0 texture { GrassTex } } sphere { <0, -2.3, 0>, 10.8 texture { GrassTex } } // Path / apron near entrance (extends a bit outward) box { <-5.2, 0.001, -15.0>, <5.2, 0.05, -3.2> texture { PathStoneTex } } // ---------------- Crenellation macros ---------------- #macro CrenelsX(X1, X2, Y1, Y2, Z1, Z2, Count, GapFrac) #local L = (X2 - X1); #local Step = L/Count; #local W = Step*(1.0 - GapFrac); #local i = 0; union { #while (i < Count) box { , } #local i = i + 1; #end } #end #macro CrenelsZ(Z1, Z2, Y1, Y2, X1, X2, Count, GapFrac) #local L = (Z2 - Z1); #local Step = L/Count; #local W = Step*(1.0 - GapFrac); #local i = 0; union { #while (i < Count) box { , } #local i = i + 1; #end } #end // ---------------- Castle dimensions ---------------- #declare WallTh = 0.8; #declare KeepX1 = -4.0; #declare KeepX2 = 4.0; #declare KeepZ1 = -2.0; #declare KeepZ2 = 6.0; #declare KeepH = 9.0; #declare TowerR = 2.0; #declare TowerH = 10.0; #declare CourtyardX1 = -10.0; #declare CourtyardX2 = 10.0; #declare CourtyardZ1 = -10.0; #declare CourtyardZ2 = 12.0; #declare WallH = 6.0; #declare TX1 = CourtyardX1; #declare TX2 = CourtyardX2; #declare TZ1 = CourtyardZ1; #declare TZ2 = CourtyardZ2; #declare TowerC1 = ; #declare TowerC2 = ; #declare TowerC3 = ; #declare TowerC4 = ; // ---------------- Castle ---------------- union { // Main keep box { , texture { StoneTex } } // Keep trim band box { , texture { StoneTrimTex } } // Keep roof (hip/pyramid) cone { <0, KeepH, 2.0>, 5.8, <0, KeepH+3.1, 2.0>, 0.0 texture { RoofShingleTex } } // Keep crenellations union { object { CrenelsX(KeepX1, KeepX2, KeepH, KeepH+0.8, KeepZ1-0.001, KeepZ1+0.65, 10, 0.35) } object { CrenelsX(KeepX1, KeepX2, KeepH, KeepH+0.8, KeepZ2-0.65, KeepZ2+0.001, 10, 0.35) } object { CrenelsZ(KeepZ1, KeepZ2, KeepH, KeepH+0.8, KeepX1-0.001, KeepX1+0.65, 10, 0.35) } object { CrenelsZ(KeepZ1, KeepZ2, KeepH, KeepH+0.8, KeepX2-0.65, KeepX2+0.001, 10, 0.35) } texture { StoneTex } } // Corner towers cylinder { TowerC1, TowerC1 + <0, TowerH, 0>, TowerR texture { StoneTex } } cylinder { TowerC2, TowerC2 + <0, TowerH, 0>, TowerR texture { StoneTex } } cylinder { TowerC3, TowerC3 + <0, TowerH, 0>, TowerR texture { StoneTex } } cylinder { TowerC4, TowerC4 + <0, TowerH, 0>, TowerR texture { StoneTex } } // Tower accent bands torus { TowerR+0.02, 0.10 rotate <90,0,0> translate TowerC1 + <0, TowerH-1.6, 0> texture { StoneTrimTex } } torus { TowerR+0.02, 0.10 rotate <90,0,0> translate TowerC2 + <0, TowerH-1.6, 0> texture { StoneTrimTex } } torus { TowerR+0.02, 0.10 rotate <90,0,0> translate TowerC3 + <0, TowerH-1.6, 0> texture { StoneTrimTex } } torus { TowerR+0.02, 0.10 rotate <90,0,0> translate TowerC4 + <0, TowerH-1.6, 0> texture { StoneTrimTex } } // Tower roofs (conical shingles) cone { TowerC1 + <0, TowerH, 0>, TowerR+0.2, TowerC1 + <0, TowerH+3.0, 0>, 0 texture { RoofShingleTex } } cone { TowerC2 + <0, TowerH, 0>, TowerR+0.2, TowerC2 + <0, TowerH+3.0, 0>, 0 texture { RoofShingleTex } } cone { TowerC3 + <0, TowerH, 0>, TowerR+0.2, TowerC3 + <0, TowerH+3.0, 0>, 0 texture { RoofShingleTex } } cone { TowerC4 + <0, TowerH, 0>, TowerR+0.2, TowerC4 + <0, TowerH+3.0, 0>, 0 texture { RoofShingleTex } } // Curtain walls (precisely fit) box { , texture { StoneTex } } // North box { , texture { StoneTex } } // South box { , texture { StoneTex } } // West box { , texture { StoneTex } } // East // Wall crenellations union { object { CrenelsX(TX1+TowerR, TX2-TowerR, WallH, WallH+0.7, TZ1-0.001, TZ1+0.60, 16, 0.40) } object { CrenelsX(TX1+TowerR, TX2-TowerR, WallH, WallH+0.7, TZ2-0.60, TZ2+0.001, 16, 0.40) } object { CrenelsZ(TZ1+TowerR, TZ2-TowerR, WallH, WallH+0.7, TX1-0.001, TX1+0.60, 16, 0.40) } object { CrenelsZ(TZ1+TowerR, TZ2-TowerR, WallH, WallH+0.7, TX2-0.60, TX2+0.001, 16, 0.40) } texture { StoneTex } } // Gatehouse opening on north wall (toward camera) #declare GateW = 5.0; #declare GateD = 2.5; #declare GateH = 7.0; difference { box { <-GateW/2, 0, TZ1-GateD>, } union { box { <-1.4, 0, TZ1-GateD-0.01>, <1.4, 3.4, TZ1+WallTh/2+0.02> } cylinder { <0, 3.4, TZ1-GateD-0.01>, <0, 3.4, TZ1+WallTh/2+0.02>, 1.4 rotate <0,0,90> } } texture { StoneTex } } // Wooden door + iron straps box { <-1.28, 0.0, TZ1-GateD+0.12>, <1.28, 3.25, TZ1-GateD+0.24> texture { DarkWoodTex } } box { <-1.25, 1.05, TZ1-GateD+0.241>, <1.25, 1.18, TZ1-GateD+0.255> texture { IronTex } } box { <-1.25, 2.20, TZ1-GateD+0.241>, <1.25, 2.33, TZ1-GateD+0.255> texture { IronTex } } // Simple windows on keep (dark recesses) #declare WinTex = texture { pigment { color rgb <0.05,0.06,0.07> } finish { diffuse 0.2 specular 0.05 } } box { <-3.0, 4.4, KeepZ1-0.01>, <-2.3, 5.6, KeepZ1+0.45> texture { WinTex } } box { < 2.3, 4.4, KeepZ1-0.01>, < 3.0, 5.6, KeepZ1+0.45> texture { WinTex } } box { <-0.35, 5.0, KeepZ1-0.01>, <0.35, 6.2, KeepZ1+0.45> texture { WinTex } } // Flag union { cylinder { <0, KeepH+0.6, 2.0>, <0, KeepH+4.6, 2.0>, 0.06 texture { DarkWoodTex } } triangle { <0, KeepH+4.2, 2.0>, <1.35, KeepH+3.95, 2.0>, <0, KeepH+3.6, 2.0> texture { pigment { color rgb <0.82, 0.16, 0.16> } finish { diffuse 0.9 specular 0.05 } } } } // Lift so it sits on hill translate <0, 0.2, 0> } // Courtyard ground inside walls (gravel) box { , texture { CourtyardGravelTex } }