uilding and scripting are two very important skills in the MMOG Second Life. Building is the process by which you create complex 3D structures. Scripting is the process of using a script language to allow those 3D structures to perform tasks, in the game. My last article focused on scripting. In this article I will cover building. I will cover the fundamentals of building and show you how to create a set of 3D objects that will allow you to construct castles, such as the one shown in Figure 1.
To begin building you will need to create primitives, called prims for short. Prims are very simple solid geometrical objects. Second Life lets you create 13 different prim types. However, these are made of only seven different basic shapes. For example, a sphere can become a hemisphere by setting a “path cut” begin and end. Using path cuts you can remove a portion of a prim, creating a different shape. Figure 2 shows the seven basic shapes.
Figure 2 shows my game avatar, Encog Dod, standing by the seven primitive types. From left to right, the figure shows the box, prism, cylinder, sphere, torus, ring, and tube.
To build one of these primitives, select the “build” option from the bottom of your screen.
|Figure 3. Creating a Box: Select the magic wand icon from the top of the Building window to create a default “box” primitive.
|Author’s Note: If build is not enabled, then you are not on land that supports building. Generally you must be on your own land to build. However, if you do not own land, you can use a sandbox. To find a sandbox use the search and search for a sandbox. Sandboxes are regions that allow anyone to build. You’ll often find other builders present in sandboxes, so things can get a bit chaotic. Additionally, most sandboxes are cleared out daily. So make sure you take a copy of your creation, if you want it saved.
After you select build, you will see the building window (see Figure 3). To create primitives, select the magic wand icon. By default, you will create a box. If you click anywhere near yourself you will see a box created, as shown in Figure 3.
Note that the small “wood textured” box in Figure 3 is selected when you create it. You can tell that the box is selected by fact that there are red, green and blue arrows on the box. These arrows let you move the box any of the three dimensions. Second Life opens a window that shows you options that affect the box primitive. I’ll discuss these options later in the article.
You can also rotate and resize primitives in a manner similar to moving an object. You use the mouse to drag and rotate or resize a prim. To rotate a prim use the CTRL key. To resize use the CTRL-SHIFT key combination.
|Figure 4. A Snowman: This group consists of three linked spheres.
You create complex objects by combining primitives. To combine two prims they should be touching, or at least very close. Select your first object normally. However, when you select additional prims hold down the SHIFT key. This lets you select multiple prims. Select all the prims you want to group, and then select “Link” from the tools menu. To unlink a group of prims, select the group, and then choose “Unlink” from the tools menu.
In Figure 4 you can see three white spheres combined to create a primitive snowman.
To make the spheres white I used the “Texture” tab of the prim’s option window. From the “Texture” tab you can choose a color. The only other changes to the spheres were sizing and moving them into place.
One of the first things that most Second Life users want to build is a house. After you have land, you can create your own place to live. There are many different types of houses in Second Life. In this article you’ll see how to construct a simple castle, built of basic castle building blocks; you can build as large or small a castle as you like. You’ll also see a useful terraforming technique that you can use with any building type.
Working with Land
Second life land is not always flat; however, flat land is the easiest to build on. Some land will be flat and easy to build on, such as Figure 5.
Most other land that you purchase will have hills. You can flatten small parcels of land relatively easily. However you can only raise or lower land so far. This makes it very difficult to flatten large areas of land. Consider Figure 6, which shows the hilly land on which the castle in this article was built.
|Figure 7. A Granite Block: Here’s a large granite block that will serve as part of the castle’s foundation.
You will notice from Figure 6 that the land’s texture varies with its height. As you move closer to the ocean the land’s texture becomes sandier. This is a preset option for land, and cannot usually be changed. The only time land texture can be changed is if you own a Second Life Island. You can get more information about island ownership here.
It is also important to note that this form of texture applies only to land. All other textures will not be affected by height.
I’ve already flattened the land as far as I can. Now I must build a foundation on which to build the castle. Basically a foundation is a bunch of large boxes textured to look like a foundation. To build the foundation, start by creating a cube of the maximum size?10 cubic meters (see Figure 7). The easiest way to make a cube that large is to choose the prim options and set the x, y, and z sizes to 10. Next, select the texture tag and choose the “Granite” texture included with the standard object library in your inventory. If you can’t find it, fill in the text box at the top of your inventory and do a search. While still in the texture options, change the “Repeats per Face” option to “1” for both horizontal and vertical.
|Figure 8. The Completed Foundation: Placing the blocks next to one another creates a solid foundation for the castle.
If you are building your own castle it is best to built it to fit your land’s size. The plot that I am using for this example is 4,096 square meters. For this size a foundation will consist of 36 (6 x 6) granite blocks like the one you created in the previous step. You can quickly copy the granite block (or any primitive) you’ve created by clicking it and choosing “Take Copy.” Copying the block adds the new block to your inventory. From the inventory, you can drag a block to the ground and quickly create more copies. Drag enough blocks to create a foundation for the size castle you want.
While you could drag all 36 blocks to the correct location, it is much easier and more accurate to simply set the x, y, and z coordinates using the prim options window. For example, the first block that I placed over the land had a z value of 36 meters. Since every block in the foundation is the same height I was able to simply enter the value of 36 for the z-coordinate of all of the foundation blocks. Likewise each block’s x and y should be 10 meters away from the previous block. This is because each block is 10 cubic meters.
|Figure 9. A Grassy Plane: After adding the grass texture to the top of the foundation cubes, you’ll have a grassy plane perfect for building.
Setting the z value the same for all blocks creates a flat foundation, because each block has the same height and the same z-coordinate. Z-coordinates are zero based, where zero is a spot deep underground. Therefore, if all blocks have the same height and z-coordinate they will all appear at the same level. Some will be slightly underground, similar to a real-life house’s foundation. Figure 8 shows the completed foundation.
The next step is to add grass on top of the foundation. You will likely want to walk around outside the castle, and adding grass to the foundation makes it look like a nice grassy field?a perfect building spot! To add grass, change the texture of only the top face of each of the cubes by dragging the texture to the top face of the cube. Note that each face of a prim can have a different texture.
First, select a grass texture from your inventory. I like the “Islands?Grass” from the standard library. Drag this texture to the top of all of the foundation cubes. This will result in a terraformed grassy plane ready for building (see Figure 9).
Creating the Castle Building Blocks
So far you have seen how to perform a number of basic building options. Specifically you have learned to:
- Create any prim type
- Move a prim or object
- Resize a prim or object
- Apply a texture
- Apply different textures to different faces
You can quickly build a castle similar to the one shown in Figure 1 from a series of castle building blocks. In this section you will see how to create these blocks. You can obtain a copy of all of the textures and castle building blocks in the Second Life world at the following SLURL (Second Life URL): http://slurl.com/secondlife/Encogia/211/181/63.
The castle is packaged into a large box called “Castle in a Box Tutorial”. The tutorial box contains all of the textures and building blocks needed for this castle. Additionally you are given full rights to these objects so that you can examine and see exactly how they were constructed.
You’ll want to use this technique to create buildings of your own in Second Life. First, create prims and link them together into larger objects. These larger objects will become the building blocks of your structure. For example, the castle is made up of the following building blocks:
- 3X3 Cement
- 3X3 Cement Grass
- Corner Wall
- Corner Tower
- Door Section
- Front Door
- Short Wall
- Small Corner Tower
- Window Wall
|Figure 10. Castle Building Blocks: Sets of grouped prims such as these provide the basic building blocks for the castle.
You can see several of these building blocks laid out on the lawn in Figure 10.
Each of these building blocks was built using skills already covered in this chapter. For example, stacking several sized cylinders and topping them with a blue cone creates a tower. Putting a wall/window texture on the front and an interior texture on the other side creates walls. The prims for each block are grouped. Except for the door, you’ve seen all the techniques used. The door uses a simple Linden Scripting Language (LSL) program (see my previous article) to allow it to open and close.
Listing 1 shows the Linden Scripting Language (LSL) code that operates the door.
This script in Listing 1 works by establishing two states for the door: open and closed. When a user touches the door, it moves from one state to the other. The door should be a simple rectangular prim. The touch function calls the door function to rotate the door by 45 degrees, which “opens” the door, putting it in the open state. The open state simply waits a preset amount of time (5.0 seconds according to the user settings in Listing 1), and then rotates the door back by 45 degrees, thus closing the door.
The castle uses numerous textures. I could easily devote an entire article to texture creation. One of the easiest methods to obtain textures is to find free ones on the Internet. Once you locate a texture on the Internet, you can upload it into Second Life. For example, to find a “granite texture,” you can use Google to perform an “image search” for the term “granite texture.” You’ll find quite a few textures.
|Author’s Note: Before you use a texture make sure that the texture is free. Most web sites that contain textures will state the usage license for their textures. Second Life allows you to use any texture that you have obtained a valid license for, and does not violate their community standards. If you would like to create textures of your own, you should look into programs such as Adobe Photoshop and Adobe Illustrator.
By using terraforming, primitives, groups, and textures, you can build anything you can dream up. This article showed you how to first prepare a land site for building and how to create a set of reusable building blocks to construct a building. You also saw where you can obtain the castle building blocks.
Building can be a very time-consuming part of Second Life. However, as you become a more advanced builder you will accumulate a library of common objects that you have created, which will allow you to quickly construct new objects based on what you already have.
Building on What You Know
This article only covered basic options available on the objects. However, you can build a castle even using only these basic options. After you master the basic options you should start experimenting with other options such as hollow and taper. These options allow you to transform the prims even further to create new and interesting shapes. For example, you can hollow out a cube to create a box, with an inside. You can apply a cut path to a sphere to create a hemisphere. The best way to learn these additional options is to create prims and experiment with the available options until you understand first-hand how to transform prims. Happy building!