#version 3.7; global_settings { assumed_gamma 1.0 max_trace_level 8 } background { color rgb <0.96, 0.97, 0.99> } camera { location <10.5, 7.0, -12.0> look_at <0.0, 3.0, 0.0> angle 35 } light_source { <30, 40, -20> color rgb <1.0, 0.98, 0.95> } light_source { <-25, 18, -15> color rgb <0.55, 0.62, 0.75> } light_source { <0, 12, 20> 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.05 roughness 0.08 } } } // --- Materials --- #declare T_BrickBase = texture { 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 } normal { bumps 0.35 scale 0.08 } finish { diffuse 0.9 specular 0.12 roughness 0.05 } } #declare T_Mortar = texture { pigment { color rgb <0.78, 0.77, 0.74> } normal { bumps 0.15 scale 0.06 } finish { diffuse 0.95 specular 0.05 roughness 0.1 } } #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.75> } finish { diffuse 0.05 specular 0.65 roughness 0.008 reflection 0.10 } } // Valid replacement: texture layering via a planar brick pattern plus a mortar mask. // (Avoids the invalid average/pigment_map syntax that caused the parse error.) #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.08 scale 1 } normal { bumps 0.25 scale 0.07 } finish { diffuse 0.9 specular 0.10 roughness 0.06 } } #declare T_MortarOverlay = texture { pigment { crackle color_map { [0.00 color rgbt <0.80, 0.79, 0.76, 0.00>] // show mortar [0.06 color rgbt <0.80, 0.79, 0.76, 1.00>] // transparent elsewhere [1.00 color rgbt <0.80, 0.79, 0.76, 1.00>] } scale <0.55, 0.18, 0.55> } normal { bumps 0.10 scale 0.05 } finish { diffuse 0.95 specular 0.03 roughness 0.10 } } // --- Building dimensions --- #declare W = 9.2; // width (x) #declare D = 6.0; // depth (z) #declare H = 6.2; // height (y) #declare Wall = 0.35; // Helpers #macro WindowUnit(CenterX, CenterY, CenterZ, WinW, WinH, Inset) union { box { , texture { T_TrimDark } } box { , texture { T_Glass } } } #end #macro CutWindow(CenterX, CenterY, FaceZ, WinW, WinH, DepthCut) box { , } #end #macro CutDoor(CenterX, CenterY, FaceZ, DoorW, DoorH, DepthCut) box { , } #end // --- Building shell with cutouts (front + side features) --- #declare Building = difference { union { // Main block box { <-W/2, 0, -D/2>, texture { T_BrickWithMortar } texture { T_MortarOverlay } } // Slight front bay protrusion box { <-W*0.18, 0, -D/2-0.7>, texture { T_BrickWithMortar } texture { T_MortarOverlay } } // Side stair-tower like volume box { , texture { T_BrickWithMortar } texture { T_MortarOverlay } } // Parapet band box { <-W/2-0.05, H-0.35, -D/2-0.05>, texture { T_TrimDark } } // Roof cap on front bay box { <-W*0.20, H*0.72, -D/2-0.75>, texture { T_TrimDark } } } // Hollow interior (simple) box { <-W/2+Wall, Wall, -D/2+Wall>, } // Front door CutDoor(0, 0, -D/2-0.01, 1.7, 2.7, 0.6) // Front windows row (main block) CutWindow(-2.6, 2.2, -D/2-0.01, 1.2, 1.4, 0.6) CutWindow( 0.0, 2.2, -D/2-0.01, 1.2, 1.4, 0.6) CutWindow( 2.6, 2.2, -D/2-0.01, 1.2, 1.4, 0.6) // Upper windows row CutWindow(-2.6, 4.3, -D/2-0.01, 1.1, 1.3, 0.6) CutWindow( 0.0, 4.3, -D/2-0.01, 1.1, 1.3, 0.6) CutWindow( 2.6, 4.3, -D/2-0.01, 1.1, 1.3, 0.6) // Front bay windows CutWindow(0.0, 2.1, -D/2-0.70, 1.5, 1.4, 0.5) CutWindow(0.0, 4.1, -D/2-0.70, 1.4, 1.2, 0.5) // Side windows (right face, x = +W/2) box { , } box { , } // Small notch for architectural complexity (rear-left) box { <-W/2-0.2, 0.0, D/2-2.0>, <-W/2+2.0, H*0.55, D/2+0.2> } }; // --- Place building --- object { Building translate <0, 0, 0> } // --- Add door + windows as separate inserts (simple display) --- union { // Door (fills cutout area a bit inset) box { <-0.85, 0.02, -D/2-0.02>, < 0.85, 2.68, -D/2+0.25> texture { T_TrimDark } } // Door panels hint box { <-0.70, 0.20, -D/2+0.245>, < 0.70, 2.48, -D/2+0.255> texture { pigment { color rgb <0.20,0.20,0.22> } finish { diffuse 0.7 specular 0.25 roughness 0.03 } } } } union { // Front windows inserts WindowUnit(-2.6, 2.2, -D/2+0.02, 1.18, 1.38, 0.23) WindowUnit( 0.0, 2.2, -D/2+0.02, 1.18, 1.38, 0.23) WindowUnit( 2.6, 2.2, -D/2+0.02, 1.18, 1.38, 0.23) WindowUnit(-2.6, 4.3, -D/2+0.02, 1.05, 1.25, 0.23) WindowUnit( 0.0, 4.3, -D/2+0.02, 1.05, 1.25, 0.23) WindowUnit( 2.6, 4.3, -D/2+0.02, 1.05, 1.25, 0.23) // Front bay WindowUnit(0.0, 2.1, -D/2-0.66, 1.48, 1.38, 0.20) WindowUnit(0.0, 4.1, -D/2-0.66, 1.38, 1.18, 0.20) // Right-side windows (on tower volume face outward in +x) box { , texture { T_Glass } } box { , texture { T_Glass } } }