Avatar Hair

Hair is one of the most defining characteristics of an Avatar. Arguably more so than any other characteristic (of human Avatars, anyway). In IMVU, you have the power to create your own Hairstyles - anything you can think of. Mohawks, Bobs, Crew Cut, Ponytails. Your only limitation is your imagination, however, there are some technical skills required - building in 3D, creating Textures, Mapping those Textures and Weighing the Mesh. While many of the basics of Hair construction are shared with other Body Part creation tutorials, this tutorial will walk you through the essentials of Building Hair and Hats. For the purposes of this tutorial, we assume you have read:
Avatar Body Parts Introduction
Weighting in Skin Tutorial
Export the Mesh - .xmf Tutorial
Export Materials - .xrf Tutorial
Create Mode Introduction

Get the example files To start, you must get the two Weighting files which are automatically installed by the IMVU Unified InstallerWith one of these files open, zoom into the Avatar Head and select the Hair Mesh.

Remember: you can build your own Mesh at any time during this tutorial.

Build to the Head
With the Hair Mesh selected, you can see how it conforms to the shape of the Avatar Head underneath. The default Avatar Heads in IMVU are of an enlarged, Anime style. All of the accessories and hairstyles in the catalog have been built to fit these default heads. If you want your Hair product to work across most of the IMVU Avatar Heads in the catalog, then your Hair Mesh should be built to fit the Default Avatar Head embedded in the Master Weighting files.

Note: Your Hair will look enormous in order for it to fit the original Head. This is OK, though, as the size of the Head varies across products due to the Mesh Scale Feature.

To learn more, please consult the Mesh Scale Tutorial.

Ears & Neck
If you are making a long Hairstyle, that is meant to cover the Ears & Neck, then you can move on to the next section.

If you need to wrap around the Ears & Neck for any reason, then read on.
Although you are free to use your own shapes, the shape of the Hair around the Ears & Neck typically fits snugly to the Head Mesh. This is really handy as this means you can avoid "Z fighting" along those edges.

Z Fighting Explained
When two Polygons live very close together in 3D space, rendering engines have a tough time deciding which to draw first. The result is an annoying, shimmering effect. This looks especially bad on products that interface with an Avatar Head as that is what most people are looking at when chatting.

To avoid Z fighting, you can snap your Hair Verts to the same exact location as the Head Verts.

Two Materials
One Body Part can contain multiple Materials. For example, the Avatar head contains both the Head Skin, Eyes, Eyebrows and Eyelashes.Hair Meshes can contain two materials: one for Hair and one for Hat. Obviously, you can use these two Materials however you like on the Body Part that is meant to Override the Hair slot. Said another way, you could use the 'Hat' Material for a Hairclip or helmet, etc.
To see the materials in 3dsMAX, open the Material Editor and use the Eyedropper to select the Avatar's Multi-Sub Material. The Material ID for Hair is ID 5 [4] and the Material ID for Hat is ID 11 [10].

Budgets
Please remember to keep the Polygon count of your hair as low as possible (while still looking like what you intended to build).One of the biggest complaints IMVU receives is the time it takes to load a scene that contains Avatars with Big Hair. IMVU will no doubt have to take action against such products in the future. Don't let your products get mathematically reduced as that will definitely affect the final look.

Hats Amore!
Although a Hair Body Part is made up of one Body Part ID, it can contain a Hat as well. Think of it as one product that contains both Hair and Hat. This is handy for things like Helmets as you can force the Avatar to not wear a spikey mohawk when wearing the Helmet.

Mapping
Once you have built your Mesh, it is time to Map it. To learn more, please consult the Avatar Materials and Texture Mapping Tutorial.

There are some Hair-specific Mapping points you should know as well. The most important is that it is a good idea to spend time getting the Mapping on your Hair to be as highly customizable as possible. This means that the Mapping on your Hair is detailed and refined.
You could apply a Plaid Texture to it and see each vertical and horizontal line evenly applied to the whole Mesh. Giving your future derivers the ability to expand on the details in this way ensures a highly derived product and, therefore, more sales.
IMPORTANT NOTE:
You will find there will be occasions when overlapping two Textures, each containing Opacity Maps, can cause the furthest Texture to disappear. This is an artifact of the way the IMVU client Renders Textures and Geometry in 3D. This is most likely to happen when a Hairstyle contains an Opacity Map and is viewed through a window that also contains an Opacity Map. The effect is that both the Hair "may" disappear.

Weighting - Use 'Skin' for solid masses
Once you Hair Mesh is built the way you like it and Mapped to allow other creators to easily create Textures for it, it is time to 'Weight' it.For Hairstyles that are meant to move entirely with the Head, we recommend that you use the 'Skin' Weighting Modifier in 3dsMAX.

To learn more, please consult the Weight a Mesh Tutorial.

Export .xmf
Once you have a Mapped and Weighted Mesh, you can Export it. Choose the Export option in the File menu, browse to the 'Cal3D Mesh File (*.CMF, *.XMF)' option and name your Mesh.

Remember: you must manually add the '.xmf' at the end of your Asset name or you will end up Exporting a useless .cmf file.

Editor - Body Part Override
Open Create Mode and choose to derive from Product ID 10866 for Female Hair or Product ID 344 for Male Hair. The Config tab in the Editor contains the Clothing Override - Body Part IDs panel. The Body Part to Override in the Editor is '1'.

NOTE: You will not actually need to make any changes to this panel if you are deriving from an existing Hair product.

Editor - Add Mesh
In the Meshes tab, click the Add .XMF button to browse for your newly Exported .xmf file. Then select the Apply Changes button.

Your new Mesh should appear with the existing Material applied to it. If this is the case, move on to the next step.

If this is not the case, then something went wrong in the Export process. If so, you will need to check:
1. the Weighting in MAX (is the Skin Modifier turned on? Are the Vertices Weighted?)
2. the skeleton .xsf file (did you use the 'Female04_Anime01_SkeletonMASTER.xsf' file supplied in the IMVU Unified Installer?)
3. the Exported Asset's file type (it should be '.xmf' - not .cmf or anything else)


Editor - Add Textures
In the Texture Assets panel of the Materials section, click the Edit buttons to change the Texture for your Diffuse or Opacity Maps.

Remember: If you don't want Opacity on your Hair product, you can either click the delete button or just add a completely White Texture.


IMPORTANT NOTE:
You will find there will be occasions when overlapping two Textures, each containing Opacity Maps, can cause the furthest Texture to disappear. This is an artifact of the way the IMVU client Renders Textures and Geometry in 3D. This is most likely to happen when a Hairstyle contains an Opacity Map and is viewed through a window that also contains an Opacity Map. The effect is that both the Hair "may" disappear.

Editor - Save & Upload
Save this product and Upload it. Congratulations! You've created a new Avatar Hair product that can be derived from by thousands of Creators from around the world.
© 2017 IMVU All rights reserved