Wings 3D Exporter
An exporter is a plugin for Wings that creates an SL compatible texture file from the .wings model. Thanks to Omei Turnbull.
Version 062107 is here. This release focuses on making the model you see in Wings and the sculpty you see in SL match better. Here are the new features.
Initial templates
To create a model, start by opening one of the .wings template files from the plugin zip file. These templates are named according to the number of segments and slices, and whether faces are represented by triangles or quadrilaterals.
For most models, 32x31tri.wings is a good choice. There is very little advantage to modeling with a 64x63 mesh, and there are significant disadvantages. Of the almost 3000 additional vertices in a 64x63 mesh, only 32 of them will actually have any effect on the sculpty in SL. Unless you know exactly which 32 vertices these are, you just risk being disapppointed because the details of your model rely on some of those 2950+ vertices that are going to be ignored once they get into SL. As for triangular vs. quadrilateral faces, the triangular faces allow Wings to better match the way SL will render your model. The only disadvantage of triangular faces is that it makes the model look a little "busier".
The big benefit of starting with one of the templates, rather than creating a sphere with the Wings command, is that the templates contain UV maps (provided by Hypatia Callisto -- thanks again, Hypatia) that allow you to create and preview sculpty textures using just Wings and any 2D paint program. (For more details, see below.)
Import/Export options
The exporter and importer now have a number of options that allow the SL sculpty to better match the Wings model (or vice versa). To access these options, click on the box on the right side of the File/Export/SL Sculpties menu. If you click anywhere to the left of the box, Wings will export with the default option values.
- Exporter options are
- Bitmap size. The size of the sculpty bitmap is no longer tied to the size of the model. The main reason for this is that experience has shown that to minimize compression artifacts created by SL, it is necessary to create a 128x128 bitmap, with multiple copies of each vertex in the bitmap. Previously, you could do this only by bringing the sculpty bitmap into a 2D paint program and rescaling it. The exporter will now do this for you. The default value for the bitmap size is 128x128, and for most purposes, that is what you will want. Note that if you ask for a bitmap size smaller than the model size, it will be adjusted to match the model size.
- Allow recentering? Without this option set, if your model is not centered on the intersection of the major axes, accuracy can suffer due to quantization error as floating point values are mapped into the 8-bit integers required by SL. Recentering does not change your Wings model; it simply allows the exporter to choose a better coordinate system center for generating the sculpty. The default is to allow recentering, and there is little reason to not allow it.
- Allow rescaling? Without this option set, models that are long and skinny are very prone to quantization error, so this is an important option for those models. However, the default value is for it to be disabled. If it is enabled, the exporter will created a "deformed" sculpty, i.e., one whose length, width and height will all be equal. After the sculpty is rezzed in SL, you will have to stretch it back to its original shape. The extra step makes this an "advanced" technique, but the increased accuracy of the result makes it very worthwhile.
- Importer options
- You now have a choice between creating triangular or quadrilateral faces. The default is triangles. As mentioned above, triangular faces allow Wings to better match the way the model will look in SL.
Texture previewing
If you start with one of the provided templates, you can use Wings in combination with any 2D paint program to texture your model. The steps to do this are:
- From the Window menu on the Geometry window, select Outliner. The Outliner window shows you all the components of your model. Left-click on the item "Default Sculpty Texture". Release the mouse button, left-click on the texture line again and then drag and drop it onto the "Sculpty Material" line. When prompted, choose "Diffuse". (There is a quirk in the Outline window that requires separate actions for first selecting an item and then doing something with it.) Your model should now be wrapped with a pattern of black lines and colored squares labeled with letters. This is the default texture, with the required Sculpty UV map. The pattern will guide you as you are painting your texture.
- Have Wings create a new file for the texture bitmap by right-clicking on the "Default Sculpty Texture" and choosing Make External. (Remember, when using the Outliner window, the context menu refers to the item that is selected, not the item your mouse is over. If the context menu doesn't contain the options you expect, it's probably because you forgot to first select the line with a left click.) Name the texture file whatever you want, but be sure to choose a name that distinguishes it from the sculpty bitmap file.
- Open the file you just created in your favorite paint program. You should see the texture that is wrapped around your model in the Wings window. To help orient yourself, select your whole model in Wings and open the UV Editor window from the Windows menu. You should see the same texture bitmap you see in your paint program. Now put both the Wings Geometry and UV Editor windows in face selection mode. (That's the third icon of four in the middle of the icon bar at the top of the window.) Now, when you choose a face of your model in the geometry window, the corresponding area of the texture in the UV Editor Window will also be highlighted. Use this as a guide to where you should paint with your paint program. Proceed to paint your texture. Wings will not reflect your painting as you work, but when you want to update Wings' view, save your file in the paint program, right click on the texture line in Wings' Outliner window and choose Refresh.
- When you are satisfied with the results, you export the sculpty bitmap file from Wings. The texture file you painted is ready for use; it is not processed by Wings.
Other changes in this release
- Export Selected: I've re-enabled this option, since it is useful if you have have multiple objects open in Wings at one time. In that case, select the one object you want to export and choose the Export Selected command instead of Export. Beware, though, that Wings will easily shift from the (commonly used) Export to the (rarely used) Export Selected if your mouse passes over the Export Selected line as you move to the Export sub-menu. If exporting gives you an "Unsupported mesh size" error when you know your mesh is OK, it's probably because you executed Export Selected by mistake.
- Texture orientation in SL: I've rotated the sculpty bitmap so that you shouldn't have to rotate the texture in SL when you apply it to a newly created sculpty.