The Source for Java Technology Collaboration


Home | Changes | Index | Search | Go

Building a Project Wonderland World from Scratch (tutorial)

by Nicole Yankelovich (nicoley@dev.java.net)

Purpose

This tutorial is for people who would like to create their own Wonderland worlds. To create a world from scratch, it is not necessary to be an artist or a programmer. You will, however, need to learn some basic Wonderland system administration skills.

The key ideas we'll focus on in this tutorial are setting up an empty Wonderland world, importing content into the world, arranging the content, and saving your work. Once you complete this tutorial, you should be able to start up a Wonderland server, add and arrange content, and save and restore different worlds.

Prerequisites

Here's what you will need to complete this tutorial:

  • Access to a computer that can run a Wonderland server
  • System administration access to the Wonderland server
  • Wonderland v0.5, Preview1 or later - download binaries)
  • A computer that will run the Wonderland 0.5 client (can be the same machine that is running the server)
  • Access to the Google 3D Warehouse

Setting up Your Wonderland System

If you already have a Wonderland server up and running you can skip this section. If not, carefully follow the instructions on the binary downloads page to set up your environment:

Project Wonderland v0.5 Binary Downloads

To run the client, follow these instructions:

Launching Wonderland Clients using Java Web Start

Starting with an Empty World

Once you have determined that your server is working and you can connect a client to the server, quit out of the client and return to the Wonderland launch page:

Click on the Server Admin button to access the Server Administration Console. If someone other than you set up the server, you may need a password to access this section of the web site. Next, click on the "Manage Worlds" (older versions may say "Manage Snapshots") link in the left navigation pane. You should now see the four default "Initial Worlds":

If you're using a shared server, you may also see some Snapshots, otherwise, this section will be empty.

Make sure there are no users currently connected to the Wonderland server before following the next instruction.

In the "Initial Worlds" table, click on the Empty World "make current" or "restore" link in the Actions column. It will say "restore" if the Empty World is already current and "make current" if some other world is running instead. You should now see a message about restarting the Darkstar server:

Click "OK" to confirm the action, and then click on the "Manage Server" link in the navigation pane.

You will see in the "Status" column that it says the Darkstar server is "Starting Up." Wait until the status is "Running" and then click on the Home link in the navigation pane. Start up the Wonderland client by clicking on the orange Launch button. You should now see a world with only a sky.

This is purely a personal preference, but notice that I'm using the default cartoon avatar rather than my regular high-fidelity avatar. I switch to this avatar while world building since I tend to hop in and out of the world frequently and this avatar is quicker to load than the high-fidelity one.

Adding the Essentials

Empty Wonderland worlds come with only a sky. To help you get started with the bare essentials, we have created some collections of models in the Google 3D Warehouse. These collections are constantly growing and changing, so you may find more models than described here. Start by navigating to the 3D Warehouse home page:

Google 3D Warehouse home page

In the search box, type "Wonderland" and select "Collections" from the drop down menu. Then click "Search." You should see results similar to this.

Click on the collection called "Floors for Project Wonderland." Find the floor called "Stovepipe Sand Floor - 120m Circle" and click on it. On the Stovepipe Sand Floor page, click "Download Model." Then click on the "Download 70 kb" link next to the "Google Earth 4 (.kmz")" entry.

Save the .kmz file on your computer in a place you can get to it easily, perhaps creating a "3D Models" folder. Now navigate back to your collection search results and click on "Skylines for Project Wonderland." Find the one called "Stovepipe Dune Skyline - 120m" which coordinates with the floor you have just downloaded. Download the .kmz file for this skyline model and save it on your computer in the same place as the floor model. Find the two files you have just downloaded, and activate your Wonderland window with the empty world. Use the Placemarks menu to navigate to the Starting Location.

This ensures that you are going to load your models while standing in the exact center of your empty world. Now drag and drop the "Stovepipe Sand Floor - 120m Circle" into the Wonderland window.

You should now see your avatar standing on a sand floor.

Note: If you are on a Mac, you may get an error the first time you try to drag and drop. Just click ok and try again. Drag and drop should work fine after the error occurs.

Next, without moving your avatar, drag and drop the skyline you downloaded. You should now see a scene like this one:

Adjusting the Positioning

It's important to make sure that the ground is at ground level and that the skyline is properly positioned with respect to the ground. Right click on the ground and select "Edit" from the context menu. The editing tool palette will open. Click on the "Details" button. The "Y" position of the ground should be zero. If it's not, set it to zero. While not strictly necessary, I always like to make sure my ground is centered in the world, so I also set the "X" and "Z" positions to zero.

     

Next, right click on the dunes and select edit (see Details pane on right above). Notice how the title changes in the edit tool palette to let you know which model you are currently working on. In the Details pane, click on the up arrow to adjust the "Y" position. I usually raise the skyline up until I can see sky between the ground and skyline.

Then I lower it until the two surfaces meet. Finally, I set the "X" and "Z" position to zero so that the ground and skyline are perfectly centered.

In general, using the Details pane is the best way to position large models in the world.

Adjusting the Lighting

When models such as this floor and skyline are created using Google SketchUp, they often come into Wonderland looking dark. This is because Wonderland uses a different lighting scheme than SketchUp. For most SketchUp models, you will want to turn off the Wonderland lighting and use the native lighting. To do this for the floor, right click on the sand and select "Properties..." from the context menu.

When the Properties dialog opens, click on the "Model Component" item in the Capabilities pane. Then uncheck "Lighting Enabled" and click "Apply."

Your scene should now be considerably brighter.

You may, of course, have a personal preference for a darker floor or darker skyline. In this case, simply check the box again in the property sheet and click "Apply." If you are inspired to create your own skyline using SketchUp, this blog post outlines the steps:

How to Make a Skyline for Wonderland

Adding Content

You now have a bare bones virtual world with a ground plane and a skyline and are ready to add additional content. Using the steps outlined above, you should be able to populate your world with more models that you find in the 3D Warehouse. Refer to the following blog post for tips on how to find SketchUp models that are most likely to perform well in Wonderland:

Tips for Using SketchUp Models in Wonderland

This post also refers to an excellent guide on how to create your own SketchUp models that will perform well in a real-time environment such as Wonderland:

Modeling a City (PDF)

In addition to 3D models, there are other types of content you may wish to add your world. Select Insert --> Component to view a list of 2D and 3D applications installed on your Wonderland server.

You might consider, for example, adding one or two "Whiteboard (SVG)" applications or perhaps some "Sticky Notes."

Another quick way to add content to the world is to drag and drop images into the world. You can include any .png, .jpg, or .gif formatted image. You can drag and drop images into the world either from your desktop or directly from a web browser window. You can use these images to add posters or artwork to walls or to create interesting floors. For example, I found a photograph of some tile (Cyprus floor tile by Orhan Bilgin), which I dropped in the world, rotated horizontally, and used for a welcome mat for this Environmental Showcase Home.

To learn more about using the Edit palette to assemble worlds, refer to this companion tutorial:

Project Wonderland (v0.5): Assembling Worlds

When creating a world, it's handy to create Placemarks as you go along (this feature exists in Wonderland 0.5 Preview2 and later versions). You can, for example, add a Placemark to the tile welcome mat in the scene above. You do this by right clicking on the mat and selecting "Properities..." from the context menu. Then click on the "+" sign to add the "Placemark" capability. After you name the placemark, it will show up in the menu for everyone. And if you re-arrange your world and move the welcome mat, the Placemark location will move along with the mat.

Saving Your Work

Once you have added content to your world, you can save it by creating a "snapshot." First, make sure no one else is working on the server. Then quit out of your Wonderland client. Navigate to the Server Admin console in your browser and click on the "Manage Worlds" link in the navigation pane. Scroll to the bottom of the page and click on the "Create Snapshot" link. You will get a confirmation screen like this one:

Click "OK." Your new snapshot will now be included at the top of the Snapshots table. Click on the "edit" link associated with your new snapshot.

Enter a name and a description for your snapshot.

After you save the name, you will see this information reflected in the table. Now, whenever you want to return your world to this state, you can click on "make current."

If your snapshot is already the current one, but the world has become messed up, you will be able to "restore" the world to the state in which you saved it. This is handy when you are using the world for classes or for giving demos and always want to start in a known state.

Now that you have the world saved, you can continue working on it, periodically saving snapshots, or you can make the Empty World current again and build another world.

Managing Multiple Worlds

There are several strategies for managing multiple worlds. Using the snapshot mechanism, you can easily create multiple worlds on the same server and switch between them by restoring snapshots. This strategy, however, does not enable you to jump from one world to another. The worlds are mutually exclusive in that only one can be running on the server at a time. If you are creating different worlds or spaces that you would like users to be able to navigate between, you can do one of two things.

The first approach is to set up disjoint spaces on the same server. You can do this by creating portals to move from space to space. Create a portal by adding the "Portal" capability to any object. You might consider using images that include the name of the destination, or you could use a screenshot of the remote space as the portal object. To turn an object into a portal, right click on the model or image and select "Properties..." Click on the "+" sign in the Capabilities pane and add the Portal capability. When you click on this capability in the list you will see the fields to fill in the Server URL and the coordinates.

The coordinates need to be placed far enough apart that the geometry from one space will completely unload when you navigate to the next space. Setting the spaces 1000 meters apart is a good rule of thumb. Let's say you want three distinct spaces. You can place the first one at the Starting Location. This is where people will land when they log on to the server. In this example, the portal's X and Y coordinates are set to 1000. Then you can create another portal that points to "X: -1000" and "Y: -1000"." When you make a portal to another location on the same server, leave the Server URL field blank.

The other option is to set up each world on a different server. In this case, you will need to fill in the URL field with the location of the server hosting the world.

You can, of course, combine these approaches. For example, you could have three worlds on one server and four worlds on another server, using portals to move between the two servers. On each server, you can have multiple snapshots which you can restore.

Topic WorldFromScratch . { Edit | Ref-By | Printable | Diffs r7 < r6 < r5 < r4 < r3 | More }
 XML java.net RSS

Revision r7 - 14 Oct 2009 - 20:40:35 - Main.nicoley
Parents: WebHome > ProjectWonderland