attr buildingHeight = 20 attr facadeColor = "#ffdddd" attr roofColor = "#444444" attr roofInnerColor = "#eeeeee" attr roofWallThickness = 0.3 attr roofWallHeight = 0.65 attr facadeTexDimHorizontal = 6 attr facadeTexDimVertical = 4 facadeTex = "assets/wall.c.06.jpg" dirtTex = "assets/dirtmap.15.jpg" Lot --> extrude (world.y, buildingHeight) comp(f) {side : Facade | top : Roof} Facade --> # color color(facadeColor) # texture, UV set 0 setupProjection(0, scope.xy, facadeTexDimHorizontal, facadeTexDimVertical) # scope is zUp after comp(f) ! projectUV(0) texture ( facadeTex ) # dirt, UV set 2 setupProjection(2, scope.xy, '1, '1) projectUV(2) set (material.dirtmap, dirtTex ) translateUV(2, rand(1), 0) # offset the texture slightly to the right. range between 0 and 1, "1 full texture tile". Roof --> offset ( - roofWallThickness) comp(f) {inside : RoofSurface | border : RoofWallInner} RoofSurface --> t(0,0,-roofWallHeight) # scope is oriented zUP after a comp(f), thus I move down in z ! extrude(world.y, roofWallHeight) comp(f) {top : NIL | bottom : RoofFloor | all : RoofWallInner} RoofFloor --> color(roofColor) setupProjection(2, scope.xy, '1, '1) projectUV(2) set (material.dirtmap, dirtTex ) RoofWallInner --> color(roofInnerColor) alignScopeToGeometry(zUp, 0, world.lowest) setupProjection(2, scope.xy, 10, 10) # choosing just any dimensions, I'm not scaling '1 here ! projectUV(2) set (material.dirtmap, dirtTex )
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.