// Cityscape inspired by "old town" + distant "castle" silhouette #version 3.7; global_settings { assumed_gamma 1.0 max_trace_level 8 } background { color rgb <0.78, 0.86, 0.95> } // soft sky // -------------------- Camera -------------------- camera { location <18, 12, -22> look_at <0, 4.5, 0> angle 42 } // -------------------- Lights (warm + soft shadows) -------------------- light_source { <35, 45, -30> color rgb <1.00, 0.90, 0.78> area_light <6,0,0>, <0,0,6>, 6, 6 adaptive 1 jitter } light_source { <-20, 25, -10> color rgb <0.85, 0.80, 0.75> area_light <4,0,0>, <0,0,4>, 5, 5 adaptive 1 jitter } // gentle fill light_source { <0, 60, 0> color rgb <0.35, 0.38, 0.45> shadowless } // -------------------- Simple finishes (no textures) -------------------- #declare F_Matte = finish { diffuse 0.85 specular 0.06 roughness 0.08 ambient 0.0 }; #declare F_Roof = finish { diffuse 0.80 specular 0.10 roughness 0.06 ambient 0.0 }; // -------------------- Ground + street -------------------- plane { y, 0 pigment { color rgb <0.62, 0.66, 0.62> } finish { diffuse 0.9 specular 0.02 roughness 0.12 } } #declare StreetW = 2.8; box { <-20, 0.001, -StreetW>, <20, 0.02, StreetW> pigment { color rgb <0.30, 0.31, 0.33> } finish { diffuse 0.9 specular 0.03 roughness 0.10 } } // -------------------- Modular buildings -------------------- #macro House(W, D, H, RoofH, WallCol, RoofCol) union { // walls box { <-W/2, 0, -D/2>, pigment { color WallCol } finish { F_Matte } } // pitched roof (triangular prism along Z) prism { linear_sweep linear_spline -D/2, D/2, 3, <-W/2, H>, < 0, H+RoofH>, < W/2, H> pigment { color RoofCol } finish { F_Roof } translate <0,0,0> } } #end #macro Tower(R, H, CapH, ColWall, ColCap) union { cylinder { <0,0,0>, <0,H,0>, R pigment { color ColWall } finish { F_Matte } } cone { <0,H,0>, R*1.05, <0,H+CapH,0>, 0 pigment { color ColCap } finish { F_Roof } } } #end // -------------------- Town block layout -------------------- #declare RoofRed = rgb <0.55, 0.20, 0.18>; #declare RoofBrown = rgb <0.42, 0.26, 0.18>; #declare WallA = rgb <0.86, 0.82, 0.74>; #declare WallB = rgb <0.78, 0.80, 0.74>; #declare WallC = rgb <0.72, 0.72, 0.70>; #declare WallD = rgb <0.84, 0.76, 0.68>; #declare BlockSpacingX = 4.2; #declare BlockSpacingZ = 4.1; // Row 1 (front) object { House(3.6, 2.8, 3.2, 1.4, WallA, RoofRed) translate <-8.4,0,-6.5> } object { House(3.0, 3.0, 3.8, 1.6, WallB, RoofBrown) translate <-4.2,0,-6.7> } object { House(4.0, 3.2, 3.5, 1.5, WallD, RoofRed) translate < 0.0,0,-6.6> } object { House(3.2, 2.9, 4.2, 1.7, WallC, RoofBrown) translate < 4.3,0,-6.7> } object { House(3.8, 3.1, 3.1, 1.3, WallA, RoofRed) translate < 8.5,0,-6.6> } // Row 2 object { House(3.4, 3.0, 4.0, 1.5, WallB, RoofRed) translate <-8.5,0,-2.5> rotate <0,8,0> } object { House(3.9, 3.3, 4.6, 1.8, WallA, RoofBrown) translate <-4.3,0,-2.4> rotate <0,-6,0> } object { House(4.2, 3.5, 4.3, 1.7, WallD, RoofRed) translate < 0.2,0,-2.3> rotate <0,4,0> } object { House(3.2, 3.0, 4.8, 1.9, WallC, RoofBrown) translate < 4.4,0,-2.5> rotate <0,-7,0> } object { House(3.6, 3.2, 4.1, 1.6, WallB, RoofRed) translate < 8.6,0,-2.4> rotate <0,6,0> } // Row 3 (back, denser) object { House(3.2, 3.1, 5.0, 2.0, WallC, RoofRed) translate <-8.6,0, 1.6> rotate <0,-8,0> } object { House(3.8, 3.6, 5.3, 2.1, WallA, RoofBrown) translate <-4.4,0, 1.5> rotate <0,5,0> } object { House(4.5, 3.8, 5.6, 2.2, WallD, RoofRed) translate < 0.1,0, 1.7> rotate <0,-4,0> } object { House(3.4, 3.2, 5.1, 2.0, WallB, RoofBrown) translate < 4.4,0, 1.6> rotate <0,7,0> } object { House(3.9, 3.7, 5.2, 2.1, WallA, RoofRed) translate < 8.7,0, 1.5> rotate <0,-6,0> } // A couple of skyline accents (old-town towers) object { Tower(0.65, 7.6, 2.2, rgb<0.78,0.76,0.72>, RoofRed) translate <-2.6,0,-4.5> } object { Tower(0.55, 6.4, 2.0, rgb<0.74,0.73,0.70>, RoofBrown) translate < 6.7,0,-1.0> } // -------------------- Distant hill + castle silhouette -------------------- #declare HillCol = rgb <0.46, 0.50, 0.46>; difference { sphere { <0, -30, 28>, 40 } plane { y, 0 inverse } pigment { color HillCol } finish { diffuse 0.9 specular 0.02 roughness 0.15 } } // Simple castle massing on the hill #declare CastleWall = rgb <0.68, 0.67, 0.64>; #declare CastleRoof = rgb <0.35, 0.35, 0.37>; union { // main keep box { <-2.4, 0, -1.8>, < 2.4, 4.8, 1.8> pigment { color CastleWall } finish { F_Matte } } // side wings box { <-5.0, 0, -1.2>, <-2.6, 3.2, 1.2> pigment { color CastleWall } finish { F_Matte } } box { < 2.6, 0, -1.2>, < 5.0, 3.2, 1.2> pigment { color CastleWall } finish { F_Matte } } // corner towers object { Tower(0.7, 5.6, 2.0, CastleWall, CastleRoof) translate <-4.7,0,-1.1> } object { Tower(0.7, 5.6, 2.0, CastleWall, CastleRoof) translate <-4.7,0, 1.1> } object { Tower(0.7, 5.6, 2.0, CastleWall, CastleRoof) translate < 4.7,0,-1.1> } object { Tower(0.7, 5.6, 2.0, CastleWall, CastleRoof) translate < 4.7,0, 1.1> } // roof block prism { linear_sweep linear_spline -1.8, 1.8, 3, <-2.4, 4.8>, < 0.0, 6.3>, < 2.4, 4.8> pigment { color CastleRoof } finish { F_Roof } } // place castle atop hill in distance scale <1.2,1.2,1.2> rotate <0, 12, 0> translate <0, 0.0, 22.5> }