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

Index > Main menu > Tutorials

UV Mapping in Softimage|3D
Page 1 2

 

One topic has very few available online resources, namely UV mapping. So here I will provide some common technique to edit UVs and projection onto polygonal objects.

Download the tutorial database here.

Credits
Redaction: Bernard Lebel

Thanks to lard, highend3d member, for informations on the techniques.


PAGE ONE - Basic UV mapping - Game-like mapping - Creating a UV stamp


1- Basic UV mapping

We will start with something very simple. We will simply "unwrap" an object UVs.

Load the SimpleUVmapping -> Start scene from the tutorial database.
This scene contain a simple object with a texture applied to it. If you preview (Matter > Preview > All), you'll see that the rocky texture stretches where there is a cliff.

 

We can easily fix that by converting the projection, currently XZ, to a UVW one.

To summarize, the difference between the two is that the XZ method to project a texture based on an axis. The UVW one (referred simply as UV) is made of coordinates that are provided by sample points. These points are on the vertices of the objects, and there is one sample point per polygon adjacent to the vertex.

Select the object, and click on Matter > Paint.
This will load the Paint module, wich contains many tools to work on textures.
You'll that at the left the current texture is loaded, while at the right there is a camera viewport showing the object.

Check Interactive 3D
Click on Setup, at the top right corner.

 

Check Enable Hardware Texture, and set the Display Optimization to None, then click Ok.

 

This will display the texture in Constant mode applied on the object in the 3D view, and will maintain this display if you move in this view.

Click on Convert to UV, and accept the default settings.

 

The projection has been converted to a UV one. We can now edit its coordinates.

In the 3D view, hold down G and select with the left mouse button some polygons, exactly like when doing a raycast selection. You'll see that the selected polygons are outlined in red. You can deselect them with G and middle mouse button.

 

Select all the polygons in the middle area, exactly as on the above picture.
Check Show UV.

This display, in the left view, a wierframe with vertices. These are the interconneted samples points, in other words, a graphical representation of the UV coordinates.
Each vertex in this view is a UV coordinate, that define the position of the texture on the object. So instead of distorting the image to remove the stretching, you'll modify these coordinates.

It's very simple. You can tag the vertices and edit them with the SRT supra keys, wich are X for Scaling, C for rotating and V for moving. Try to tag several points and move them.
You will see the selected points turning green in the viewport.

 

You can also move individual points with the M supra key. You can zoom and pan.
You'll also notive then when you move a point, the stretching of the texture updates in the 3D viewport.

So now the only thing to do is to move the points to try to eliminate the stretching on the cliff.
If you place the points more evenly on the texture, you'll remove the stretching on the object.

 

When you happy with the editing, click Accept.
If you preview once again, you should get something like this:

We are now very happy with the mapping.

 

Other notes:
If you go
in the Texture 2D Global window for the object, you'll see that the Mapping Method drop down menu now allows you to select a UV projection, wich is normally only available for NURBS objects.

You can come back later at any time to reedit the UVs.


2- Game-like mapping

There are times when you have to use all the textures of several objectst on a single map. Although this is technique used in game design, it is also very useful for broadcast production.

Open the scene gamelikemapping -> start from the database.
Basically, what we want to do is to use a water texture for the blue grid and a forest texture for the green grid.

Select the blue grid, and do Matter > Texture > 2D Global
Click the second Select button (under Picture Filename), and choose the WaterForest.pic texture.

Specify a XZ mapping method.
You can see on the texture that the two types of surface we need are on one map. Click OK.

When you do this kind of mapping, i.e. when you use a single map on several projections, it is important that you do not crop the texture in the Texture 2D Global window. If you crop the texture, the texture will show up entirely in the Paint module, but if you move samples points outside the cropped area (that is not recognizable in the Paint module), the texture outside the cropped area will not be considered and the material will be visible at that spot.

Then select the green grid, and do the same.
Both object now have the same texture, but use it equally, wich is not good.

Select again the blue grid, and click Matter > Paint.
Turn on Hardware Texture and Interactive 3D.
Click Convert to UV, accept the default parameters.
Select all the polygons in the 3D view, with the G supra key.

Now, in the 2D view, edit the UVs so it convers only the water part of the texture, using the SRT supra keys.

Click accept when you are done.

Then select the green grid, and repeat the same process:
Apply the same 2D Global Texture without cropping it. Specify a XZ projection.
Click on Paint.
Click Convert to UV, accept the default parameters.
Select all the polygons in the 3D view.
Edit the UVs in the 2D view they all fit on the forsest texture only.

 

And we are done. If you preview, you'll that the two objects use the same texture a different part.

 

You can put any amount of parts on a texture and use it anytime you want in the scene, and you'll greatly reduce render time.

Now, we'll how to stamp different objects on the


3- Creating a UV stamp

Many times you'll want a print of the UV map on a texture, so you can import it in a paint package to paint a texture on it. You can do that with the Paint module.

Open the simpleUVmapping -> Done scene.
The first thing to do is to apply a plain white texture on the object, and specify a projection (if you already have UV projection, choose it).

Open the Paint module. Edit the UVs if necessary, using the method we just saw.

You can change the displayed texture on the 2D view by clicking on Clip DB button. This will toggle the 2D view with a list of the textures applied on the object.

If you want to change wich texture is to be displayed in the 2D view, click on the thumbnail of the picture and click again on Clip DB. Choose the plain white texture.

Now select all the polygons on the object in the 3D view to display all the UVs of the projection.
Then click on the Effects menu and choose Stamp UVs.

 

It might not be apparent at first, but the UVs have been printed on the texture. If you deselect some polygons in the 3D view, you'll see that there is now a pattern of the UVs on the texture.
Click Accept.
You will then be promted to save a file. You should write a new name, referring to the stamped UVs. In our case, name it stampedUVs, then click Save.

Now if you open the stampedUVs.pic file in a paint program, you'll see that the UV map is there. You can use this picture to create your textures.

 

Now we will see how to stamp several objects on the same map, in case you use the game-like mapping method.

Open the gamelikemapping -> done scene.
Select the blue grid, do Matter > Texture > 2D Global. Click on Next (click OK if prompted to add a new texture), and choose the WaterForest_blank.pic file. A plain white texture shows up, the same dimension as the previous texture. It is on this texture that we will bake the UVs.
In the Mapping Method menu, choose the UV projection (obviously there must be one!). Click OK.

Then apply the same texture to the other object (the green grid, using the UV projection already there).

Reselect the blue grid, and click on Paint.
Select all the polygons in the 3D view. The UVs coordinates show up in the 2D view. You can see that they are the same UVs as we did earlier.
Then click Effects > Stamp UVs.
Click Accept.

Leave the same name, and overwrite the existing file.
If you go back into the 2D Global window, you'll see that the texture now has the UVs we just stamped onto.

But the nice thing is when you select the other object, and you open the 2D Global window. Since it is the same texture, you'll see that UVs of the first object are present on this one!

So with the green grid still selected, click on Paint.
You'll immadiately notice that the map also features the UVs we stamped a moment ago.
Select all the polygons in the 3D view.
Click Effects > Stamp UVs.
Click Accept, and once again leave the same name and overwrite the existing file.

Now, if you open the file in a paint program or view it in the 2D Global window or in the Paint module, both objects have their UVs printed on it.

 

You can now use this image to paint your texture for all the objects that use these coordinates.
You could also create a new file the first time you perform the Stamp UVs, then apply this new texture to the other objects instead of overwrite the original blank one.

 

Next: Local UV sets - The modeling and animation approach