Select to view content in your preferred language

Make polygons follow terrain surface

2188
4
12-18-2016 10:26 AM
F_RContreras
Occasional Contributor

Hi

I watched a video about the M Buehler Favela project, and I want to know how he make a group of polygons follow the terrain surface, he use it to trees and vegetation, I know about the align shape to terrain, but it seems like he use a big polygon and then he divide it into a grid that he adapts to the terrain

Thanks

0 Kudos
4 Replies
ThomasFuchs
Esri Regular Contributor

Hi Felix

I think Matthias Buehler‌ does something like this:

  1. draw some shapes covering the terrain
  2. select the shapes
  3. then run a python script to perform a block subdivision on them
subdsettings = SubdivideShapesSettings()
subdsettings.setLotSubdivisionMethod("RECURSIVE")
subdsettings.setLotAreaMin(100.0)
subdsettings.setLotAreaMax(100.0)
subdsettings.setIrregularity(0)

terrainShapes = ce.subdivideShapes(ce.selection(), subdsettings)

terrain = ce.getObjectsFrom(ce.scene, ce.isMapLayer)[0]

settings = AlignShapesSettings()
settings.setHeightmap(ce.getName(terrain))
settings.setAlignFunction("PROJECT_ALL")

ce.alignShapes(terrainShapes, settings)
MatthiasBuehler3
Regular Contributor

hi guys ..

what I did is I just drew a big rectangular shape over the whole terrain, then wrote a rule that splits x*z* into squares. I then converted the squares model to a shapes, divided it up into separate shapes for each square and projected those square shapes down onto the terrain. I had to repeat this a couple of times until I was happy with the square size.

F_RContreras
Occasional Contributor

It worked!!, Thanks Matt!!

MatthiasBuehler3
Regular Contributor

yep, that's exactly the way to do it.

cheers!

matt

0 Kudos