Modeling Sculpted Prims for Second Life in Maya (using Polygons

)
Introduction: Modeling for sculpted prims in Second Life is very different from modeling for other game engines. Some of the key differences include: • The need for a “perfect UV map” • Only one object can be exported (via a specific script that can be found here) It may not look like much, but these two differences make a big impact on how one goes about modeling (especially the need for a “perfect UV map”). For example, this is what a normally accepted model without the properly configured UV map looks like:

A Model in Maya

That Same Model imported into Second Life without the “perfect UV map”

These differences can be very frustrating and befuddling for the novice and experienced Maya modeler alike. While there are many techniques one can use to get around these constraints, several either require 3rd party software or restrict the artist from building complex models. There is one technique that, despite the constraints inherent to importing Maya models into Second Life, yields fairly successful results easily and without any additional software. Below is a step by step tutorial that explains this technique. The tutorial is fairly granular so that even beginner Maya users should be able to follow along.

Conceptual Overview: We will start with a basic polygon primitive from which we are going to create a “perfect UV map.” It is significantly easier to properly adjust UVs on a simple primitive like a sphere or cylinder than it is on a more complex model. Once the UVs have been properly set up, we will essentially freeze the UVs so that they stay put even when we start shaping the primitive. From there, we’ll be able to push, pull, extrude, and even delete polygons with little impact to the UV map – meaning that the object will stay intact when brought into Second Life. Once we have the created the object we want, we will simply select that object, run the required script, and import it into

Second Life. That’s all that’s to it!

Stage 1 - Create your base polygon
1.

Create a Sphere
a. b. c. d.
Select “Create” in the top Menu Bar Select “Polygon Primitives” in the Create drop down menu Select “Sphere” from the Polygon Primitive drop down menu. Click and Drag anywhere on the Workspace grid – the more you drag, the larger your sphere will be (the size of the sphere will not impact the sculpty in SL) e. When you let go, you should now have a sphere in the Workspace.

2. Arrange the UVs to become a “Perfect UV Map”
Ok, this is where things start to get a little tricky. Just follow the instructions step by step and you’ll get through it. Once you do it a few times, you’ll find that it’s not really as bad as it may seem at first.

a. Select the Sphere as an object (if all of the lines turn green when you select it, you’re in good
shape) Select “Window” in the top Menu Bar c. Select “UV Texture Editor” in the Window drop down menu (If you zoom out a little in the UV Texture Editor, the image within should look like a grid with a spiky top and bottom.) d. Select “Create UVs” in the top Menu Bar e. Select “Spherical Mapping” in the Create UVs drop down menu. And now for the tricky part… b.

f. Make sure the object stays selected just as it is.* g. Go back to you “UV Texture Editor” and make sure you have zoomed out enough so that you
can see the whole orange grid-like image. It should look like a grid with a tent on the top and bottom. h. Go back to the main view and select the Red T (found toward the bottom of the sphere.) A Manipulator Tool should appear. i. Click once anywhere on the blue circle to activate the Rotation Tool. j. Click and Drag on the green circle (in the middle) to move the texture map around the sphere. k. Drag until there as little ‘tent overhang’ on the orange grid in the UV Texture Editor as possible. You won’t be able to make it perfect – but try to get as close as possible.

* If you accidently de-select the sphere anytime between steps f-j, press Undo (control+Z) and start from step f all over again. Don’t get
discouraged – this is probably the trickiest part of the entire process.

Now we’re going to fit the orange grid into the upper right quadrant of the grey background in the UV Texture Editor.

l. Right-Click and hold on the orange grid in the UV Texture Editor. m. Select “UV” from the menu that appears around your cursor. n. Select all of the UVs in the UV Texture Editor by clicking and dragging a large selection box
around the image. (A selected UV is shown as a green square – so, if done correctly, the image should be covered in small, green squares)

o. Press “r” to activate the Scale Tool. (When you do, you should see a tool with three colored
squares appear in the middle)

p. Click on the Yellow Square in the middle and drag (either to the left or down) so that the entire
image shrinks a little.

q. Continue to scale the image down (using the red and yellow square to only scale the height and
width when necessary) so that the square grid area fits completely in the upper right quadrant. The ‘tent’ parts can stick out of the quadrant for now. r. Deselect all of the UVs. s. Press “w” to activate the Move Tool. t. Select just the top row of UVs (as well as the tip of the ‘tent’) u. Press “x” and (while you are still pressing “X”), drag the selected UVs to the top of the quadrant. Most of them should already be close to the top line. This step just ensures they are exactly on the line – as well as flattens out the ‘tent.’ v. Repeat steps s and t for the bottom, left, and right sides. (Dragging each side to the corresponding side of the quadrant – make sure to include the overhang as well). In the end, the image should fit perfectly within just that upper right quadrant of the UV texture editor.

3. Freezing the UVs
Whew, now that that’s over with, let’s freeze these UVs so we won’t have to do that again! (at least, not for this model)

a. Close the UV Texture Editor window and go back to the Main View. b. Select all of the UVs on the sphere (the entire sphere should be covered in green squares when
you do)

c. Select “Bonus Tools” in the top menu bar. **If you do not see Bonus Tools, you may have to
activate it. To do so, go here and install the appropriate package for your version of Maya)

d. Select “Preserve UVs” from the “Bonus Tools” drop-down menu. e. Select “Preserve UVs” from the button menu that appears. i. If any warning messages appear, select “Yes” f. Deselect the object

Stage 2 – Creating your Sculpted Prim in Maya 4. Modeling
a. Model the object to the desired shape.
b. Some Tips: i. Avoid creating concave spaces ii.In fact, if small holes and spaces are key to your object, consider using textures to communicate the spaces rather than the geometry. iii.Avoid sharp or hard edges. iv.Sculpted Prims lend themselves well to organic shapes. They generally don’t work very well for geometric or architectural shapes.

5. Exporting Your Model

So your model is finally complete and it’s time to bring it into Second Life. Before you can upload it into SL, though, you’ll have to export it from Maya in a very specific format. Don’t worry, though, it’s a fairly straight forward process. First, let’s set you up with the SL Maya Exporter Script. Note: You will only need to do this once. Once the script has been established in Maya, it should remain there for all other models you create using that copy of Maya.

a. Copy the SL Maya Exporter Script. i. Go to this webpage.
ii.Select all of the text and copy it

b. Paste the script into your Maya script editor. i. Press the small square button in the bottom right corner to open the Script Editor
Window.

ii.Paste the text into the lower text box.
iii.Go to “File” in the Script Editor toolbar iv.Select “Save Script to Shelf” from the File drop down menu. All done! Now you should be able to use the script whenever you’d like. Remember, you shouldn’t have to follow steps A and B above again if you completed them properly.

c. Select the object (remember, make sure that you see all green lines) d. Go to the square on the right side of the shelf. (It should say either mel/Sculp or mel/txtSculp on
it)

e. Click that square i. A dialogue box should appear. f. Press “Export” (don’t worry about the options – you can play with those once you get the hang of
the sculpted prim process)

Stage 3 – Bringing your Sculpted Prim into Second Life
6.

Uploading the Model to Second Life
a. b. c. d. e.

Alright, the final few steps. Congratulations for getting this far. Again, the process will feel much easier once you’ve done this a few times. Open Second Life Go to “File” in the top tool bar Go to “Upload” from the “File” drop down menu Press “Image” from the Upload sub-menu An “Open” dialogue window will appear i. Find the .bmp version of your model (the .bmp version was created when you ran the Maya Export Script) f. When you open the file, a preview screen should appear i. The image should look like a rainbow gradient g. Go to the “Preview image as:” menu h. Choose “Sculpted Prim”

i.

i. Make sure the preview is close to what you’d like the final sculpted prim to look like. Remember, it will cost you $10 Linden every time you upload. Click “Upload”

7. Making it Happen
Now, let’s make sculpted prim magic!

a. Right click anywhere on the ground
i. A contextual menu should appear around the cursor

b. Select “Create” c. Left click anywhere on the ground d. e. f. g. h.
i. A cube should appear where you clicked Select the “Object” tab from the Edit Window Click the “Building Block Type” drop down menu Select “Sculpted” Click the rainbow-colored box labeled as “Sculpt Texture” Select the .bmp that you just uploaded.

8. Enjoy!

A Couple of Helpful Notes:

Texturing – Texturing a sculpted prim can be difficult via this method – as the UV map is not arranged in a way ideal to most texture map creation methods. Currently, best guess and trial and error are the recommended methods for creating texture maps for your sculpted prim. LOD (Level of Detail) – One drawback to sculpted prims is that they can appear to ‘simplify’ as you back away from them. This is due to the default Level of Detail settings established by Second Life. This, however, can be fixed. To do so, take the following steps: ○ Go to “Advanced” on the top toolbar. ○ Select “Debug Settings” from the drop down menu from Advanced.  The “Debug Settings” window will open. ○ In the Debug Settings window, type: RenderVolumeLODFactor ○ Change the setting to 4 (or higher) ○ Close the window Sitting on Sculpted Prims – Sculpted prims often require additional scripting in order to ensure that avatars will sit on them properly. Realistic Expectations – A sculpted prim in Second Life will never look as good as it does in Maya – no matter which process you use. Questions? – Email us at slsdg@usc.edu. We’re always more than happy to help!

• • •

This tutorial is brought to you by: The University of Southern California’s Second Life Student Developer Association (SLSDG) Email: slsdg@usc.edu Website: http://www-scf.usc.edu/~slsdg/index.html Blog: http://slsdg.blogspot.com/

Image Index
::Zoom in for more Detail::

To Create a Sphere: -“Create” -“Polygon Primitives” -“Sphere” -Click and Drag -Let Go

Back to Instructions A Selected Object: If the lines around it are green, then the object is selected. (The sphere itself may be in wireframe or solid –either is fine.)

If there are orange lines instead of green, then only specific components have been selected – not the object as a whole.

Back to Instructions An “ Imperfect UV Map”: This is the default UV layout of the sphere.

The triangles at the top and bottom of the grid is problematic for Second Life.

Back to Instructions Spherical Mapping -“Create UVs” -“Spherical Mapping”

*Make sure the object stays selected afterwards

Back to Instructions

UVs After Spherical Mapping

The UVs are now closer to their proper positions.

The next steps will be to fit this shape perfectly into the upper right quadrant and eliminating the tents on the top and bottom.

Back to Instructions Activating the Manipulator Tool

Select the Red T (toward the bottom of the sphere) to activate the manipulator tool.

Back to Instructions

Rotating the UV Map

Select the green ring of the Manipulator Tool (shown as yellow in the example image – as it is selected).

Drag the ring to the left or right until there is almost no ‘tent overhang.’ In other words, your UV map should look like the map shown in this image.

Back to Instructions Selecting UVs

(Top) The UV Texture Editor with no UVs selected

(Bottom) The UV Texture Editor with all UVs selected.

Before you start scaling the UVs down to fit in the upper right corner, you need to first select them all.

Back to Instructions Scaling UVs

The Scale Tool looks like a right angle three colored squares on each end.

Click on the Yellow Square in the middle and drag (either to the left or down) so that the entire image shrinks a little.

Dragging the Green Square will stretch/shrink the height. Dragging the Red Square will stretch/shrink the width.

Back to Instructions Fitting the UVs into the Top Right Quadrant

Using the Scale Tool, shrink the UV map down so that it fits in the upper right quadrant to the graph. The “tent” top and bottom can go beyond the quadrant.

When you are don scaling, your UV Texture Editor wind should look like the example on the left.

Back to Instructions Perfect UV Map

This is an example of a perfect UV map.


There are absolutely no gaps in the UV map within the top right quadrant. There are no UVs that go outside of the top right quadrant. The squares are as close to even as possible (this does not have to be exact)

Back to Instructions Select “Preserve UVs” from Bonus Tool

-Go to “Bonus Tools” -Select “Preserve UVs” -Select “Preserve UVs” -Deselect the Object

Back to Instructions Model the Geometry to the Desired Shape

To model the geometry to just the right shape, you can push, pull, and extrude faces, edges, and vertices. More information on polygon modeling can be found in the “Help” drop down menu in the top menu bar.

The model on the top, the lightbulb, is an example of a shape that will work well as a Second Life sculpted prim.

The model on the bottom, the tea cup, is an example of a shape that will not work well as a Second Life sculpted prim.

Back to Instructions

Finding the Script Editor Window

To open the Script Editor Window, press the small square button on the bottom right corner.

Back to Instructions Pasting the Script into the Script Editor Window

Paste the script copied from the website into the bottom text box.

Don’t worry about what is in the top text box.

Back to Instructions Adding the Script to the Shelf

-Go to “File” in the Script Editor toolbar -Select “Save Script to Shelf”

Back to Instructions Adding the Script to the Shelf

To run the script, select the square on the right side of the shelf that says something like mel/Sculpt or mel/txtSculpt.

Back to Instructions

Exporting the Model for Second Life

When you run the script, a dialogue box similar to the one shown here should appear.

Don’t worry about too many of the options. However, you may want to give the export a unique name so that it doesn’t overwrite previous exports.

Back to Instructions Opening the Maya File in Second Life

-Go to “File” in the top tool bar -Go to “Upload” -Select “Image (L$10)

Back to Instructions

Opening the Maya File in Second Life

Your preview screen should initially look like this –a smooth, rainbow gradient of sorts.

Back to Instructions

Going into “Build Mode”

-Right Click anywhere on the ground -Select Create in the menu that will appear

Back to Instructions

Creating a Cube -Left click anywhere on the ground and a cube should appear where you clicked

This will serve as the base model that your sculpted prim map will modify.

Back to Instructions Select the Object Tab

Here is where you’ll be able to make the final few edits to the new prim to turn it into your sculpted prim!

Back to Instructions Applying the Sculpted Prim map

-Click the “Building Block Type” drop down menu and select “Sculpted” -Click the rainbow-colored box labeled as “Sculpt Texture” -Select the .bmp that you just uploaded

Back to Instructions