At Esri, we constantly receive the question "can Esri software generate 3D gridded terrain tiles from elevation rasters". Well, the answer is yes!
Whether you are a 3D environment artist focusing on film, gaming, or rendering, an AEC Professional, or GIS expert interested in a non-TIN based approach to terrain surface generation you will find the following post helpful.
The following workflow requires ArcGIS Pro and Esri CityEngine.
Process:
- Create a new ArcGIS Pro Project.
- Install the Toolbox in ArcGIS Pro
- Download the "Generate3DTerrainGridTools" here: gen3DTerrainGrid.zip - Box
- Unzip the .zip folder to your computer at your location of choice.
- In the "Catalog" tab in ArcGIS Pro "Right Click" on "Toolboxes" and select "Add Toolbox"
![](/legacyfs/online/398473_pastedImage_2.png)
- Search for the toolbox within the folder you extracted.
- You should now see the script tools in the toolbox in ArcGIS Pro catalog.
![](/legacyfs/online/398475_pastedImage_4.png)
- Open the "Generate 3D Terrain Grid" tool
- Input your DEM Raster, choose the Output GeoDatabase, and Output Feature Class Name and click "RUN"
![](/legacyfs/online/398476_pastedImage_5.png)
- The output will be convert your raster pixels to 3D polygons at their respective elevation.
- You can symbolize the data if your want, use the extrude tool in the "genTerrainGrid toolbox" to create a voxel representation or continue to the next step below to continue creating a watertight 3D Mesh.
![](/legacyfs/online/398471_pastedImage_1.png)
![](/legacyfs/online/398477_pastedImage_6.png)
- Run the "Convert 3D Grid to Multipatch" GP tool
- input the Grid3DPolygons from the previous tool and select the output location for the Multipatch Grid.
![](/legacyfs/online/398478_pastedImage_7.png)
- **Processing time will depend on the number of total polygons.
- The resulting data is a single MultiPatch feature.
- Lastly, if you want to place imagery on the final model you can do this by clipping the raster/s to the extent of the Grid3DMP feature
- Download the following CityEngine Project files here: texture3DGridCE.zip - Box
- In CityEngine Navigate to File --> Import:
![](/legacyfs/online/398481_pastedImage_1.png)
- Choose "Existing Projects into Workspace"
![](/legacyfs/online/398482_pastedImage_2.png)
- "Select Archive File" and Import the "texture3DGridCE.zip"
![](/legacyfs/online/398486_pastedImage_3.png)
- You will now see the "Texture3DGrid" Project in the "Navigator" panel in CityEngine
![](/legacyfs/online/398487_pastedImage_4.png)
- Either Create a new Scene or open the default "TestScene.cej" file.
- Select File--> Import --> File GDB Import
- navigate to your ArcGIS Pro project and import the file Geodatabase you saved the "Grid3DMP" file to.
![](/legacyfs/online/398489_pastedImage_6.png)
- Select only the Grid3DMP file or whatever you named the multipatch file and click Finish.
![](/legacyfs/online/398490_pastedImage_7.png)
- The Grid will be loaded into CityEngine.
![](/legacyfs/online/398491_pastedImage_8.png)
- With the Grid Still Selected navigate to "Shapes --> Cleanup Shapes"
![](/legacyfs/online/398492_pastedImage_9.png)
- Select only "Merge Vertices" and set the "Distance Tolerance" to slightly less than the geometry width or height depending on which is smaller. Also keep in mind CityEngine is in Metric so if your data is in feet you need multiply the value by 0.3048.
![](/legacyfs/online/398493_pastedImage_10.png)
- Click finish and your result will be as follows:
![](/legacyfs/online/398494_pastedImage_11.png)
- In some circumstances the distance between vertices is greater than the width of pixels. In these cases just manually select the vertice point, move it closer to the above point and re-run the cleanup shape process.
![](/legacyfs/online/398506_pastedImage_1.png)
![](/legacyfs/online/398514_pastedImage_3.png)
The Cityengine process above and below can also be automated with python scripting. We are looking to implement this soon.
- Texturing the Terrain in CityEngine.
- Copy your .tif or .jpg files you clipped rasters to from the previous process in ArcGIS Pro to the "maps" folder in your CityEngine Project.
![](/legacyfs/online/398496_pastedImage_2.png)
- Drag and Drop the Hillshade.tif file into the viewport but do not import the files. We just want to note the X size and Z size values. This is the Length and Width of the Raster.
![](/legacyfs/online/398497_pastedImage_3.png)
- Drag and Drop the "textureFeatureFromOrtho.cga" rule on the 3D model.
![](/legacyfs/online/398501_pastedImage_4.png)
- Click on the 3D Model and the procedural rule options will appear in the inspector
![](/legacyfs/online/398502_pastedImage_5.png)
- Update the raster height and raster width the raster width and height numbers you noted earlier (X, Z)
- Under the drop down next to "rasterLocation" use the "browse" option to select the raster you want to texture the model with. Be sure not to mix-up the rasterHeight and rasterWidth values or the image will tile several times on the geometry.
- The texture model should look as follows:
![](/legacyfs/online/398503_pastedImage_6.png)
![](/legacyfs/online/398505_pastedImage_1.png)
Exporting the Model for 3rd party programs, SceneLayer Package, or to GeoDatabase to migrate back to ArcGIS Pro.
- Select the model and go to File--> Export or select "Ctrl+E" to open the file export settings dialogue.
![](/legacyfs/online/398504_pastedImage_1.png)
- Select your format of choice and check your ideal settings and export the models
- The models by default will be placed in the "model" folder of your CityEngine Project.