Google Warehouse is a fantastic resource for free 3d models. And it’s especially fun to hunt for models of beautiful historical landmarks that you can pull into your own multiuser virtual world.
Today we’re going to bring a model of the Great Sphinx of Giza from Google Warehouse into a multiuser Jibe world using Unity3d. And we’ll script the Sphinx so it asks a riddle when any avatar walks up to it.
– Step 1: Find the Sphinx on Google Warehouse.
Finding cool things in Google Warehouse is easy. Just search for keywords and browse the thumbnail images until you see something interesting.
We’ve found our Sphinx! Click the Download Model button and download it as a Google Sketchup 7 file.
– Step 2: Convert the model to an FBX file using Google Sketchup Pro.
Now you’re probably wondering “Why not download a Collada file? Isn’t Collada a cross-platform standard for 3d models?”
Good question. You have the ability to pull Collada models into the Unity editor. But in practice, I’ve often found that the Collada models simply don’t import properly. In my experience, pulling an FBX file into the Unity editor works much more reliably.
Only the Pro version of Google Sketchup allows you to save models as FBX files. But that’s not a problem. If you download the trial version of Google Sketchup Pro, you can run it for a total of 8 hours of actual use. If you’re like me and are only using the trial version to open and export/save files, you’ll get a lot of use out of it before you have to pay for the upgrade.
So go ahead and open up the Sphinx model in Google Sketchup Pro, then use File > Export > 3D Model to save it in FBX format.
– Step 3: Pull the FBX model and texture file into Unity.
Find both the .fbx model file and the .jpg texture file for the exported Sphinx, and drag them both into your Project window in the Unity editor. Then drag the .fbx model from your Project window into the Scene window.
As you can see above, your Sphinx will initially be missing its texture. To fix this, just find the .jpg texture file in your Project window and drag it onto the Sphinx model in your Scene window. That will apply the texture to the model.
– Step 4: Make the Sphinx ask a riddle!
I explained in a previous blog post how to set up a basic Trigger in Unity that will cause a sound file to be played when an avatar walks into the area defined by an object. Please see that blog post for how to set up the trigger script. The only difference with the Sphinx is that we’re going to use a cube GameObject as the collider, and the sound file we’re going to play will be a recording of someone reading a riddle aloud.
Done! Use the Unity editor to build your webplayer file and upload it to your Jibe server. Now you have a giant realistic Sphinx that will ask a riddle whenever any avatar walks in front of it.
In my own Jibe world, the Sphinx’s riddle is one from The Hobbit (and the person reading the riddle aloud is J.R.R. Tolkien himself). Ancient Egypt / Middle Earth mashup.
Search the forest around my Jibe world for a magical flower garden. From there, you’ll see the Sphinx in the distance. I scaled the Sphinx up so that it’s accurately sized in relation to your avatar, so it’s pretty hard to miss.
There are many interesting models of historical landmarks in Google Warehouse. Try importing a few into your Jibe world to give your visitors something fun to discover!
-John “Pathfinder” Lester