Sculpted Prims from Existing 3D Models
The AC3D “sculpted prim” exporter for Second Life has some unique capabilities versus other sculpt map exporters; it is one of the very few that is capable of exporting an arbitrary polygonal model. While not all models are good candidates to become sculpties due to limitations of the sculpted prim format, a surprising number of models can be converted quite well–including many pre-existing models that were never designed for Second Life.
This tutorial provides a quick walk-through on how to setup a pre-existing model for import into Second Life using AC3D.
Sculpted Prim or “Sculpty” – A Second Life 3D primitive whose shape is determined by a bitmap.
Sculpt Map – A 3D displacement map used by Second Life to make a sculpted prim. Sort of like a topographical elevation map you might have seen in geography class, but it contains 3D data instead.
UV Map – The layout of the texture coordinates of the model. Basically, a UV map says “stick this piece of bitmap to that part of the model”. U and V refer to the 2D coordinates in texture space of a vertex, in the same way that X, Y and Z refer to the 3D coordinates of the vertex’ position.
If you don’t have the AC3D export plug-in for SL yet, you can read about it and download it here.
Step One: Select an Appropriate Model
Start by selecting a model you wish to convert to a sculpted prim. Remember, according to Linden Labs, sculpted prims were designed specifically as an approximate representation of organic shapes. This means that some kinds of models are better suited to make into sculpties than others.Specifically, the following types of models will normally convert easily and make very good sculpted prims:
- Models with smooth flowing curves combined with natural lumps
- Heavily subdivided shapes that are very smooth
- Organic shapes such people, fruit, animals, plants, landforms and soft clothing
On the other hand, you’ll want to avoid these kinds of objects:
- Models with sharp corners and very flat surfaces
- Hard points or large numbers of small protrusions
- Rigid man-made shapes such as a square table or desk, or anything with 90 degree angles
Models with sharp corners or flat surfaces are best made out of the other conic primitives that Second Life provides. While it is still possible to export these models as a sculpty, they generally require much more tweaking of the UV map and may still suffer from visible artifacts. Organic models, on the other hand, will usually export with much more pleasing results.
For this tutorial, I’ve selected an old model of a herring that I had sitting on my hard drive. This model was not built specifically for Second Life; but it does have all of the features that make a good sculpty. The herring is a good choice because it is a smooth, organic shape. The round shape of the fish’s body also means that it will be easy to UV map, so we’ll be able to texture it and get it in-world very quickly.
Step Two: Partition Your Model
You’ll get better results if you partition your model so that it is mostly-convex. Detach any small, protruding objects and make them into their own mesh. This isn’t strictly required, but this will make your model much easier to UV map. It will also improve the sculpt map resolution, because each individual mesh in the model will get its own sculpt map, allowing you to have more vertices in total. As an added bonus, by making the fins into their own prims, you can animate them later by adding a little LSL script.
Looking at the fish, the eyes are the first obvious part that should be cut away. As it turns out, the eyes are already a separate mesh, so there’s nothing that needs done here. Hide the eyes by selecting them and pressing the Hide button.
Next, it’s time to detach the fins. The pectoral fins, the small fins on the sides of the fish, need to come off. To do this, switch to Surface mode, and highlight the surfaces that make up each fin. Once highlighted, selected Cut Away Object from the Surface menu.
Repeat the same thing for the small fins on the underbelly of the fish. The dorsal fin on top and the small fin at the rear of the fish can stay attached or be removed; it’s really a judgment call depending on whether you want fewer prims or more resolution. They’re pretty thick, so they should hold resolution just fine as part of the main sculpty, so I’m electing to leave them attached.
[Ed.: After finishing the layout and exporting the model, I realized it would look better if I cut the tail off, too, especially since that's a pretty obvious part to animate. Doh! The final in-world shots show the two piece tail.]
Step Three: Fill in Any Gaps
To make a proper sculpt map, you must have no holes in the UV map. There are two different ways to accomplish this:
1) Snap together the UVs after you’ve mapped your model to fix any gaps in the texture
2) Add geometry to make sure you have no gaps before you map the model.
Both methods work equally well. This model has very minor holes, so I’m inclined to just add a little geometry.
[EDIT: I realized there has been some confusion about "holes in the UV map" versus "holes in the model". Holes in the model are okay... these will fill in when it's imported into SL. In fact, the default sphere that comes with the plug-in has a tiny hole at the poles. Holes in the uv map on the other hand are a problem. The UV map must have no holes. In this tutorial, I use geometry to fix the UV map. However, I could have just as easily left the holes in the model and snapped the points together in the texture coordinate editor. Again, making sure there are NO holes UV MAP is the part that is important, not the model.]
To do this, switch to Vertex mode. Then, click on each vertex around the area you want to fill in, in counter-clockwise order. Be sure to click your vertices in this order! If you don’t select the vertices in order, you will end up with a degenerate surface. You will know you did it wrong if the surface turns red, and the edge lines go every which way. Undo and try again. If you select the vertices in clockwise order instead of counter-clockwise, your surface normal will be inverted. This may cause your sculpty to appear “inside out” when it is exported. You must select the vertices in counter-clockwise order.
After you’ve selected the vertices, click Vertex > Create Ordered Surface. This will create a new surface from the selected vertices, closing the hole. If you do any serious modeling in AC3D, you will probably use this function a lot, so it’s worth memorizing the hot key (Control-Shift-S).
Fill in the remaining holes in the model, including the holes on the ends of the fins themselves.
Step Four: UV Map Your Model
To create a sculpt map, you must have a perfect UV map, which means you cannot have any holes or gaps in your map, and that your UV map must wrap in all directions.
[Note: It is possible to change the mapping mode using an LSL script, but for this tutorial we will only use the default mapping mode--no scripting required!]
It doesn’t really matter what technique you use to map object, just so long as you end up with no holes and full wrapping in the end. I like to start with a spherical map myself.
To do this, open the Texture Coordinate Editor from the Tools menu. In addition, open the UV Map control panel, also on the Tools menu. (If you have an older version of AC3D, you can obtain the UV Map tool as a plug-in from supercoldmilk.com)
In the main window, select the first mesh you want to UV map. I started with the eye, since I knew that would need very little fix-up. In the UV Map control panel, select Spherical under Shape Mapping, then click Apply. Depending on your shape, you may need to play with the axes to see which mapping gives you the best fit. For the eyes, I aligned around the Z axis, which gave me the best result. What you want is a map layout where every triangle has some texture space, but few or none are overlapping. If the map is nearly square to start with, that’s all the better!
Once the spherical map is applied, it’s important to make sure the map runs edge to edge. In the Texture Coordinate Editor window, click the Snap > Max button. If you need to, adjust any stray UV coordinates by moving the vertex position in the Texture Coordinate Editor window. Manually adjust as needed until the texture completely fills the available space. The default spherical mapping also sometimes causes overlapping UVs. You should correct this by gently adjusting the points so that you do not have any overlapping texture space. Don’t worry if you have to cheat it a little–sculpt maps are pretty tolerant of the wrapping being off a bit.
Repeat the process for each object. You may have to do some manual texturing for some of the complex shapes. I’ll do a more in-depth tutorial on texturing in general at a later date, but basically what you’ll want to do is grab the surfaces a section at a time, apply the mapping, and then snap the vertices together in the Texture Coordinate Editor so there are no gaps or seams.
Keep going until all of the pieces are UV mapped. You’re almost done!
Step Five: Name Your Parts
If you have multiple meshes in your model, be sure to give each mesh a unique name. That way, you won’t run into name collisions when you export the model. The sculpty exporter is designed to export all of the sculpt maps at once if you have a model with several meshes.
I named the fish parts: fish, tail, rpectoralfin, lpectoralfin, reye, leye, rfin and lfin.
You can name a mesh either by selecting its Object Properties from the Tools menu, or by editing its name in the panel just above the materials palette, in the lower left-land corner of the screen.
Step Six: Export!
From the File menu, select Export, then select Second Life Sculpted Prim. This will create a series of TGA files, one for each mesh in your model.
If you have the newer version of the plug-in, you can export a “normalized” sculpt map instead. This makes the sculpt map use the full range available to it. Your sculpt map will be smoother and more precise, but you will have to re-size the shape inside Second Life after you import it.
That’s it! Your model is exported and ready to import into Second Life.
Here are some images of how the final, imported model looks in-world (textured and untextured):