// Brick evening old-town cityscape with castle hill (fast iterative) // Inspired by provided videos (castle.mp4, old_town.mp4) #version 3.7; global_settings { assumed_gamma 1.0 max_trace_level 8 } #include "colors.inc" // -------------------- Background / atmosphere -------------------- background { color rgb <0.10, 0.12, 0.18> } fog { distance 90 color rgb <0.10, 0.12, 0.18> fog_type 2 fog_alt 2.4 turbulence 0.12 } // -------------------- Camera -------------------- camera { location <18, 11.2, -22> look_at <0, 4.1, 0> angle 42 } // -------------------- Lights (warm, soft shadows) -------------------- light_source { <0, 75, -35> color rgb <0.10, 0.14, 0.20> shadowless } light_source { <55, 65, -45> color rgb <0.24, 0.27, 0.34>*0.75 area_light <10,0,0>, <0,0,10>, 4, 4 adaptive 1 jitter } #macro ConeLight(Pos, Target, Col, Radius, Fall, Tight) light_source { Pos color Col spotlight point_at Target radius Radius falloff Fall tightness Tight } #end #declare WarmLamp = rgb <1.00, 0.80, 0.55>*1.25; // -------------------- Finishes (simple, fast) -------------------- #declare F_Wall = finish { diffuse 0.88 specular 0.05 roughness 0.10 ambient 0.01 }; #declare F_Stone = finish { diffuse 0.84 specular 0.07 roughness 0.07 ambient 0.008 }; #declare F_Roof = finish { diffuse 0.76 specular 0.10 roughness 0.06 ambient 0.008 }; #declare F_Ground = finish { diffuse 0.92 specular 0.04 roughness 0.12 ambient 0.005 }; #declare F_Metal = finish { diffuse 0.55 specular 0.20 roughness 0.05 ambient 0.01 }; // -------------------- Brick textures (procedural) -------------------- // Note: Using built-in "brick" pattern + subtle noise for variation. #declare TX_Brick_Red = texture{ pigment{ average pigment_map{ [1 brick color rgb <0.56,0.22,0.18>, // brick color rgb <0.72,0.72,0.70> // mortar brick_size <0.55, 0.25, 0.28> mortar 0.08 scale 0.85 ] [1 bozo color_map{ [0.00 rgb <0.96,0.92,0.90>] [0.55 rgb <1.00,0.98,0.96>] [1.00 rgb <0.92,0.88,0.86>] } scale 1.4 ] } } normal{ average normal_map{ [1 brick 0.55 brick_size <0.55,0.25,0.28> mortar 0.08 scale 0.85] [1 bumps 0.18 scale 0.22] } } finish { F_Wall } } #declare TX_Brick_Warm = texture{ pigment{ average pigment_map{ [1 brick color rgb <0.62,0.30,0.22>, color rgb <0.73,0.72,0.70> brick_size <0.56, 0.26, 0.30> mortar 0.075 scale 0.86 ] [1 bozo color_map{ [0.00 rgb <0.95,0.92,0.90>] [0.55 rgb <1.00,0.98,0.96>] [1.00 rgb <0.90,0.87,0.85>] } scale 1.5 ] } } normal{ average normal_map{ [1 brick 0.58 brick_size <0.56,0.26,0.30> mortar 0.075 scale 0.86] [1 bumps 0.16 scale 0.24] } } finish { F_Wall } } #declare TX_Brick_Dark = texture{ pigment{ average pigment_map{ [1 brick color rgb <0.38,0.20,0.18>, color rgb <0.62,0.62,0.60> brick_size <0.55, 0.25, 0.28> mortar 0.085 scale 0.84 ] [1 bozo color_map{ [0.00 rgb <0.94,0.94,0.94>] [0.55 rgb <1.00,1.00,1.00>] [1.00 rgb <0.90,0.90,0.90>] } scale 1.3 ] } } normal{ average normal_map{ [1 brick 0.60 brick_size <0.55,0.25,0.28> mortar 0.085 scale 0.84] [1 bumps 0.14 scale 0.24] } } finish { F_Wall } } #declare TX_Roof_Red = texture{ pigment{ wrinkles color_map{ [0.00 rgb <0.34,0.12,0.12>] [0.55 rgb <0.43,0.16,0.14>] [1.00 rgb <0.52,0.20,0.18>] } scale <0.25,0.10,0.25> } normal { ripples 0.45 scale <0.25,0.08,0.25> } finish { F_Roof } } #declare TX_Roof_Brown = texture{ pigment{ wrinkles color_map{ [0.00 rgb <0.24,0.15,0.10>] [0.55 rgb <0.32,0.20,0.13>] [1.00 rgb <0.42,0.28,0.20>] } scale <0.28,0.12,0.28> } normal { ripples 0.42 scale <0.28,0.09,0.28> } finish { F_Roof } } #declare TX_AsphaltCobble = texture{ pigment{ bozo color_map{ [0.00 rgb <0.07,0.07,0.09>] [0.55 rgb <0.10,0.10,0.12>] [1.00 rgb <0.14,0.14,0.16>] } scale 0.65 } normal{ average normal_map{ [1 bumps 0.25 scale 0.20] [1 crackle 0.35 scale 0.35] } } finish { F_Ground } } #declare TX_Curb = texture{ pigment{ color rgb <0.18,0.18,0.20> } normal { bumps 0.20 scale 0.18 } finish { diffuse 0.92 specular 0.04 roughness 0.10 ambient 0.005 } } // -------------------- Ground + street -------------------- plane { y, 0 texture { TX_AsphaltCobble } } #declare StreetW = 2.8; // Street band box { <-20, 0.001, -StreetW>, <20, 0.02, StreetW> texture { TX_AsphaltCobble } } // Curbs (thin, slightly raised) box { <-20, 0.02, -StreetW-0.30>, <20, 0.10, -StreetW> texture{TX_Curb} } box { <-20, 0.02, StreetW>, <20, 0.10, StreetW+0.30> texture{TX_Curb} } // -------------------- Modular buildings -------------------- #macro House(W, D, H, RoofH, WallTex, RoofTex, BaseLift) union { box { <-W/2, BaseLift, -D/2>, texture { WallTex } } // pitched roof prism along Z (sits exactly on top of the box) prism { linear_sweep linear_spline -D/2, D/2, 3, <-W/2, BaseLift+H>, < 0, BaseLift+H+RoofH>, < W/2, BaseLift+H> texture { RoofTex } } } #end #macro Tower(R, H, CapH, WallTex, CapTex, BaseLift) union { cylinder { <0,BaseLift,0>, <0,BaseLift+H,0>, R texture { WallTex } } cone { <0,BaseLift+H,0>, R*1.05, <0,BaseLift+H+CapH,0>, 0 texture { CapTex } } } #end // -------------------- Window hints (simple emissive rectangles) -------------------- #macro WindowsOnBox(W, D, H, BaseLift) #local WY = BaseLift + 1.2; #local WW = 0.28; #local WH = 0.38; #local Glow = texture { pigment { color rgb <1.0,0.78,0.52>*0.9 } finish { diffuse 0.2 ambient 0.85 specular 0.0 } }; union{ // front ( -Z ) #local i=0; #while (i<3) box{ <-W*0.30 + i*(W*0.30), WY, -D/2-0.001>, <-W*0.30 + i*(W*0.30) + WW, WY+WH, -D/2-0.0005> texture{Glow} } #local i=i+1; #end // back ( +Z ) dimmer box{ < -W*0.18, WY+0.2, D/2+0.0005>, < -W*0.18+WW, WY+0.2+WH, D/2+0.001> texture{ pigment{color rgb <1.0,0.75,0.50>*0.35} finish { diffuse 0.2 ambient 0.45 } } } } #end // -------------------- Town block layout (brick buildings) -------------------- #declare b0 = 0.00; #declare b1 = 0.03; #declare b2 = 0.06; // Row 1 (front) union{ object { House(3.6, 2.8, 3.2, 1.4, TX_Brick_Red, TX_Roof_Red, b0) } WindowsOnBox(3.6,2.8,3.2,b0) translate <-8.4,0,-6.5> } union{ object { House(3.0, 3.0, 3.8, 1.6, TX_Brick_Warm, TX_Roof_Brown, b1) } WindowsOnBox(3.0,3.0,3.8,b1) translate <-4.2,0,-6.7> } union{ object { House(4.0, 3.2, 3.5, 1.5, TX_Brick_Red, TX_Roof_Red, b0) } WindowsOnBox(4.0,3.2,3.5,b0) translate < 0.0,0,-6.6> } union{ object { House(3.2, 2.9, 4.2, 1.7, TX_Brick_Dark, TX_Roof_Brown, b2) } WindowsOnBox(3.2,2.9,4.2,b2) translate < 4.3,0,-6.7> } union{ object { House(3.8, 3.1, 3.1, 1.3, TX_Brick_Warm, TX_Roof_Red, b1) } WindowsOnBox(3.8,3.1,3.1,b1) translate < 8.5,0,-6.6> } // Row 2 union{ object { House(3.4, 3.0, 4.0, 1.5, TX_Brick_Dark, TX_Roof_Red, b1) } WindowsOnBox(3.4,3.0,4.0,b1) rotate <0, 8,0> translate <-8.5,0,-2.5> } union{ object { House(3.9, 3.3, 4.6, 1.8, TX_Brick_Red, TX_Roof_Brown, b0) } WindowsOnBox(3.9,3.3,4.6,b0) rotate <0,-6,0> translate <-4.3,0,-2.4> } union{ object { House(4.2, 3.5, 4.3, 1.7, TX_Brick_Warm, TX_Roof_Red, b2) } WindowsOnBox(4.2,3.5,4.3,b2) rotate <0, 4,0> translate < 0.2,0,-2.3> } union{ object { House(3.2, 3.0, 4.8, 1.9, TX_Brick_Red, TX_Roof_Brown, b1) } WindowsOnBox(3.2,3.0,4.8,b1) rotate <0,-7,0> translate < 4.4,0,-2.5> } union{ object { House(3.6, 3.2, 4.1, 1.6, TX_Brick_Dark, TX_Roof_Red, b0) } WindowsOnBox(3.6,3.2,4.1,b0) rotate <0, 6,0> translate < 8.6,0,-2.4> } // Row 3 (back) union{ object { House(3.2, 3.1, 5.0, 2.0, TX_Brick_Warm, TX_Roof_Red, b2) } WindowsOnBox(3.2,3.1,5.0,b2) rotate <0,-8,0> translate <-8.6,0, 1.6> } union{ object { House(3.8, 3.6, 5.3, 2.1, TX_Brick_Dark, TX_Roof_Brown, b1) } WindowsOnBox(3.8,3.6,5.3,b1) rotate <0, 5,0> translate <-4.4,0, 1.5> } union{ object { House(4.5, 3.8, 5.6, 2.2, TX_Brick_Red, TX_Roof_Red, b0) } WindowsOnBox(4.5,3.8,5.6,b0) rotate <0,-4,0> translate < 0.1,0, 1.7> } union{ object { House(3.4, 3.2, 5.1, 2.0, TX_Brick_Warm, TX_Roof_Brown, b2) } WindowsOnBox(3.4,3.2,5.1,b2) rotate <0, 7,0> translate < 4.4,0, 1.6> } union{ object { House(3.9, 3.7, 5.2, 2.1, TX_Brick_Red, TX_Roof_Red, b1) } WindowsOnBox(3.9,3.7,5.2,b1) rotate <0,-6,0> translate < 8.7,0, 1.5> } // Old-town towers (brick shafts for town, like historic brick towers) object { Tower(0.65, 7.6, 2.2, TX_Brick_Dark, TX_Roof_Red, 0.00) translate <-2.6,0,-4.5> } object { Tower(0.55, 6.4, 2.0, TX_Brick_Dark, TX_Roof_Brown, 0.00) translate < 6.7,0,-1.0> } // -------------------- Lamp posts -------------------- #macro LampPost(P) union{ cylinder { P, P+<0,1.55,0>, 0.06 pigment{color rgb<0.10,0.10,0.12>} finish{F_Metal} } cylinder { P+<0,1.55,0>, P+<0,1.80,0>, 0.04 pigment{color rgb<0.10,0.10,0.12>} finish{F_Metal} } sphere { P+<0,1.86,0>, 0.10 pigment{color rgb<0.18,0.16,0.14>} finish{ diffuse 0.5 specular 0.12 roughness 0.06 ambient 0.25 } } } #end #declare L1 = <-10.5, 0, 0.0>; #declare L2 = <-4.5, 0, 0.0>; #declare L3 = < 1.5, 0, 0.0>; #declare L4 = < 7.5, 0, 0.0>; object { LampPost(L1) } object { LampPost(L2) } object { LampPost(L3) } object { LampPost(L4) } ConeLight(L1+<0,1.9,0>, L1+<0,0.0,0>, WarmLamp, 18, 32, 18) ConeLight(L2+<0,1.9,0>, L2+<0,0.0,0>, WarmLamp, 18, 32, 18) ConeLight(L3+<0,1.9,0>, L3+<0,0.0,0>, WarmLamp, 18, 32, 18) ConeLight(L4+<0,1.9,0>, L4+<0,0.0,0>, WarmLamp, 18, 32, 18) // Warm façade spotlights ConeLight(<-14, 6.5, -12>, <-6.0, 2.8, -6.5>, rgb<1.0,0.82,0.60>*0.9, 16, 26, 20) ConeLight(< 14, 7.0, -12>, < 6.0, 3.0, -6.5>, rgb<1.0,0.82,0.60>*0.85,16, 26, 20) // -------------------- Distant hill + castle -------------------- difference { sphere { <0, -30, 28>, 40 } plane { y, 0 inverse } texture{ pigment{ bozo color_map{ [0.00 rgb <0.13,0.18,0.16>] [0.60 rgb <0.18,0.22,0.20>] [1.00 rgb <0.10,0.14,0.12>] } scale 2.2 } normal { bumps 0.35 scale 0.9 } finish { diffuse 0.95 specular 0.01 roughness 0.18 ambient 0.01 } } } // Castle stays stone for material contrast #declare TX_CastleStone = texture{ pigment{ granite color_map{ [0.00 rgb <0.20,0.21,0.23>] [0.55 rgb <0.26,0.27,0.30>] [1.00 rgb <0.34,0.35,0.38>] } scale 0.85 } normal { granite 0.75 scale 0.32 } finish { diffuse 0.80 specular 0.07 roughness 0.06 ambient 0.005 } } #declare TX_CastleRoof = texture{ pigment{ wrinkles color_map{ [0.00 rgb <0.10,0.10,0.12>] [0.60 rgb <0.14,0.14,0.16>] [1.00 rgb <0.18,0.18,0.20>] } scale <0.30,0.12,0.30> } normal { ripples 0.30 scale <0.30,0.10,0.30> } finish { diffuse 0.70 specular 0.10 roughness 0.05 ambient 0.005 } } union { box { <-2.4, 0, -1.8>, < 2.4, 4.8, 1.8> texture { TX_CastleStone } } box { <-5.0, 0, -1.2>, <-2.6, 3.2, 1.2> texture { TX_CastleStone } } box { < 2.6, 0, -1.2>, < 5.0, 3.2, 1.2> texture { TX_CastleStone } } object { Tower(0.7, 5.6, 2.0, TX_CastleStone, TX_CastleRoof, 0.00) translate <-4.7,0,-1.1> } object { Tower(0.7, 5.6, 2.0, TX_CastleStone, TX_CastleRoof, 0.00) translate <-4.7,0, 1.1> } object { Tower(0.7, 5.6, 2.0, TX_CastleStone, TX_CastleRoof, 0.00) translate < 4.7,0,-1.1> } object { Tower(0.7, 5.6, 2.0, TX_CastleStone, TX_CastleRoof, 0.00) translate < 4.7,0, 1.1> } prism { linear_sweep linear_spline -1.8, 1.8, 3, <-2.4, 4.8>, < 0.0, 6.3>, < 2.4, 4.8> texture { TX_CastleRoof } } scale <1.2,1.2,1.2> rotate <0, 12, 0> translate <0, 0.0, 22.5> } // Rim light to separate castle from hill ConeLight(<-6, 14, 10>, <0, 4.5, 22.5>, rgb<1.0,0.75,0.55>*0.25, 10, 18, 8)