Day 279: Sculpted Prims Tutorial Part 4 (Texture)
In Part 1, Part 2, and Part 3 of this tutorial series, we discussed sculpted prims and how to create them using Wings 3D and ROKURO. With these 3D programs, we can create and tweak just about any 3D shape relatively easily. However, there is something important missing: the texture.
In this Part 4 of the tutorial series, we are going to talk about one way to create textures for sculpted prims.
Programs and techniques for working with sculpted prims are changing daily. But 3 SL residents have really made the techniques we've talked about possible: Omei Turnbull created the Wings 3D sculpted prim exporter and importer. Yuzuru Jewell created ROKURO and his latest creation, TOKOROTEN. I really appreciate your efforts in making sculpties easier for the rest of us :)
Sculpted Prim Texture Overview
Creating texture for sculpties is basically the same as any other type of prim. You can create texture files using Photoshop, GIMP, or just about any graphics program.
But sculpties tend to be unusually shaped. And a single sculptie may represent more than one type of material. For example, part of a sculptie may be metal; while another part may be wood. That makes creating texture for sculpties more challenging, because its hard to figure out which part of a texture file will map to which part of a sculptie.
Commercial 3D programs (like Maya, Lightwave, Modo, and ZBrush) let you import the sculpted prim into the program and paint directly on the sculpted prim. The problem is that these programs cost more than I can afford, even with my student discount! So I have to settle for the less expensive alternative :P
We are going to talk about one technique based on discussions from the SL Forums: work on the texture in Photoshop or GIMP, and use Wings 3D to preview the texture periodically. Its not as easy as painting directly on a sculptie. But its good for the occasional sculptie builder. And its a lot more affordable :)
I strongly urge you to use ROKURO version 1.02 (Aug 12, 2007) for this tutorial. Be sure you have these settings (they are the standard settings):
Points(P): 33 Points(3)
SaveSetup(S)/TGASize(S): 128x128(1)
When you save the sculpt map in ROKURO, be sure that you click on the dropdown box next to "Save as type:" and select "BMP 24bit 62x62 File".
Also, this tutorial specifically refers to the Wings 3D Exporter "wpc_sculpty_080707" (Aug 7, 2007). The Wings 3D Exporter is available from the SL Forums. If you dont have access to the SL Forums, Omei Turnbull (the author) has kindly made it available for free from PK Pounceworks. The files start with "wpc_sculpty_080707".
Here is a quick overview of the steps involved:
1. Import the Sculpt Map into Wings 3D.
2. Import the "UV-Texture-Map.jpg" file into Wings 3D.
3. Apply the "UV-Texture-Map.jpg" file to the Sculptie.
4. Open the "UV-Texture-Map.jpg" file in Photoshop (or another graphics program).
5. Edit the "UV-Texture-Map.jpg" as needed.
6. Save any changes back to the "UV-Texture-Map.jpg" file.
7. In Wings 3D, "Refresh" the texture to see it on the Sculptie.
OK, here we go... :)
Step 1: Import the Sculpt Map
***Note: Dont skip this step by opening a Wings 3D saved file. In order to do this tutorial, you must import the BMP sculpt map file into Wings 3D. This will create a UV Map of the sculpt map.
Go ahead and start Wings 3D.
Click on the "File" option from the top menu bar, select the "Import" option, and click on the square box to the right of "Second Life Sculpty (.bmp)...".
If you see a list of "Topology", select "Sphere". Make sure the "Triangulate" checkbox is unchecked, then click "OK".
Select the "Sculptie Messy Candle.bmp" we prepared in Part 3 of this tutorial series.
You should see our familiar messy candle :)
Click on "Select" from the top menu bar, and "All Faces".
The messy candle will turn red.
Right-click on the main window to bring up the popup menu. Select ".UV Mapping." from the popup menu.
You should see the "AutoUV : STL" window showing you a red version of the UVMap from UVMapper.
Go ahead and close the "AutoUV : STL" window.
Thats it...the UV Map has been applied to the model.
Step 2: Import the "UV-Texture-Map.jpg" File into Wings 3D
Here is a UV Texture Map I created to help work with sculpted prims. This Texture Map will help us figure out which part of the sculpted prim maps to which portion of the texture.
Click on this UV Texture Map image to the left (so you see the image full size). Right-click on the image and select "Save Picture As...". Enter "UV-Texture-Map.jpg" as the file name.
(Note: You might want to save an extra copy of "UV-Texture-Map.jpg" somewhere, since we will be directly editing the "UV-Texture-Map.jpg" file.)
Click on the "Window" option from the top menu bar, and "Outliner".
This will open the Outliner window.
Click on the "File" option from the top menu bar, and "Import Image...". Choose the "UV-Texture-Map.jpg" file.
You should see a tiny version of the UV Texture Map appear in the Outliner window.
Step 3: Apply "UV-Texture-Map.jpg" Texture to the Sculptie
OK, this part is a bit tricky...
First, left-click on the text "UV-Texture-Map". This will select the item.
Next, drag-and-drop the "UV-Texture-Map" item onto the line that has the word "default".
At the "Texture Type" popup, select "Diffuse".
Click on main window (on the messy candle itself) and press the [Space] bar to de-select everything. You should now see the UV Texture Map on the messy candle :)
Step 4: Open the "UV-Texture-Map.jpg" file in Photoshop
Now that we are setup to preview the texture in Wings 3D, its time to open the UV Texture Template in Photoshop.
If you are using another graphics program, you can do the same steps using the graphics program of your choice. It doesnt have to be exact...we have already done the hard part by setting up the preview :)
Start Photoshop and open the "UV-Texture-Map.jpg" file you imported into Wings 3D above. It has to be the exact same "UV-Texture-Map.jpg" file you used above, or this wont work!
Select the Layers palette. Because this is a JPEG file, there should only be 1 layer called "Background". We want to change "Background" to a normal layer.
Right-click on the "Background" layer and select "Layer from Background...".
At the "New Layer" window, click "OK". The "Background" layer has now become "Layer 0".
Change the "Opacity" of "Layer 0" to 50%.
Click on the "Create a new layer" button on the bottom of the Layers palette to create "Layer 1".
Move "Layer 1" below "Layer 0" by dragging and dropping the layer.
Steps 5-7: Working on the Texture in Photoshop
We now have a workspace all setup and ready to paint the texture :)
The semi-transparent UV Texture Template will serve as a guide as we create the texture. Once we are done with the texture, we can just turn off "Layer 0" before saving the final file.
Lets flip back to Wings 3D and look at our Messy Candle...
The top rim of the candle is A7 to H7 and A8 to H8. We want to make this part of the candle lighter than the bottom.
Notice that the melted part of the candle goes from G1 to around G7. The bottom of the candle goes from A1 to H1, and A2 to H2. We are going to make these 2 areas darker than the rest of the candle.
BTW, your candle would probably be different, unless you are using the texture from Sirena Hair & Fashion. So choose areas that match your candle :)
Select a light brown foreground and a dark brown background color.
Then select the Gradient tool. If you see the Paint Bucket tool, Right-click on the Paint Bucket and select the Gradient tool.
Draw a straight line from the bottom of D8 to the top of D6. This will create a light brown to dark brown gradient.
Its a bit hard to see what we just did. So try turning down "Layer 0"'s Opacity from 50% to 10%.
Click on the Foreground color square. This will open the Color Picker.
Click on the radio button to the left of the top "B:" (the one for Brightness). Then pull the slider down to make the color darker. Click "OK" when the foreground color is noticeably darker than the background color.
Select the Brush tool and a large brush (around 13 px). 
Draw some freehand lines from G1 to G7, across A1 to H1, and across A2 to H2. These are the melted areas of the candle.
For better effect, click on the Foreground color square again. Make the foreground color even darker, and draw some more lines in this area.
Now lets see our changes in Wings 3D :)
Click on "File" from the top menu bar, select "Save for Web...", and over-write the original file.
Flip back to Wings 3D. Right-click on UV-Texture-Map and select "Refresh". 
You will notice that the changes we made in Photoshop now shows up on our Messy Candle. How cool is that! :)
You can preview your changes whenever you feel like it. Just save the file in Photoshop, flip over to Wings 3D, and select "Refresh".
Lets finish up our texture.
Go back to Photoshop, click on "Filter" from the top menu bar, select "Blur", and "Gaussian Blur...".
In the Gaussian Blur window, enter "5" for Radius and click "OK".
Click on "Filter" from the top menu bar, select "Noise", and "Add Noise...".
In the Add Noise window, enter "15%" for Amount, select "Gaussian", and check the "Monochromatic" box. Click the OK button.
Click on "Filter" from the top menu bar, select "Blur", and "Gaussian Blur...".
In the Gaussian Blur window, enter "1" for Radius and click "OK".
Go to the Layers palette. Click on the "eye" next to "Layer 0" to hide it.
Thats it...we are done!
Click on "File" from the top menu bar, select "Save for Web...", and over-write the original file.
Flip back to Wings 3D. Right-click on UV-Texture-Map and select "Refresh". Our Messy Candle now looks much messier :)
Feel free to add additional details to the candle by jumping back-and-forth between Photoshop and Wings 3D. Remember you can add layers to help you make changes. Adding layers also help you move things around in case they dont show up correctly in the preview.
Finishing the Messy Candle
Once you are done editing the texture file, save it under a different name. Say, something like "Messy Candle Color Texture.jpg".
Just upload and apply "Messy Candle Color Texture.jpg" the same way you would any other prim texture.
Note that when you apply the texture, you may need to flip the Horizontal and Vertical (by clicking on the "Flip" checkbox). But you will find that the texture looks pretty much like it did in Wings 3D :)
I hope you have found this Sculpted Prims tutorial series helpful! Im sure there will be more tools and development to come in the next few months...so I cant wait :)
91022-071006-827355-61
© 2007 All Rights Reserved.



























































































































































































































.jpg)
