From ArcMap to 3d Studio Max
This page is the beginning of a tutorial on one way to get data out of ArcGIS into 3d Studio Max. This overall procedure will take us through several intermediate steps that are interesting in their own right and useful for other purposes:
- How to adjust the coordinate system of an ArcMap project to transform data into a 3dStudio-friendly coordinate system
- How to extract contours from a raster digital terrain model
- How to simplify contours by generailzing line geometry and selectively thinning the contour interval in the non-focus area.
- How to export contours to DWG format with elevations.
- Terrain Modeling in 3dStudio using contour data
- Importing building roof-prints into 3dStudio and extruding them en-masse.
Explore the Data
Right-CLick here to open this zip archive of tutorial data and extract the contents to a folder named Arb on your c:\temp drive. Our dataset is based on a very detailed, 1-meter pixel elevation model from MassGIS, and a color ortho-photo whose pixels correspond with 8 inches on the ground. We also have building footprints frm MassGIS, and these have attribures for their roof and ground-level elevations. This is unusually good data, but is probably characteristic of the best urban terrain data available today, and typical of what will be avaialble in other cities over the next decade or so. For fun, you can open the ArcGlobe document in this folder and explore this detailed 3d data.
Think about Coordinate Systems
The coordinate system of our data from MassGIS is the Massachusetts State Plane Coordinate System with units expressed in Meters. This coordinate system covers the entire state of Massachusetts, and therefore the origin is in Pennsylvania somewhere. This makes the coordinate numbers in Boston very large. 3DStudio Max is a program that has finite room in its model space. The next few steps will help us to understand this problem, and fix our ArcMap document so that the data we export from it will be shifted much closer to the origin. By making this adjustment in ArcMap, it will be repeatable and we can continue to take data from ArcGIS and move it in georeferenced form into 3dMax. This is much better than the more common technique of arbitrarily shifting the data in CAD or 3ds.
- Open the ArcMap1.mxd dataset, and examine the coordinate units at the bottom right corner of your window. Large numbers.
- Think about coordinate systems: lets open 3d Studio and set up the units in a new in a new 3ds document. Use Customize->Units Setup to set up a document that will have a metric scale with units as meters, then set up the System Units to use Meters, and to respect units when importing. Note the informative slider here that lets us know that the precision of our 3ds document will fall off if we have geometry that is very far from the origin of the coordinate system.
- Back in ArcMap, we take a look at the current coordinates being used to display our data -- too big. In our Data Frame Proeprties modify the coordinate system properties, Changing the False Easting to 0, and the False Northing to -143000. This basically shifts our coordinates closer to the origin. Note that this does not shift the inherent coordinates of our data! It only sets up a convenient way of displaying the data, which we can apply to information that we export.
Creating Contours from Raster Data and Simplifying Them
3D Studio has a good tutorial about creating terrain surfaces which starts with importing contouts from a DWG file. So we will attempt to create such a file. Our esperience with terrain models in Max is that these models can contain so many faces that they can bring max to its knees, even before we have added trees and buildings and such. So one of our concerns will be to weed out extraneous vertices from our contours, and to thin out the contour interval in areas that we aren't so concerned about. These functions will highlight some of the advantages of storing our raw data in a versitale GIS.
- Now, we will zoom to our area of interest area that contains the dog pond, the rose garden and a piece of the Veterans Administration Hospital compound.
- Our goal is to capture some terrain data from our LIDAR Bare-Earth raster with postings every meter. It would be cool if we could take this raster directly into 3ds, but we can't. 3ds just wants contour data. So, lets use the 3dAnalyst->Raster Surface->Contour tool to create some contours. After trying some different settings, we settle on a contour interval of 0.5 meters, because this captures information about the flower beds. Note! we don't want to create a terrain model of the entire arboretum! In order to control our fucus, we will make sure to set the Envirnment Settings in our contour wizard so that our Output Coordinate System and our Output Extent the same as display (which is limited to just the rose garden the Dog Pond and the VA hospital.
- These contours are decent, but we know that every vertex will form
the corner of a face in our final model, so we want to simplify it.
First, we will weed out needless contours that are outside of our
area of interest. This is a 3 step process:
- Select the contours in the rose garden
- Then use Selection->Attribute Selection to Add to Selected Set where Mod("CONTOUR",2) = 0 This is a way of seelcting any contour whose Elevation is evenly divisible by two.
- Take a look at the generalized contours, but make sure to return to your exact clip extent, because we still need to export our image.
Exporting GIS Data to CAD
OK, now we have some contours that are fit for making a terrain model. There is one more thing to do. Our data is organized as shape files, but 3dMax wants a dwg firmat file. This is a little complicated by the fact that DWG format has very limited and highly structured means of storing attributes for geometric entities. In particular, we want the elevation of our contours to be transferred apropriately to DWG. To do this we have to add a few more columns to our attribute table, and calculating some values. After this, the export to CAD is straightforeward.
- To prepare our data for export to CAD, we need to use the COnversion->To CAD->Add CAD Fields tool to add a set of Entity Attributes to the table of our simplified line features.
- We will then open the attribute table, and use Calculate Values
to set the value for the Elevation attribute to equal the
value found in CONTOUR for each row. Make suere that no
rows are selcted when you do this.
- Now we will use the Export to CAD tool to create a dwg format file for our contours.
- To export our buildings, we should first select the buildings within our clip extent, then export these shapes using the same coordinate system as the data frame. Then we will Add CAD Attributes as we did for our contours, setting Elevation to be the same as the value for the Roof attribute for each layer.
- For our last ArcMap trick, we will export our georeferenced ortho image, having exactly the same extent as our curretn display -- which should match the extent of our contours exactly -- this will save us a lot of grief later. Right-click your airphoto layer and use Data Export to export your image eithin the current view extent. Make sure your output file has a .tif format.
And now to 3d Studio
- Use FIle->Import to import the DWG file for your simplified contours. Make sure that you Scale Objects and to specify that your Input Units are Meters.
- The steps for creating a terrain model and draping an image, are described in the 3ds Help->Tutorials which can be found in the index under Terrain. You will find even more detail for terrain options under the online Help->User Reference