Beginning a 3d Site Model in Sketchup Using Data from ArcGIS
This tutorial is the third in a series begining with Exploring Site Context in 3d using ArcGlobe which shows how readily available data from various sources may be brought together and viewed in 3d to better understand sites and their context, and to communicate important aspects of this understanding with others. The second tutorial, Basic Terrain Modeling in ArcGIS demonstrates how we can create and modify models of terrain surfaces, which gets us beyond merely representing existing conditions using other people's data, to designing our own scenarios, which can be loaded into ArcGlobe, and viewed in 3d with extruded buildings (which we can create) or ArcGlobe's 3d symbols representing trees and buildings.
We are now able to represent a substantial amount concerning our sites -- how things look from different perspectives, and how terrain modifications impact views and slopes and volumes. Yet there are many site systems that we are yet unable to represent: How do our buildings and trees and landforms interact with sunlight -- to cast shadows, for example. We may want more control over our three dimensional buildings than we can get from extrusion of polygons or generic symbols, and we may want to be able to cut sections of our landforms and buildings. All odf these things are difficult-to-impossible to do in GIS, so we will look to a new class of tools especially made for modeling and manipulating three dimensional forms.
There are many three dimensional modeling tools that provide the basic functions that we are looking for -- to be able to model three dimensional forms, to color surfaces with image textures, and to model shadows -- our aim is to understand these basic means or representation and analysis and how we can apply them in the context of a real site. For this introduction we have chosen a simple tool called Sketchup. Sketchup has advantages of having an extrordinarily simple interface for a 3d modeling package, and a comparitively smooth pathway for getting site data from the GIS package which, as we have seen, provides a good vessel for bringing together site data and modeling terrain.
Prerequisite: Google Sketchup Basics
Our previous tutorial, The Google Earth Train Set (at the bottlom) introduced the fundamental references and operations for Interoperating with Sketchup and Google Earth, and basic modeling in Sketchup. We won't repeat the narrative about how to build a trolly-car here, but for your convenience here is a list of the operations that you should have already practiced. In this tutorial we will simply refer to the procedures documented in these references:
- The first 12 Video Tutorials
- Gety Google Earth Current View
- Make a New Layer
- Draw Tool
- Using INferences
- Push Pull Tool
- Value Control Box
- Texture-Mapping Images to Objects
- Using Projected Textures
- Working with Components
- Use the Rotate Tool
- Use the Move Tool
Prerequisite: ArcMap Basics
Sketchup is way ahead of the competition with regard to making use of geospatial coordinate referencing systems. The ability of sketchup to exchange data with Google Earth makes virtually transparent the issues of building 3d models in proper geographic space! The drawback is that we are restricted in our ability to use any terrain model except for that provided by Google and the ground-plan images that we can take out are limited in their resolution and restricted to black and white. THis is what makes us appreciate the Sketchup interoperability with ArcMap. This tutorial takes for granetd an assumption that you understand these basic GIS tasks and concepts:
- Understand the basics of GIS data and their attributes
- How to capture a geographically referenced image from ArcMap.
- how to make a trangulated mesh terrain model or TIN
In this series of tutorials, you may have arrived with these capabilities ou may have arrived at these capabilities through a couple of pathways: The tutorial, Capturing 3d Models form the GSD Metropolitan Model Repository provides a fairly easy pathway that will yield all of the required data for making 3d models from the MassGIS LIDAR Survey.
Or you may be coming from the series of tutorials that cover:
- Organizing and Managing GIS Data
- Obtaining Terrain Data from the Web
- Terrain Modeling in ArcMap
- Visualizing Broad Scale Site Terrain and Massing Scenarios
The Tutorial Dataset
We will use the same tutorial dataset for this demo that we have been developing in the three tutorials referenced above. Click Here to download this tutorial dataset. Open the stb_sox.mxd file from the docs folder. There are three or four layers in this project that it is necessary to understand before continuing.
|
Our goal is to transfer our
site context model from GIS into Sketchup. In particular, we will work
with the following components:
|
|
Explore the Basic Data
- Take a look at the triangulated irregular network, stbsox_tin_1. THis represents the terrain, including some proposed modifications we have made.
- Examine the attributes table of mundi_buildings this polygon featureclass was derived frm a CAD file, that we georeferenced. If you look at the attributes, you will see that each polygon has an attribute for the height of the building roof above the ground, and the elevation of the footprint.
- Examine the attributes of the polygon featureclass my_buildings it has some buildings that we created to model a baseball park scenario. These, too have their foot height and their roof height.
- Take a look at the image, pawsox_perks_clipped this is an image that we took from the Pawtucket Redsox Web Site, and georeferenced, after erasing a lot of the background.
- You can look at the other layers, such as contours, etc that make up our basic groundplan.
- Notice that we have melded this ground plan all together in a single georeferenced image, stb_sox1_groudplan.jpg This georeferenced image is important as a groundplan reference image in sketchup.
Moving Terrain Models, Georeferenced Images and Extruded Buildings from ArcGIS
The meat of this tutorial will be setting the stage for our modeling and analytical project by importing important contextual information from ArcGIS into sketchup. Then we can do some of the same simple modeling experiments on the site model that we have been developing in GIS. THe next tutorial will discuss the more complicated issues of modeling on terrain in sketchup.
Install the Sketchup Plugin for ArcGIS
You will find sketchup installed on all of the public computers at the GSD, but because of peculiarities of the sketchup arcgis plugin, each user must install the ArcGIS plugin on the computer and load the special sketchup tool into ArcGIS. The resources and instructions for installing Sketcup and the ESRI ArcGIS plugin are available in the GSD software directory L:\public\software\winapps\sketchup\sketchup6/arcgis_plugin. If you are using a lab machine the only thing you need to do is load the sketchup plugin into ArcGIS.
Loading the Sketchup plugin to ArcGIS
- Choose Tools->Customize
- Click the Toolbars tab at the top of the customize dialog then click Add from File button.
- Find the place on your computer where you installed the sketchup plugin files -- which on public computers is c:\program files\arcgis\Sketchup6
- Choose the file, FeaturesToSkp.dll
- You will now have an option in your toolbars menu for the Sketchup tools. Check it and the sketchup toolbar will appear.
Exporting your Site Model Components to Sketchup
So, there is a lot of value in this building data and terrain data that we have in GIS. In this case we have built our own terrain model. In other cases we may want to import a model of the existing condition that we can get for free on the web from the US Geological Survey -- see Obtaining Digital Terrain Models from the Web these raster elevatioin models can be quickly turned into TINs using the Raster to Tin
In this case though, we have already have a TIN and some building polygons. It is suprisingly easy to get this data into sketchup as 3d buildings and 3d terrain. Accomplishing the same transfer between any other GIS package and any other 3d package is nearly impossible. We hope that the other vendors will figure this out, soon! For reasons that will become clear later, we also want to export the rectangle that defines our site boundary. The following steps will accomplish this task:
Exporting 3d Data to Sketchup
- IT IS CRITICAL THAT YOU HAVE THE 3D Analyst Extension loaded before you do this! Choose Tools->Extensions and check the box next to 3D Analyst.
- Zoom to your TIN layer so that you can see your eintire model.
- Use Selection->Clear Selected Features to make sure that nothing is selected.
- Now use the select tool to select all of the buildings in each of your buildings layers within the extent of your TIN.
- Now click the button on your sketchup toobar.
- In the dialog that appears you will have a list of layers that includes your buildings and your boundary. click mundi_Buildings
- Below the layer list there is a set of Feature Class Export Options These are how you tell sketchup the 3d properties of your buildings.
- Set your Extrude Distance Field to be the Roof_height attribute for each building.
- Set your Offset Field to reference the ground height in the same units as are used in your terrain model.
- repeat the three steps above, for the my_buildings layer.
- In the TIN panel of your sketchup export dialog, find your TIN model and uncheck the Exclude option.
- In the Raster Tab, select the groundplan image, uncheck the Exclude option, and choose JPEG format so that the sketchup plugin doesn't have to convert the format of thhe image. Make sure Exclude is Checked on the other images in this project.
- Go back to the Feature Classes Tab, and fill in the filename and location where you want the sketchup model to be placed.
- Now click the OK button. and leve checked the option to launch sketchup automatically.
- If you get an error at this step it is because you didn't load the 3d analyst extension. Go back to step 1!
- Now Sketchup will start, probably with annoying tip that you can dismiss.
- The viewer looks empty, but if you click the Zoom Extents Tool, a magnifying glass with red spots around it at the bottopm left of your screen, you will see the model.
- If the viewer is stil empty, you may need to use File->Open in Sketchup to
- Use the rotate tool to roll it into a perspective 3d view.
Congratulations, your site model has just passed from two-and-a-half dimensionnal world of GIS into three-dimensional modeling world!
Exploring and Finishing your Sketchup Site Representation
Making the transition from ArcGIS to sketchup means that we have some new interfaces and models for data organization to learn. Our goal in this is to have greater flexibility in creating more realistic 3d geometry, and to have better representation of light and shadow, so it will be worh it. What we learn about Layers, Components, Textures, and Shadows will carry over, to a large degree, to other 3d modeling interfaces we might encounter.
|
Appreciate the Simplicity of our Terrain Model
Before we go on, it is useful to take a look at the way our terrain model is put together. One of the important things about working with terrain in sketchup is that it is very easy to make a terrain model that has far too many faces than are necessary. This will cause lots of problems of sluggishness in virtually everything you do. Particularly if you are casting shadows on the terrain surface.
- Look at the seawall from the river. Imagine how many faces would be drawn in this seawall if we had not taken care in our terrain modeling exercise, to simplify our contours.
- Zoom in on the parking lot behind the Save the Bay headquarters. Note how the detailed terrain modeling we did, in order to communicate the crritical aspects of the drainage are reflected here, and there are a lot of triangles
Draping the Image on your Terrain Model
The last step in getting our site model set up is to get the image draped onto the terrain and to smooth the terrain surface. We will begin other things. Then we will select the Raster image and shange its texture properties to Projected Then we will select all the faces of our terrain model, and apply the image texture to them.
Do the Drape
- Turn off visibility on all layers except your Raster layer.
- Select the Raster and notice it is grouped. Double-click so that you can select the Raster face inside the group.
- Right-click your image, and choose Texture->Projected
- Grab he Paint Bucket tool hold down the ALT key (beside your spacebar revealing the Eyedropper Tool.
- Click on the image to extract its texture.
- Now turn off the Raster layer and turn on the TIN layer.
- Triple-click the land surface to select all connnected geometry.
- Grab the paint-bucket tool and click on the terrain. The image should now project onto the terrain.
- Turn off all of your layers and turn them on one at a time to see that you still have the image, and everything else, safely on all of the apropriate layers.
About Smoothing and Surface Normals
Our terrain is made up of triangular faces. Our concern has always been to control their shape and number. We especially want to keep the numbers of triangles low, and to avoid long, acute triangles. But this comes at an expense of having these large distinct facets that are obviusly not smooth,organic looking terrain. Well understanding how surfaces are shaded according to Surface Normals we can learn a neat trick for making our preserving our anatomically correct, geometrically efficient, faceted model appear smooth!
All three-dimensional modeling tools incorporate the idea of using the normals of a surface to calculate the shading intensity. That is, the amount that a face gets shaded, depends on the orientation of the face relative to the direction of the light source. The orientation of the face s established by finding its normal -- which is a formal geometry term which means perpendicular line. In many programs, the normals of a surface only project from one side, which means you can't even see faces from the other side at all! Sketchup shoots normals from bothj sides of faces to allay the panic and confusion that hits usres when their polygons disappear.
The cool thing about this way of modeling light and shading is that even though you have a flat planar face, ther is no reason you can't trick the shader, by averaging the angles of the normals on neighboring faces. This makes the shading appear smoother! This is something that all 3d pachages do.
Smooth your Normals
- In sketchup you can do this on your terrain surface by triple-clicking on it,
- and then choose Soften/Smooth Edges. I suggest using the Smooth Coplanar option.
Important Note about Sketchup and models imported using with the ARCGIS Plugin: There is a problem with sketchup5. The effect of this is that while in a normal sketchup model that you are building from scratch, you would set the location parameters in Window->Model->Info->Location or in the parameter settings found off of the hadows dialog, >In the case of sketchup models exported from ArcGIS, you should not adjust the location parameters. Leave your location set to Boulder. The exact location of your site with regard to the sun and the earth's axis IS somehow encoded in your model, and in the next version of the sketchup arcGIS plugin, the set location options will be locked. I beleive that overriding this ansd setting your location to Providence will probably still result in astronomically correct shadows, the problem comes when or if you try to export georeferenced sketchup components back into ArcGIS.
More Sketchup Fun
Now we will llearn some of the basic navigation in sketchup and learn to make perspective views, animations and shadow studies. The first thing we will do is look at the layer structure of our model. The words highligted in bold in the practice steps should be looked up in the sketchup online help.
- Practice orbiting, zooming and panning using your mouse scroll wheel and left button. This is very important to be able to do this without taking your hand off of the mouse.
- Look at your Layers Window and practice turning layers on and off.
- Use the Components Browser to place a person on home plate in the baseball field.
- Zoom back a little bit, and orbit, pivoting on the eye of your person. Take a look at the view of the tank.
- Use your Scenes window to save perspective scenes looking at the tank and at the hill.
- Place a person on the hill and look into the baseball park and save perspectives looking into the ballpark, and lookng at the tank.
- View the Animation Accross your Scenes.
3D Textured geometry in Sketchup
A couple of the neat things you can do with sketchup that you can't do in ArcGIS, is to create geometric forms that have nearly any sort of shape that you want, and you can paint them with colors and image textures. Lets put a Citgo Sign on the top of the tank.
- Use the Draw Tool and Inferences to Make a long footprint for the sign on top of the tank and pull it up with the Push-Pull tool.
- It is worth noting while doing this that you have much more control over the location of your line endpoints when you are close. YOu always have to use the scrol wheel to keep your view close to what you are drawing, or you will become frustrated!
- YOu will find a citgo sign image in the stb_sox/gis/pbcote/data/stb_sox folder. Import this image as a Texture and Position the Texture on the face of the box using the Floating Pins
Dealing with Groups and Layers
In this section,
- make a new layer for People, and
- move your person to it using Entity Info.
- Triple click on the citgo sign and make it a group, name the group, Citgo sign.
- Make a layer for the group, and move the sign into that group.
- Double-click the group to access the entities within the group. What layer are they on?
- Note that the entities in a group are not necessarily in the same layer as the group itself! If you don;t understand the potential consequenses of this, then you will inevitably become very confused layer when parts of your model seem to dissapear for seamingly no reason. Layer 0 is a good place to store all of your primitive entities, while the visibility of groups of primitives is controlled with layers. This takes a little bit of thought to understand, but it is well worth the effort!
Export your Citgo Sign to a ESRI MultiPatch
One thing about the layers and groups metaphor of sketchup has some critical differences with the tables, rows and attributes model of ArcGIS. We don't have time to go into it right now, but the sketchup's object->layer model is better for free-form design, and the relational->tables model is better for managing lots of data in a way that can scale to very large collections of diferentiated objects in such a way that it does not become awkward and overburdened. WIth this in mind, we can be glad that we can design 3d objects in Sketchup and then export them to a GeoDatabase table as a featureclass, and then take advantage of a scaleble data management interface!
We can't pass up this opportunity to note how cool it is that the spatial referencing on these objects causes them to sit in the right place in arcglobe, and we can also export them to Google Earth as well!
- Select the citgo sign group (note that this does not work with components at SKP version 6)
- Choose File->Export to export the group to an ESRI Multipatch
- Name the new geodatabase stb_sox_yourinitials and save it with the rest of our stb_sox data.
- When proimpted, create a new featureclass called fieldspoint_a to hold the objects that are part of our scheme A.
- Save your citgo sign in there.
- Also save your citgo sign as a Google Earth KMX file.
- Now open these datasets in ArcGlobe and in Google Earth.
Now, how do you like that?


