// Cityscape: castle + old town block (fast, simple shading, warm soft lights) #version 3.7; global_settings { assumed_gamma 1.0 max_trace_level 6 } background { color rgb <0.70, 0.78, 0.90> } // -------------------- Camera -------------------- camera { location <24, 16, -28> look_at <0, 6.5, 0> angle 42 } // -------------------- Lights (warm + soft shadows) -------------------- light_source { <40, 55, -45> color rgb <1.00, 0.88, 0.72>*1.05 area_light <10,0,0>, <0,0,10>, 6, 6 adaptive 1 jitter } light_source { <-30, 28, -10> color rgb <1.00, 0.92, 0.80>*0.35 area_light <8,0,0>, <0,0,8>, 5, 5 adaptive 1 jitter } // -------------------- Simple materials -------------------- #declare Mat_Stone = finish { diffuse 0.85 specular 0.10 roughness 0.08 }; #declare Mat_Plaster = finish { diffuse 0.90 specular 0.06 roughness 0.10 }; #declare Mat_Roof = finish { diffuse 0.85 specular 0.08 roughness 0.12 }; #declare Mat_Wood = finish { diffuse 0.88 specular 0.05 roughness 0.20 }; #declare Mat_Ground = finish { diffuse 0.90 specular 0.00 }; #declare C_Stone = color rgb <0.72, 0.72, 0.74>; #declare C_DarkStone = color rgb <0.45, 0.46, 0.48>; #declare C_PlasterA = color rgb <0.86, 0.82, 0.74>; #declare C_PlasterB = color rgb <0.80, 0.84, 0.86>; #declare C_RoofRed = color rgb <0.62, 0.25, 0.22>; #declare C_RoofBrown = color rgb <0.40, 0.26, 0.18>; #declare C_Wood = color rgb <0.40, 0.28, 0.18>; #declare C_Pave = color rgb <0.58, 0.58, 0.60>; // -------------------- Ground / plaza -------------------- plane { y, 0 pigment { color rgb <0.82,0.82,0.84> } finish { Mat_Ground } } box { <-14, 0.001, -10>, <14, 0.06, 12> pigment { C_Pave } finish { diffuse 0.92 specular 0.02 roughness 0.15 } } // -------------------- Helper macros -------------------- #macro House(Pos, W, D, H, RoofH, PlasterCol, RoofCol) union { // body box { <-W/2, 0, -D/2>, pigment { PlasterCol } finish { Mat_Plaster } } // timber band box { <-W/2, H*0.55, -D/2>, pigment { C_Wood } finish { Mat_Wood } } // simple gable roof (triangular prism) prism { linear_sweep linear_spline -D/2, D/2, 3, <-W/2, 0>, <0, RoofH>, pigment { RoofCol } finish { Mat_Roof } translate <0, H, 0> } translate Pos } #end #macro Tower(Pos, R, H, StoneCol) union { cylinder { <0,0,0>, <0,H,0>, R pigment { StoneCol } finish { Mat_Stone } } // crenellation ring difference { cylinder { <0,H,0>, <0,H+0.55,0>, R*1.06 } cylinder { <0,H-0.05,0>, <0,H+0.65,0>, R*0.86 } // cut notches #local i = 0; #while (i < 8) box { <-0.35, H-0.2, -R*1.2>, <0.35, H+1.0, -R*0.2> rotate <0, i*45, 0> } #local i = i + 1; #end pigment { StoneCol } finish { Mat_Stone } } translate Pos } #end #macro Keep(Pos) union { // main keep block box { <-4.5, 0, -3.6>, <4.5, 11.0, 3.6> pigment { C_Stone } finish { Mat_Stone } } // corner buttresses box { <-4.9,0,-4.0>, <-4.5,9.5,-3.6> pigment{C_DarkStone} finish{Mat_Stone} } box { < 4.5,0,-4.0>, < 4.9,9.5,-3.6> pigment{C_DarkStone} finish{Mat_Stone} } box { <-4.9,0, 3.6>, <-4.5,9.5, 4.0> pigment{C_DarkStone} finish{Mat_Stone} } box { < 4.5,0, 3.6>, < 4.9,9.5, 4.0> pigment{C_DarkStone} finish{Mat_Stone} } // crenellations on keep difference { box { <-4.7, 11.0, -3.8>, <4.7, 11.8, 3.8> } box { <-4.2, 10.9, -3.3>, <4.2, 12.2, 3.3> } #local j = -4; #while (j <= 4) box { , } box { , } #local j = j + 1; #end pigment { C_Stone } finish { Mat_Stone } } // towers Tower(<-6.6,0,-5.4>, 1.7, 13.5, C_Stone) Tower(< 6.6,0,-5.4>, 1.7, 13.5, C_Stone) Tower(<-6.6,0, 5.4>, 1.7, 13.0, C_Stone) Tower(< 6.6,0, 5.4>, 1.7, 13.0, C_Stone) // small inner roof slab box { <-3.8, 11.0, -2.8>, <3.8, 11.35, 2.8> pigment { color rgb <0.55,0.55,0.56> } finish { diffuse 0.90 specular 0.03 roughness 0.12 } } translate Pos } #end // -------------------- Old town ring (dense houses) -------------------- #declare BlockY = 0; // Front row (towards camera) House(<-11,BlockY, 6>, 4.6, 3.8, 5.0, 2.2, C_PlasterA, C_RoofRed) House(< -6,BlockY, 6>, 4.0, 3.6, 6.2, 2.6, C_PlasterB, C_RoofBrown) House(< -1,BlockY, 6>, 4.8, 3.7, 5.6, 2.3, C_PlasterA, C_RoofRed) House(< 4,BlockY, 6>, 4.1, 3.8, 6.7, 2.8, C_PlasterB, C_RoofBrown) House(< 9,BlockY, 6>, 4.7, 3.9, 5.3, 2.1, C_PlasterA, C_RoofRed) // Side rows House(<-13,BlockY, 1>, 4.0, 4.2, 6.4, 2.5, C_PlasterB, C_RoofBrown) House(<-13,BlockY, -4>, 4.4, 4.2, 5.4, 2.1, C_PlasterA, C_RoofRed) House(< 13,BlockY, 1>, 4.3, 4.3, 6.1, 2.4, C_PlasterA, C_RoofBrown) House(< 13,BlockY, -4>, 4.1, 4.2, 5.2, 2.0, C_PlasterB, C_RoofRed) // Back row (behind keep) House(<-10,BlockY, -8>, 4.8, 4.0, 5.8, 2.4, C_PlasterB, C_RoofRed) House(< -4,BlockY, -8>, 4.2, 4.0, 6.6, 2.7, C_PlasterA, C_RoofBrown) House(< 2,BlockY, -8>, 4.6, 4.0, 5.5, 2.2, C_PlasterB, C_RoofRed) House(< 8,BlockY, -8>, 4.4, 4.0, 6.0, 2.5, C_PlasterA, C_RoofBrown) // -------------------- Central castle/keep -------------------- Keep(<0,0,-1.0>) // -------------------- Street arch + small bridge detail -------------------- difference { // arch block box { <-2.6, 0, 2.2>, <2.6, 3.2, 4.6> } // arch hole cylinder { <0,0,3.4>, <0,3.2,3.4>, 1.35 rotate <90,0,0> translate <0,1.35,0> } pigment { C_DarkStone } finish { Mat_Stone } } box { <-4.8, 0.12, 1.1>, <4.8, 0.36, 2.1> pigment { color rgb <0.52,0.52,0.54> } finish { diffuse 0.9 specular 0.02 roughness 0.2 } } // Low parapets box { <-4.8, 0.36, 1.1>, <-4.4, 0.95, 2.1> pigment{C_DarkStone} finish{Mat_Stone} } box { < 4.4, 0.36, 1.1>, < 4.8, 0.95, 2.1> pigment{C_DarkStone} finish{Mat_Stone} } // -------------------- Subtle distant backdrop blocks (city silhouette) -------------------- #declare k = -3; #while (k <= 3) box { <-30 + k*9, 0, 18>, <-24 + k*9, 7 + (k+3)*0.6, 26> pigment { color rgb <0.72,0.76,0.82> } finish { diffuse 0.85 specular 0.02 roughness 0.2 } } #declare k = k + 1; #end