114 Virtual World Design
top section of the Build Editor and select the face with your mouse cursor. This will highlight the edges of the
face and give you a crosshair target in the middle of it that is useful for centering the texture you are applying.
Now, select your whole object and bring up the Texture tab in the Build editor, but rather than using the
menu to ddle with Transparency, Glow, or any of those goodies just yet, let’s create a lighting effect that
does not stress the server too much or require that we make any special textures.
Take a few minutes to decide how the lighting will be set up in your scene. In Figure6.13, there is a stone
arch in need of some texturing. Let’s suppose that for the most part the sun or the moon will light this scene.
On the underside of the arch, rather than take the default white base color in the Texture (diffuse section of
the Texture tab), why not take that down to a 60% or 50% gray color? In the example shown in Figure6.13,
bringing down the base material color to a gray on the undersides and off sides of the arch creates the
sense of overall lighting without adding immovable baked shadow textures to the structure. If you do this
consistently all over your build, you can create a sense of light and shadow without making any special
shadow-basedtextures.
Now that you have tried a little base material shifting to add some lighting, let us proceed with a quick
tour around the rest of the Texture tab menu (Figure6.14).
The Transparency spinner obviously allows you to make the prim or object translucent or even invisible
by changing the alpha value on your texture. Be aware that by using this, the server will change a 24-bit
texture into a 32-bit one to accommodate an alpha effect, and that change could cause alpha sorting glitches
or ickering in your scene where two layers of transparent objects overlap. There is little you can do about
this except to plan carefully when you build to avoid overlaps of alpha-based textures and to use them as
judiciously as possible. Also, be aware that when you turn on Transparency, bump mapping and shininess
are deactivated on the object.
Glow and Brightness were added to the texture options in Second Life in 2009. This vertex shader will
cause a minor performance hit, but most graphics cards these days would barely notice. When activated, the
surface is rendered to show a radiating light from the edges and faces. It is effective for re and radioactive
fuel effects, although the glow itself will not cast light on the scene or create any shadows. The Shininess
and Bumpiness modiers contain the legacy settings, and are still one of the simplest ways to put some life
into your textures. For even ner, more realistic effects, it is worth your time to experiment with specular and
normal maps to take advantage of the newer options in these modiers.
Mapping comes in two basic categories: default and planar. Each type of prim has its own default mapping
format, called UV mapping, which determines how a texture is wrapped around or mapped onto the form.
The U represents the horizontal direction of the texture image, and the V represents the vertical direction of
a texture image. Look at Figure6.15 to see how each of the primitives will take on a texture map and how
they orient the UV coordinates.
The planar mapping does what its name says; it will make your texture align itself to the plane of a box or
prism. This can be used to help correct the distortion you will see on the sides of a tapered box or prism as
shown in Figure 6.4, and the arch base prims of Figure 6.13. Please note that the planar mapping of a texture
will affect the tiling as it changes from repeats per face to repeats per meter. This can easily be set back to
the appropriate size with the spinners on the lower part of the menu if you so desire.
Tiling the texture you have made on the surface of a prim or object is a bit of a ne art in itself (Figure6.16).
When you build something, the rst place to check is at the top of the Build menu and make sure that the
stretch texture box is checked on. When you rez a prim, its default texture mapping setting is one repeat both
horizontally(U) and vertically (V), and the default size of the object (usually a box) should be 0.5 meters
to the side. Atthis point, you can decide to utilize a little math and take advantage of the built-in stretch
textures option. Suppose you wanted to make a tile oor that was 10 meters square. You could make a huge
1153D Modeling, 2D Graphics, and Data Visualization
FIGURE 6.13 Screen shot from Second Life, showing a material-based shadowing effect. By using the background
color of the texture material judiciously, you can obtain a “shadow” effect as demonstrated on this stone arch.
116 Virtual World Design
FIGURE 6.14 On the top and bottom right are images of prims displaying some of the various settings available in
the texture tab of the Build menu (left side). Options for brightness and glow are shown on the cubes, and options for
shininess and bump textures are shown on the spheres.
1173D Modeling, 2D Graphics, and Data Visualization
texture—1024 × 1024 pixels—and repeat it once on the top surface of that oor, but this approach will
greatly increase the load on the server and may cause your neighbors to experience lag as well.
To solve this problem in the most efcient way possible, you should ask yourself: What is the smallest
texture size that can be tiled or repeated across the surface to create the look I want? You may nd that you
could use a texture that is 256 pixels or possibly even 128 pixels square and obtain the same effect with
a much shorter loading time for your viewer. Remember that these textures are packed into the graphics
memory like tiles themselves, squashed into a square format with their resolution dened by the power of2.
Infact, if you upload a texture that is 300 × 400 pixels, the virtual world uploader will make a 512-pixel
square image out of it. This will look ne proportionally once you stretch it across a 3 by 4 meter prim, but
you will lose some resolution on the upload.
Rotation of a texture is pretty straightforward. The texture on each face can be selected and rotated around
the center axis. This can become interesting when combined with the Align Planar Faces, which allows you to
align a texture across the faces of several prims. There is a ne example of this in Figure 6.3. There is even more
information about how to utilize this feature in Torley Lindens video tutorial collection (http://community.
secondlife.com/t5/Tips-and-Tricks/VIDEO-Align-planar-faces-for-easier-texture-mapping-in-Viewer-2/
ba-p/669471).
Repeats per Face and Repeats/Meter can be utilized in your building when you need to work with realistic
sizes on the surfaces of your architecture. Obviously, real ceramic oor tiles around the world vary in size.
Ifyou know the real size of the oor you intend to make and the real size of the tiles, you can create a tile-able
texture in your graphics program (256 pixels square should be sufcient) that will tile properly. If the virtual
oor surface is the same size as the real one, then you can use the Repeats/Meter to create a realistically
scaled version of your real-life oor.
FIGURE 6.15 Screen shot in OpenSim showing the default UV mapping for each of the basic prims. The UV coordi-
nates are used to place the location of textures on a 3D object. V represents the vertical direction, and U represents the
horizontal direction.
118 Virtual World Design
FIGURE 6.16 Screen grab from OpenSim, showing various ways to tile a single texture on a 10 m square prim. From
the top down on the right, these modiers are shown: default, planar, offset on the U and V, 10 repeats/meter, and rotation
of texture 45 degrees. On the left is the texture tab of the Build menu, tiling options for textures are in the lower section.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset