Thursday, January 15, 2009

Thoughts from SL's users about sculpts.

I posted two threads asking questions regarding sculpts:

The responses are very valuable. We see a few common complaints about sculpts:

1) Sculpts take a long time to load
Part of this is due to a good number of sculpts being unoptimized. I already have an in-depth tutorial on this mostly written, and will publish soon to help out with this. The other cause is in SL's code and the way it deals with images, and can only be fixed by giving LL some :argh:

2) LOD unpredictable and poor
This is a matter of sculpt design. However, I feel that I should give customers detailed information on my sculpts in the info viewable before purchase. Specific distances that it retain shape to a reasonable degree under both medium and high mesh detail settings. I also plan on making more stuff that retains shape on LOD2 and 3, and not use LOD0 and 1.

3) Texturing options in full perms sculpts iffy
This is something that I can do a lot about in my products. I had wondered if there was significant call for this. In the future, my sculpt packs will contain a new texturing system that includes baked ambient, shadows, bump/normal, and specular all as separate textures so they can be layered in photoshop and modified individually.

Wednesday, January 14, 2009

OCD texturing of sculpts (and Templates!)

First, here's a downloadable set of templates:

(Thanks to Takuan Daikon for file hosting.)

You can also pick up a pack in-world at the Sculptomancy sim. The box is located just inside the front door of the store. This is recommended as opposed to you re-uploading the textures, as I had to have a friend upload the 2048 pixel textures using a modified client. Oh yeah- you'll also find plenty of sculpted building supplies, trees, and scenic stuff like bridges at the store as well.

These texture templates are designed to show you everything you need to know about sculpts on a per-pixel basis. They were designed to allow exact texturing of the polar regions of a sculpt, including allowing you to draw straight lines across a flat cylindrical top.

Firstly, the grid is designed into different base colored regions for easy identification of which general area of the sculpt is applied to the piece. Then, each individual face (two per polygon) are bordered with either red or green (red denoting up-facing faces, and blue denoting bottom ones. A black line is drawn exactly where each face pair meets. The polygons are also numbered horizontaly and lettered vertically in a grid scheme three times (black for the 90 degree corner, red for bottom-facing area, blue for up-facing.)

Note that a top pole of a sphere (or sculpt piece if the sculpt uses the pinch method for numerous separate elements on a sculpt) uses only the blue bottom-facing faces in a "sawblade" like scheme, whereas the bottom poles all use only red.


Each template is named something like Aminom_Sculpt_Template_32x32-1024x1024. The first dimension represents the polygon ratio, and the second the template image ratio. So, Aminom_Sculpt_Template_32x32-1024x1024 is a 1024x1024 template, that is designed for a 32x32 polygon sculpt.

For normal, 32x32 polygon sculpts, you want to use the Aminom_Sculpt_Template_32x32-1024x1024 template. There are also a variety of different sizes for oblong sculpts, and for using regular UV repeats on sculpts. The 16x64 template had to be uploaded into SL using a special method; for 8x128 and 4x256 sculpts it is assumed that you will figure out some sort of UV repeat scheme to make textures functional with SL. For example, a 8x128 sculpt that uses 1 horizontal repeat and 4 verticle repeats would take the 8x32 template.

Once you've figured out which template to use, apply it to the fullbright sculpt in-world (or in a 3D modeling program) and then open it in an image editor. The template will show you where every face is located, and how it is stretched.


Using Aminom Templates to texture straight lines on polar (flat cylindrical) regions:


Usually I just "fake" the poles on a sculpt by creating a texture area that is generaly concentric. However, when I wanted to create some barrels, I also wanted the ends of the barrels to have parallel boards. And so, I created the new template set, and a semi-easy methodology for precise texturing of irregular sculpt areas.

1) For this example, we're using a 16x64 sculpt which uses UV repeats of 1U and 4V across four matching sculpted barrels. So, the template to use would be 16x16. We apply the template, fullbright, and UV settings to the sculpt.

2) Save the template to your HD, and open it in an image editor.

3) Let's go for 6 evenly spaced areas (boards) on the top. Measure the top of the sculpt with a prim, and then divide the found value by 6. Create a cube prim reference beam with the found width, color it black, and add some opacity. It should look like this:

4) Zoom in on the top of the cylinder. Now, you want to create a series of points on the texture in the image editor that correspond to the exact points on the applied texture where the edge of each face meets the edge of the black reference prim. Do this on a new layer. When you do this, use the positioning of the colored letters as reference.

Here's the points shown on the in-world sculpt:

And the points drawn in the image editor to match:

I applied black stroke to the green pixels to make it readily visible for this tutorial.

5) Copy/drag the black reference prim over to make the next board, and color it a different color. Now, repeat step 4, using a different layer and different color if you want. Continue doing this until you complete the entire top. Remember that when working on the polygons at the very pole, the red outlined faces are not used.

If you have even spacing, you only need to do one side. Just copy the dots on one side of the texture map, flip horizontal, and move them to the other in the right position.

Here's the result of a few minutes of rough work:

As you can see, it isn't _perfect_, and you can tweak further as you wish.

6) Play connect the dots. In the image editor, connect each line of dots with straight lines. You now have reference lines on the texture that turn into straight lines on the sculpt.

This method can be as exact (or quick and rough) as you'd like. For rough, you can use less points and not worry about precision. This same method can also be applied to 3D modeling programs used instead of second life, and for drawing other sorts of shapes onto the sculpt in different areas (though for that, I prefer either texture drawing or baked-on shapes in blender.)

Now that you have the reference lines, you can create straight texture segments, and then "bend" them to match the reference lines using the liquefy tool or another tool. You can also create accurate matching normal/bump mapping and ambient maps to be used for baked textures.