Monday, August 16, 2010

Building Virtual JHU

So, how do we make all those buildings you see in Virtual JHU? Here's a quick run-down:

The primary 3D modeling program we use is Google Sketchup. Sketchup is convenient for a couple reasons. For one thing, there's a basic version that you can download for free. (Right now we're using the Pro version, which you have to pay for.) Unlike other 3D modeling programs, learning Sketchup is pretty easy, and it is remarkably powerful given how easy it is to use. The other thing that's nice about Sketchup is that it integrates very well with Google Earth, which is what we're using to present Virtual JHU. If you're interested in 3D modeling at all, I highly recommend getting started with Sketchup. Google has also come out with a tool called Building Maker, which is the quickest way to make buildings for Google Earth.

The first step for modeling any building for Virtual JHU is getting the floor plans. We are deeply indebted to the Office of Facilities Management for providing floor plans to us for Virtual JHU. Once we have the CAD drawings for each floor, we import them into separate Sketchup files. (The ability to import .dwg files is only offered in Sketchup Pro now.) We then pull up the walls outlined in the 2D floor plans to create a basic model of the floor, finishing by adding a floor slab underneath.

Once we have made models for each individual floor we stack them on top of each other in a single Sketchup file. Then we make a roof for the model based on photographs, first-hand observations, and (sometimes) measurements. At that point we've built a model that looks roughly like the real building (except very plain).

The next step is to begin photo-texturing the model. When we started modeling the buildings currently in Virtual JHU we took photos of each individual feature of the building (windows, doors, brick, etc.), used Photoshop to crop them, and then positioned them on the model in Sketchup, tiling materials like brick and marble siding as necessary.

This process resulted in models that were high in detail, but also in file size and are a drag on users' graphics cards. That's one of the reasons we have to continue to work on increasing the performance of Virtual JHU.

To help with performance, one of our programmers wrote a script that removed interior geometry from the Sketchup models, enabling us to present exterior-only versions for all the buildings (until you "open up" a building to see its individual floors). The script caused some issues with some of the models, damaging their materials. (You can notice some pretty significant issues with some of the buildings.)

To solve this problem, now once we have a building stacked we create a shell made of simple planes, on which to apply the textures. This reduces the geometry in the exterior-only versions of the models without having to use the "gutting" script. We have also been trying to use lower-resolution imagery that isn't quite as detailed.

So there you go, that's how we make our models in a nutshell. I'll leave other parts of Virtual JHU to another post. If you have any comments or suggestions, we'd love to hear them.

No comments:

Post a Comment