Here are some basic instructions for converting/importing GIS building and terrain shapefile data into 3DS, Rhino, etc. This may not be the most elegant or efficient manner of conversion out there, but it does the job.
The process of converting GIS building and terrain data into a usable, 3D model, is a relatively simple (but not necessarily) straightforward task. The general idea is to use GIS data, including non-graphical data fields like ‘apex’ and ‘elevation,’ to create a 3D model that can later be edited with various 3D modeling software. For buildings, the method is to translate the building footprints (from the GIS shapefile), to their appropriate altitude (resting on the ground), then to extrude the footprints to their appropriate height (the apex of the building), and then export it all as a VRML geometry. For terrain, the method is to convert a contour map into a TIN (Triangulated Irregular Network), then to a Raster image, then back to a TIN, and then export it as VRML geometry.
- ArcGIS 9.1 or better (Specifically ArcMap and ArcScene)
- Modeling software that can import VRML (such as Autodesk’s 3DSMax or McNeel’s Rhino)
- The GIS shapefiles for the buildings and terrain which you want to model (contour maps will work).
You may want to try the following tutorial using this sample data, to get the hang of the process before you try another site.
- Download the sample data in the archive listed above.
- Decompress the .ZIP into a convenient location (such as a “temp” folder on the desktop).
- OPEN ArcMap 9.1 or better.
- Click the Add Data button.
- In the Add Data dialog box, highlight and select both building_sample.shp and contour_sample.shp. Both of these shapefiles will be added to the Layers Manager (on the left of the screen) and appear in the main viewing window. You may want to drag the buildings_sample layer above the contour_sample layer so that the buildings appear above the contour lines:
- CROP. You may notice that the area in question is rather large. For most purposes, you will want to crop out an area and throw away the rest. If possible, it is best to divide large areas into smaller “chunks,” so that process of exporting and importing the VRML (see below) is manageable (WARNING: large geometries make very large VRML files). For this example, we will focus on the campus and crop out the rest of the neighborhood.
- Click on the contour_sample layer. Use the selection tool to highlight the areas you want to save into a separate shapefile, and then right-click the layer name in the layers browser.
- Under the ‘Data’ menu, select ‘Export Data.’ Give the shapefile a new, more recognizable name (such as contour_crop, and then save.) When prompted, add the new layer to the current map and remove the old contour_sample layer (right-click the layer name and then Remove).
- Now click on the building_sample layer. This time, you can select only the buildings that intersect the contour lines. Under the Selection Menu, click Select By Location. In the Selection By Location menu, select features from the building_sample layer that intersect the features in the contour_crop layer. Once the buildings are selected, simply repeat the ‘Export Data’ instructions in step 2. (above).
- Repeat this process with each layer you wish to work with (if you are doing only buildings and terrain, then you only need to do this twice.) It is important that each layer be saved separately into a shapefile (for this example, terrain in one shapefile, building footprints in another). By this point you should have a map that looks something like this…
- CLOSE ArcMap. (You may want to save the map, but all you really need are the shapefiles you just created).
- OPEN ArcScene 9.1 or better.
- As in 4. (above), click the Add Data Button. This time, only add the cropped shapefiles (building_crop.shp and contour_crop.shp) to the Scene. [graphic] You should see something like this [graphic]
- CONVERT TERRAIN TO 3D. We’ll begin with the terrain. This process is a bit tricky. The general idea is to convert the contour lines to a TIN (Triangulated Irregular Network) and then to a VRML file. However, simply converting to a TIN with ArcScene produces overly detailed geometries in which every point on every contour is connect to every other contour line. This is unnecessary, but there is a workaround which requires converting the contour to a TIN, then to a Raster format, then back to a TIN, in the process loosing some of the detail, but preserving the terrain characteristics…
- Verify that the 3D Analyst Toolbar is turned on.
- Click and highlight the contour_crop layer in the Scene Layers manager on the left.
- Under the 3D Analyst Toolbar, under “Create/Modify TIN,” select “Create TIN from Features.”
- In the Create TIN from Features menu, check the contour_crop layer, verify that the Height source is set to ELEV, and give the tin a new name (such as contour_tin1).
- The resulting TIN should appear in the Scene. Remove the old contour_crop layer from the Scene (right-click on the layer name and select Remove).
- Click and highlight the contour_tin1 layer in the Scene Layers manager.
- Under the 3D Analyst Toolbar, under “Convert,” select “TIN to Raster.”
- In the Convert TIN to Raster menu, set the Cell size to a setting that gives a reasonable number of Rows and Columns. There is no hard and fast rule for this, but something that is under 1000 Rows and 1000 Columns is safe. Generally speaking, the smaller the cell size, the more detailed the terrain. Next, give the new raster layer a name (such as contour_rast).
- The resulting Raster image should appear in the Scene. Remove the old contour_tin1 TIN from the Scene (right-click on the layer name and select Remove).
- Click and highlight the contour_rast layer in the Scene Layers manager.
- Under the 3D Analyst Toolbar, under “Convert,” select “Raster to TIN.”
- In the Convert Raster to TIN menu, set the Z tolerance to a reasonable setting…again, there is no hard and fast rule for this, but something that is between 5 and 10 ought to work. The smaller the Z unit value, the more points in the TIN. Next, give the new TIN layer a name (such as contour_tin2).
- The resulting TIN should appear in the Scene. Thought this TIN is less detailed version of the original contour, the features should be accurate enough for terrain modeling. It is possible, however, to apply some smoothing to the terrain surface in 3DstudioMax, Rhino, etc., after the conversion process.
- Remove the old contour_rast layer from the Scene (right-click on the layer name and select Remove).
- CONVERT BUILDINGS TO 3D. Now on to the buildings. Compared to the terrain, this process should be more straightforward.
- Right-click the building_crop layer in the Scene Layers manager on the left. From the menu, select Properties.
- In the Layer Properties menu, click the “Base Heights” tab.
- Under Height, select the second radio button option “Obtain heights for layer from surface.” Verify that the contour_tin2 (the terrain TIN) surface appears in the path below. This will move the building footprint base heights up to the surface of the terrain.
- In the Layer Properties menu, click the “Extrusion” tab.
- Check the box in the upper-left to turn on “Extrusion.” Under “Extrusion value or expression:” enter in [APEX]. Apply the extrusion by “using it” (in this case, [APEX]) “as a value that features are extruded to.” This extrudes each building footprint up to the stored [APEX] height in the shapefile. Click Apply.
- Your resulting Scene should look something like this:
- EXPORT EVERYTHING TO VRML. Once you have the Scene how you like it, you can export it to a VRML file. It is important that you export both the buildings and terrain as separate VRML files. This is a simple process…
- Export the buildings. Check the box next to the terrain layer in the Scene layers manager to hide the terrain. Only the buildings should be visible.
- In the File menu, under “Export Scene,” select “3D”.
- Export the buildings as a VRML file (.WRL extension).
- Now turn the terrain layer back on (check the box in the Scene layers manager), and turn off the buildings, and repeat the Export steps above (2. and 3.) for the terrain.
- NOTE: depending on the complexity of the scene (number of vertices), the conversion to VRML may take some time. However, if you cropped the scene as outlined here, and made sure the Cell sizes and Z tolerance on the terrain conversion (see steps 10.8 and 10.12 above) are set to a reasonable value, this should not take more than a few moments (depending on the machine you are using).
- IMPORT INTO MODELING SOFTWARE. Depending on which modeling software you choose to use, the process for importing the VRML files varies accordingly. In 3DstudioMax, you simply choose “Import” from the File menu, and import each of the .WRL models separately and merge them into one scene.
- APPLY MODIFIERS. Depending on which modeling software you choose, you may need to apply some modifiers to get the buildings and terrain to display correctly. For example, in 3DS, the imported terrain may have normals that point the wrong direction. This is an easy fix, just select the Normals modifier from the Modifier panel to flip them around. The imported buildings may also require that you apply the “Cap Holes” modifier to fill in any holes in the geometry as a result of the VRML conversion.
- SUCCESS! (Hopefully!) You’ve finished the conversion process. You might notice that, as expected, the buildings all form one giant geometry, making it difficult to drag individual buildings around. This is a minor inconvenience, but you can work around this by converting the building geometry to an Editable Poly, and then selecting each building and moving it around within the scene. Happy modeling.