What you will need
- A copy of a 3D Modelling Software. For the purpose of this tutorial, I've used 3D Studio Max
- A Raster Graphics package. For the purpose of this tutorial, I've used Photoshop. Free tools such as GIMP are available here.
- The ColladaMax plugin
- The NVIDIA DDS Plugin
- Fully rigged Male / Female avatar models
Modelling Custom Sneakers
Start with the Male/Female avatar 3DSMax scene files. We will use the avatar model to create our custom shoes design- in this case a pair of sneakers.
Before we begin Modelling, set the following Viewport setting-
- Turn Viewport Clipping ON, using the Viewport Configuration Panel. This helps you get close to observe your modelling work. The Figure below shows this as the yellow slide-bar at the edge of your viewport.
To start, you should hide ALL layers apart from the _modeller layer using the Layers Panel. Next, select m_feet and delete the Skin modifier from the Modifier list. Hide the remaining objects using the Layers Panel.
The object m_feet will act as a reference around which we will build our custom sneakers.
The Next Step is to create the Geometry of your custom designed sneakers. We will be using Splines to draw out the contours of your sneaker. We will then use the CrossSection modifier to convert the splines to Geometry. If you haven't used the CrossSection modifier before, you could use an introduction to it. Also check out an introduction to the Surface modifier, which we will be using as well.
The figure above shows a pair of sneakers created from a simple Spline. We will use the Spline to create contours around the feet (m_feet). The CrossSection and Surface modifiers are used to convert these contours to Geometry. Finally we will apply Symmetry to generate your custom sneaker for the other foot.
In the figure above, Line01 shows up in Orange highlights. The Geometry has been generated using the CrossSection and Surface modifiers. We will now go through all the settings for each individual stage.
Creating the Splines
First, select Splines in the Create tab. Using Line, trace out an outline of the Right Foot. Make sure it's as close as possible to m_feet. Add the Edit Spline modifier, and select Edit Vertex mode to make any adjustments. Now select Edit Spline mode, and the Move Tool. Hold down Shift, and duplicate the spline in the positive z-direction. In the figure above, I've duplicated the original spline six times to create seven contours.
Next, Add the CrossSection modifier, and set the Spline Options to Linear. Add the Surface Modifier, and make the following Options settings-
- Threshold: set to 0
- Flip Normals: checked ON
- Patch Topology: set to 0. This controls the polygon count. Setting this to 0 ensures that we meet clothing specifications.
To Edit the Geometry (even at this stage), simply select Edit Spline in the modifier stack and then Edit Vertex or Edit Segment. Make sure the Show End Result button at the bottom of the modifier stack is switched on.
Convert to Editable Poly
After we have generated the sneaker on the Right Foot, convert your sneaker to Editable Poly, and rename it to m_sneakers_funky. First cap the open edges and refine your Geometry. The figure below shows an example of good Geometry for your sneaker.
Now select m_feet, and delete the Left Foot. Delete the faces of the Right Foot that will be hidden by your custom sneaker. Attach m_feet to m_sneakers_funky, and weld the vertices.
Use Smoothing Groups to ensure that your sneaker looks great.
Laying out the UVs and using Symmetry
The CustomClothes creation Tutorial has great information and links to great tutorials for laying out your UVs. It's important to lay out your UV Map so that there is no Texture Warping.
The diagram below shows the UV seams layout that you should use such that seams are tucked away at the top, bottom and reverse sides of your sneaker.
TIP: Apply a standard Checker material while working so you can see the results of your UV Layout Dynamically.
Once you have laid out the UVs for the Right Sneaker, use the Symmetry modifier to duplicate your work to the Left Sneaker.
Add the Symmetry modifier to generate the sneaker for the Left Foot. Set the Mirror Axis to X, and use a low Threshold value (such as 0.01).
Rigging your Custom Clothes
The CustomClothes creation Tutorial explains the Skin Wrap modifier settings required to correctly rig your custom clothes. The same procedures and techniques will apply.
Texturing, Normal and Specular Maps
There's fantastic information and links to informative websites in the CustomClothes creation Tutorial that will help you create the Diffuse(Color) and Normal Maps that you will need to texture your custom sneaker.
This section details the Material to be applied before your custom sneakers are ready for export to Twinity.
First create a Multi/Sub Object material. Set the number of slots to two. You will use DirectX Shaders for each of the two slots. The figure below shows the configuration of the Materials Editor window.
The DirectX Shaders (.fx files) that you will use are located in your Twinity Install directory, and are detailed here-
- Body (Material 1) - (installlocation)\ Metaversum\Twinity\res\bw\shaders\std_effects\ fxcharacter_skincolor_normal.fx
- Clothes (Material 2)- (installlocation)\ Metaversum\Twinity\res\bw\shaders\std_effects\ fxcharacter_normal.fx
Apply the Material to your custom sneakers and you can view the results in the Max Viewport.
This section details the procedure to Export your completed custom shoes to Twinity. First, hide all objects apart from your custom designed shoes. Use the Layers Panel to do this. This is very important.
Next, export your completed sneakers to the .DAE (Collada Format) using the Export function in 3DSMax.
Editing the twml file
The TWML Specification lists fantastic examples to add your Custom Clothes to your Avatar. Refer to the Clothing Slots section 18.104.22.168 for the different types of Clothing and Accessories that are supported.
POINT TO NOTE: Ensure all of the Export Files (i.e. the .twml, .dds, .dae, .max files) are at the same location for simplicity.
Refer to the Downloads section for the sample twml file and 3dsmax scene file.
Using your Custom Clothes in Twinity
To wear your custom designed Jacket, select the option to Customize your Avatar's Look. Select My Computer, and navigate to the location on your computer where the twml file is saved
POINT TO NOTE: You need to be a Premium Member to upload Customized Content to Twinity from your computer.
Select the twml file you have created, and then click Dress.
<package caption="Funky Sneakers" icon="icon.jpg"> <description>Funky Sneakers</description> <clothes path="sneakers.dae" skeleton="male"> <clothing_slot type="feet"/> </clothes> </package>