[PS-Youtube id=”wCJRgWRe0AQ” w=”320″ h=”206″] hello and welcome to my mesh attachment tutorial.
In this tutorial i will create a simple dress,
by using the Avastar character as template model,
together with a shrinkwrap modifier.Note that this tutorial does only cover modelling.
If you want to know more about weighting and rigging
then please advance to the follow up tutorials:Avastar: Rigging tutorial
Avastar: Weighting tutorial



Hello and welcome to our mesh attachments tutorial.
In this tutorial we will create a simple dress
by using the Avastar-Character as template model,
together with a Shrinkwrap modifier.

Note that this tutorial only covers modelling.
If you want to know more about weighting and rigging
then please advance to the follow up tutorial,
namely the weight-paint survival kit.

So, let us first create the basic character model.
We have added a template for your convenience,
and this template creates an already textured Avastar model.
You get it from: File, open template, Avastar textured.

However, if you do not have Avastar installed,
then you can use the character from the avatar workbench
as a replacement.

Creating the Character

Now for the dress:
I will use a simple cylinder here,
and i define the shape
by using the shrink wrap modifier.

Create the Cylinder:

Go to Object mode,
then create a new mesh cylinder.

This cylinder comes along with 2 caps.
These caps are made out-of-faces with more than 4 edges,
also named: n-gons.

But we do not want these caps here,
so let us delete them.
We can do this in the operator panel
by disabling the creation of the caps.
Or we can simply select the faces and then press x
to delete them by hand.

Well, here is our dress prototype,
and in the next step
we will align it roughly to the character.

Aligning the Mesh

Please ensure that all vertices of the cylinder
keep outside of the character mesh,
and do not worry about the shape:
we will take care of that in a moment.
Just in case you forgot about it:
You can select an entire edge loop by holding down the ALT-key,
then press the right mouse button.

The shrinkrwrap Modifier

Now it’s time to get some form into this item.
go to the object modifiers tab,
and from there, add a shrink wrap modifier.
Change the mode from nearest “surface point” to: “project”.
This works much better for our purpose
than the default settings.

We also need to specify to which target
we want to shrink the object.
Apparently we will use the upper body mesh here.
Still nothing happens ?
That’s because the default setting is not to shrink, but to expand.

So enable negative shrink direction.
And in order to better see what happens,
enable also the triangle-icon in the modifier header.
And now you see immediately how the modifier modifies the mesh.

But hold on:
We need to shrink wrap the
lower part of the dress to the legs:
and not to the upper body.

Fortunately, the modifier allows us to add a secnd shrinkwrap target,
the auxiliary target. so we select the lower body mesh here.

But now we immediately run into a problem.
The modifier finds no target faces inbetween the legs ,
so it simply does nothing in this area,
and the mesh gets odd.

But fortunately there is a rescue available.
We remember that the Avastar character also contains a skirt mesh,
and we can use this as shrinkwrap target,
instead of the lower-body mesh.

So let’s simply change the auxiliary target to the skirt mesh.
But note that the Avastar skirt mesh does not need to be visible
to make this work.

However let me make the Avastar skirt visible for a moment,
so that we can verify that the lower border of the dress indeed
matches up with the skirt template.

But actually I prefer to keep the skirt template invisible.
So let us hide it again.

Also let me quickly add a material here,
so that we can better see what’s going on.

Now let us get back to the shape.
This dress still does not look pretty,
and we have to do something here to change that,
so let us create some additional edge loops.

The mesh Info Tool

But let me first open the mesh-info tool.
There: you can monitor the mesh statistic,
while you modify your mesh.

We have added a mesh calculator
which tries to guess some estimate from the statistic data.
Actually we try to estimate reasonable levels of detail
and calculate the most probable download costs.

But be aware,
this is by no means a precise tool.
However, it gives you a very rough idea
about how heavy your mesh will
become later in your target world.

Adding Edge Loops

So, back to shrinkwrap.
You can add an edge-loop by pressing
Ctrl + R, then move the mouse over the mesh.
The purple line indicates where the loop will be placed.

You also can use the middle mouse roll button to add
more than one loop at once.

And after you clicked on the left mouse button,
you still have the option to adjust the exact placement of the loops
by dragging the mouse.

And a secnd left-mouse click terminates the edge-loop tool.

We can see, how nicely the shrinkwrap modifier
projects the vertices to the upper body and the skirt,
so the dress shape is created almost automatically.

But please keep an eye on the mesh-info panel:
Check your download costs frequently
to avoid getting surprised
when you later import your mesh to your target world (OpenSim and compatible)
and see high land impacts.

Reducing mesh costs with Smooth Shading

And here is one of the most important hints
for reducing the download costs dramatically
and also get your mesh much smoother than it is right now.
So, at the moment the dress looks faceted
and you can spot every single face.
You might be tempted to add many more loops
and use much smaller faces to get the mesh smoother.
But that is absolutely not needed.

All you actually need to do, is to go to object mode,
and enable smooth-shading for your mesh.
As you can see in the mesh-info box,
this setting reduces your effective vertex count1 dramatically,
and as you can see in the viewport,
your mesh now looks much smoother.
So what do you want more than getting better results
and pay even less for it ?

1 : The effective vertex count is dependent on the model vertex count, the complexity of the associated UV-Map and the number of vertex normals needed for the Mesh. In our case the number of vertex normals reduces by a factor of ~3 when you set the model to smooth, thus the effective vertex count reduces as well . If you want to know more details, then please watch  my video about vertex normals

Shape sliders

Ok, let us keep smooth-shading turned on,
and go back to our base mesh.

Well, that still looks a bit odd. But hold on!
Remember that we can change the dress shape
of the Avastar character?

You find the shape sliders
in the Avastar object-properties section.
Locate the skirt controllers,
and set both controllers to your taste.

Now the shrinkwrap modifier magically influences our own mesh
according to the changes of the Avastar skirt shape.

Ok, that starts looking promising,
but let me do some additional
fine adjustments here for apparent reasons.

Well, for now this looks good enough to me.

Using Shrinkwrap offset

However, let us take care of one final issue
before we come to the end:
We see the base character mesh poking through our dress.

Actually you may want to avoid this problem and make the
character mesh invisible by using an alpha mask.

But we also can use the shrinkwrap modifier
again for our rescue.
Here we can set an offset,
which lets our mesh hover above the shrinkwrap target.
So let us do this for a quick fix.

By the way, we even can use a weightmap
to control the influence of the shrinkwrap modifier.
But we will keep this method aside for a later tutorial.

So, our basic dress model is finished by now.
If you want to know how this model can be rigged and weighted,
then please advance to the follow up tutorial:
the weight paint survival kit.

Have a nice day,
and thank you for watching.