Site hosted by Angelfire.com: Build your free website today!

Index > Main menu > Tutorials

UV Mapping in Softimage|3D
Page 1 2

 


PAGE TWO - Local UV sets - The modeling and animation approach


4- Local UV sets

There is a time when you need to use local materials on an object, each with their own UV coordinates. So we will how to use one map on several local materials on the same object.

From the tutorial database, load the scene localUVsets -> start.

In the camera viewport, click on Setup.
Enable Hardware Texture, and set Display Optimization to None.

Select the terrain-like grid (well, it's the only present in the scene...).
Do Matter > Material. Define kind of material you want, it has no impact on what we're about to do. Click Ok.

Then start selecting polygons with the G supra key. Select all the polygons that are at the lowest level.

 

Then do Matter > Polygon > CG_AutoProject+

This tool will do many things. In one go, it applies a local material, a texture and a projection.

Click on Browse to select the texture. Select ForestWaterRock.pic. Or you can select the texture if listed in the Texture Image List.
Then click Apply. You'll see that the texture shows up in the camera viewport, applied on the object.

 

Now, change the Roll Angle and click Apply. You'll see that the texture has rotated. The Roll Angle allows you to define a basic orientation for the projection. Click Apply everytime you want to the changes updated in the camera viewport.
Resst the Roll Angle to 0 and click Ok.

Then, you can change the local material that has been creating to suit your likings.
In the Schematic View, turn on Matter Mode, select the local material and hit Matter > Material.
We want a water-like surface, so let's put some parameters that approximates water. You also use a Constant material just for the sake of this tutorial.

You could also modify the properties of the local texture by hitting Matter > Texture > 2D Local.
Please note that is you intend to use a tiled texture (repeated many times), you must NOT set it to more than one repetition at this stage. If you do that now you'll end up with incorrect results.

 

Select the grid, then click on Matter > Paint.
Enable Hardware Texture and set Optimization to None.
Click Convert to UV. If anything is checked in the dialog window, uncheck it. Click OK.

Tip
Before going into the Paint module, it could be good to set the local material to something different than the global one. If both are identical, it will be hard to distinguish the polygons to select in the Paint module.

Select the polygons that have the local material.
Then check Show UV.
Now, edit the UVs with the SRT tools to fit them only on the water surface.

Click Accept when you are happy with the mapping.

Now, at this stage, you can go back in the Texture > 2D Local window, and increase the number of repetitions for the texture. However, note that if the texture you are using contains different "areas", like the texture we are using right for this exercice, the entire texture will be repeated, not just the part that we have mapped. If you just want a part of the texture to be repeated, you would have to crop the texture in the 2D Local window before going in the Paint module, exactly the opposite I told you to do so far. But in this case, cropping the texture is acceptable.

That's it! Now you can do the exact same way the rest of the object. Let's do it.

 

With the G supra key, deselect the previously selected polygons select the polygon that form the cliff.

Then do Matter > Polygon > GC_AutoProject+
Select the same texture (ForestWaterRock.pic).
Click Apply to see it displayed in the viewport.
Click OK to validate the operation.

Change the local material if you want.
Change the local texture parameters if you want (but do not crop and do not repeat the texture).

With the object selected, click on Matter > Paint.
Click Convert to UV, uncheck everthing, click Ok.
Select the polygons in the 3D view so their UVs show up in the 2D view.
Edit the UVs with the SRT supra key to fit them only on the rock area.

Click Accept.

Then do the rest of the polygons using the exact same procedure. This time, map only the forst part of the texture.

If you open the scene locaUVsets -> done, you'll see that I cropped the texture for the forest area and repeated it.

Note: Youcan use individual textures instead of one.


5- The modeling and animation approach

For more complex objects, like a character, the previous method won't be enough. At that point, you will need to literally "unwrap" the character limbs for the projections to work. If you use the previous method, you will have one hell of a time editing the UVs in the Paint module, as they will overlap.
But there is a way to prevent this. It consist of unwrapping the geometry, prior to the proper UV editing. This way you'll minimize the UV editing process, and it is a lot easier to modify the geometry than the UVs.

Open the destructive -> start scene.
Once again, we will use our state-of-the-art terrain model, just to show how to use the technique.

Select the object, and duplicate it as many times as you think you'll need different projections. In this case, we already know that we need 3 projections: one for the water, one for the cliff, and one for the forest. On more complex objects you'll need a little of planning. So make 3 duplicates of the object.

Select the first copy, and hide the others.
Select the polygons that are not part of the water.

Switch to POL mode, and delete the selected polygons.

Duplicate this object, and hide the duplicate (we will see later why we duplicated this object).

Now switch to TAG mode. Tag the points of the object, and place them, as evenly as possible withouth changing the shape too much.

Then apply a material and a 2D Global texture. Choose a projection method.
Do not crop the texture. Click OK.

Then go in the Paint module, convert to UV, accept the default parameters.
Then select all the polygons in the 3D view, and edit the UVs to fit them only on the water surface. Don't forget to check Show UV.
Click Accept.

Now hide this object, and unhide the second one.
Select all the polygons except those forming the cliff.

In POL mode, delete the selected polygons.

Again, duplicate the object and hide it.

In TAG mode, edit the geometry to make it as flat and even as possible. For instance, scale it down on the X axis and move down some vertices.

Apply a material, apply a texture, apply a projection (select XZ).
Go in the Paint module, convert to UV.
Select polygons and edit UVs to they cover only the rock texture. Click Accept.

Hide this object and unhide the thrid copy.
Repeat what we just did, but this time keep only the polygons for the forest area, don't forget to duplicate it and hide the copy, use an XZ projection, and place the UVs on the forst area.

Now, you will unhide the individual copies we created after deleting the polygons on each object.
They will be used as a shape animation target to give back the original shape of the objects we modified.

Select the first of the 3 objects (the water one), the one that we modified and textured.
Do Animate > Shape > Select Key Shape. Pick the corresponding duplicate object.

You can see that the textured object got the same shape as the non-textured object. In other words, we just restored the original shape of this object.

Do this for the 2 other textured object.

 

When the 3 textured ojbects are back to their original shape, select them all, and do Model > Effect > GC_Merge+

This tool will allow us to merge not only the geometry, but also all UV information from the 3 objects.
Leave everything unchecked.

Now, if you hide everything except the merge object, you'll see that we now have one object, but with all materials, textures and UV coordinates!

Other notes:
You must go through this process before performing any rigging on the character. Since the original object is not used, you will loose any rigging you might have done on it.
Also, since it involves destruction and reconstruction of the object, you won't be able to make changes after you rigged the character, unless you are willing to reweight everything.
One important thing is to not change the topology (adding vertices, removing polygons) of all the objects. Otherwise, the vertex count will differ at some point you won't be able to restore the original shapes before the merge.