#version 3.7; global_settings { assumed_gamma 1.0 max_trace_level 6 } background { color rgb <0.96, 0.97, 0.99> } camera { location <11.2, 7.2, -12.8> look_at <0.0, 3.1, 0.0> angle 35 } light_source { <30, 45, -25> color rgb <1.0, 0.98, 0.95> } light_source { <-25, 20, -15> color rgb <0.55, 0.62, 0.75> } light_source { <0, 14, 22> color rgb <0.25, 0.25, 0.28> } plane { y, 0 texture { pigment { color rgb <0.93, 0.93, 0.94> } finish { diffuse 0.85 specular 0.04 roughness 0.10 } } } // ---------------- Materials ---------------- #declare T_BrickWithMortar = texture { pigment { brick pigment { granite color_map { [0.00 color rgb <0.46, 0.17, 0.12>] [0.45 color rgb <0.52, 0.20, 0.14>] [0.75 color rgb <0.38, 0.14, 0.10>] [1.00 color rgb <0.60, 0.26, 0.18>] } scale 0.25 } pigment { color rgb <0.78, 0.77, 0.74> } brick_size <0.55, 0.18, 0.55> mortar 0.09 scale 1 } normal { bumps 0.20 scale 0.07 } finish { diffuse 0.90 specular 0.08 roughness 0.06 } } #declare T_TrimDark = texture { pigment { color rgb <0.14, 0.14, 0.16> } finish { diffuse 0.75 specular 0.25 roughness 0.03 } } #declare T_Glass = texture { pigment { color rgbf <0.70, 0.85, 0.95, 0.78> } finish { diffuse 0.05 specular 0.65 roughness 0.008 reflection 0.10 } } // ---------------- Dimensions / helpers ---------------- #declare W = 9.2; #declare D = 6.0; #declare H = 6.2; #declare BayW = W*0.36; #declare BayDepth = 0.70; #declare BayH = H*0.72; #declare TowerX0 = W/2-2.2; #declare TowerX1 = W/2+0.9; #declare TowerZ0 = -D/2+0.6; #declare TowerZ1 = -D/2+2.8; #declare TowerH = H*0.92; #declare ParapetT = 0.35; #declare BandOver = 0.06; #declare Eps = 0.002; // tiny offset to prevent coplanar artifacts (still visually flush) #macro SolidBlock(P0, P1, Tex) box { P0, P1 texture { Tex } } #end // Window/Door module that visually "fits" the wall plane (flush), no boolean cutouts. // FaceN: <0,0,1> for front (at z=FaceZ), <1,0,0> for right wall (at x=FaceX). #macro FaceInsert_Rect(FaceN, FacePos, CX, CY, C2, WW, HH, Frame, InDepth, TexFrame, TexGlass) // C2 is the coordinate along the wall (x for front, z for right wall). // FacePos is z (front) or x (right). #local HalfW = WW/2; #local HalfH = HH/2; #if (FaceN.x=0) // front wall (normal +z), plane at z=FacePos union { // frame, very slightly proud, but essentially flush box { , texture { TexFrame } } // glass inset (inside the frame) box { , texture { TexGlass } } } #else // right wall (normal +x), plane at x=FacePos union { box { , texture { TexFrame } } box { , texture { TexGlass } } } #end #end #macro DoorInsert_Front(FaceZ, CX, DoorW, DoorH, InDepth) union { // outer frame box { , texture { T_TrimDark } } // inner panel box { , texture { pigment { color rgb <0.20, 0.20, 0.22> } finish { diffuse 0.70 specular 0.22 roughness 0.04 } } } } #end // ---------------- Building (aligned blocks) ---------------- // Build as a union of non-overlapping solids that meet at exact shared faces (seamless). #declare BuildingMass = union { // Main block SolidBlock(<-W/2, 0, -D/2>, < W/2, H, D/2>, T_BrickWithMortar) // Front bay: its back face exactly matches main block front face at z=-D/2 (no overlap) SolidBlock(<-BayW/2, 0, -D/2-BayDepth>, < BayW/2, BayH, -D/2>, T_BrickWithMortar) // Side tower: sits flush on main, no overlap; it extends outward in +x and forward (toward -z) SolidBlock(, , T_BrickWithMortar) // Parapet band: slight overhang all around, but as a separate band that touches at y=H-ParapetT SolidBlock(<-W/2-BandOver, H-ParapetT, -D/2-BandOver>, < W/2+BandOver, H, D/2+BandOver>, T_TrimDark) // Roof cap on front bay (touches bay top exactly) SolidBlock(<-BayW/2-0.10, BayH, -D/2-BayDepth-0.05>, < BayW/2+0.10, BayH+0.25, -D/2+0.01>, T_TrimDark) }; // ---------------- Place building ---------------- object { BuildingMass } // ---------------- Inserts (flush-fit) ---------------- #declare FrontZ = -D/2; #declare BayFrontZ = -D/2 - BayDepth; #declare RightX = W/2; union { // Door (front) object { DoorInsert_Front(FrontZ, 0.0, 1.7, 2.7, 0.22) } // Front windows (main block) - flush on front face object { FaceInsert_Rect(<0,0,1>, FrontZ, 0, 2.2, -2.6, 1.20, 1.40, 0.06, 0.20, T_TrimDark, T_Glass) } object { FaceInsert_Rect(<0,0,1>, FrontZ, 0, 2.2, 0.0, 1.20, 1.40, 0.06, 0.20, T_TrimDark, T_Glass) } object { FaceInsert_Rect(<0,0,1>, FrontZ, 0, 2.2, 2.6, 1.20, 1.40, 0.06, 0.20, T_TrimDark, T_Glass) } object { FaceInsert_Rect(<0,0,1>, FrontZ, 0, 4.3, -2.6, 1.10, 1.30, 0.06, 0.20, T_TrimDark, T_Glass) } object { FaceInsert_Rect(<0,0,1>, FrontZ, 0, 4.3, 0.0, 1.10, 1.30, 0.06, 0.20, T_TrimDark, T_Glass) } object { FaceInsert_Rect(<0,0,1>, FrontZ, 0, 4.3, 2.6, 1.10, 1.30, 0.06, 0.20, T_TrimDark, T_Glass) } // Front bay windows - flush on bay front face object { FaceInsert_Rect(<0,0,1>, BayFrontZ, 0, 2.1, 0.0, 1.50, 1.40, 0.06, 0.18, T_TrimDark, T_Glass) } object { FaceInsert_Rect(<0,0,1>, BayFrontZ, 0, 4.1, 0.0, 1.40, 1.20, 0.06, 0.18, T_TrimDark, T_Glass) } // Right-side windows on the tower outer face (x = RightX + 0.9 is the tower's outer face) // Tower outer face X: #declare TowerOuterX = TowerX1; object { FaceInsert_Rect(<1,0,0>, TowerOuterX, 0, 2.45, -1.30, 1.05, 1.10, 0.06, 0.18, T_TrimDark, T_Glass) } object { FaceInsert_Rect(<1,0,0>, TowerOuterX, 0, 4.25, -1.30, 1.05, 1.10, 0.06, 0.18, T_TrimDark, T_Glass) } } // Subtle shadow contact helper (very low cost) object { box { <-W/2-0.9, 0, -D/2-1.2>, } texture { pigment { color rgbt <0.0, 0.0, 0.0, 0.92> } finish { diffuse 0 specular 0 } } }