morphMap < download > version 0.49b

morphMap is a tool to map low-res objects (as those used in video games). Works on meshes and polys. Now It's a multi-select tool : you can select several objects at the same time or you can select severals groups of faces of the same object (It's the new option 'Cluster' which is actived by default).
The interface is left/right dockable.

morphMap is composed by 3 main modules :
+ the function 'morphMap' : the picture follows the mapped surface in one click.
+ the function 'Face Map' : an advanced face mapping.
+ a set of functions to operate on UVs.

The function morpMap :

At first, morphMaph was conceived to c
reate mapping coordinates on a nonrectangular surface as you could make it by the hand. These coordinates are completely between 0 and 1. The UVs are deformed to fill all the space UV.

Is it mathematically exact?
That depends on your surface.

At first, morphMap was conceived to work with flat and convex surfaces. In that case, it will give an exact solution.

If your surface is concave (not convex), that depends on his regularity.
It will work or not according to the aspect of the edges of the surface.

If one of 4 edges of your surface forms a Z or a S, the script will not give a good solution.
However if you apply mapping coordinates on this surface in several steps, you can map numerous of concave forms. For example, a road 'S' can be mapped in several steps (see the examples).

Visually you see immediately if the result is correct or not. In case of doubt, show the grid: if the grid don't show an overlapping, the solution should be correct.

At first, morphMap was not conceived to map volumes. However I realized that a small number of surfaces presenting a volume could also be mapped with morphMap. It is the forms whose volume is identical between 2 edges oposite (see the examples).

The new advanced face mapping :

This new function is intended to replace the 'face mapping' which exist in the UVW mapping modifier.
'Face Map' allows to map correctly all types of faces (with 3 points, 4, 5, 6, 7 and more...)

In addition, the UVs are oriented of an consistent and useful way. You will not any more spend time reorientating faces.

A mesh can be mapped either like a set of triangular faces or at his polygonal level (thanks to the edges visibility).

There are some options :
+ the ability to turn the invisible edge of a quad selection
+ For triangular faces, the function sk U/V (skew) allows to move the top of shifted triangles
+ the function T (turn) allows a rotation of the UVs array on the faces with 3 and 4 points.

Here is an example of Face Mapping on a complex form. At the top, you will find the result by using  the standard option 'face' of the UVWmapping. At the center and at the bottom, the result by using morphMap. At the center, the result on a TRImesh and above the result on the same mesh but using the polygonal level visibility. At the right, it's a true poly.

morphMap interface Usage:
1- Select the element to map (object or faces selection).
2 - When it's done click 'morphMap' or 'Face Map'.

Known limitations:
- Only polys and meshes are supported.


General Properties

- work on channel : the channel UV on which the script operates.
- use previous unwrap: reuse the last 'Unwrap' modifier when It's possible.
- convert to polys: converts the objects to editable poly. No undo available.

Selection Level
- selection level : the script operates either on the object or the faces selected. In automatic mode, the script chooses the face mode if you work in face level. The checkbutton 'Clusters' Allows to work on face groups.

- corners recognition: In automatic mode, the script will search itself the 4 corners of the surface. In case of error, you can select yourself these 4 corners. They must be on the border of your outline.
- show corners/show grid/nothing to show : by default, the script show the 4 corners with circles. You can also see the grid.
- aspect : control the tiling of your UVW. 'full UV': no tiling. 'square UV': keep a square aspect. 'whole square UV' : keep a square aspect but with a whole tiling.
- morphMap : run the script to apply mapping coordinates.

Faces Manipulation
- Face Map (face mapping) : maps each face separately.
- poly (on/off) : allows to work on meshes at the polygonal level. This option has no effect on poly objects.
- Proj (on/off) :  if it's actived, the back faces will have the same orientation than front faces. It's a projection.
- "T" (turn) : turn the array of mapping coordinates of the faces with 3 and 4 points.
- quadE 'S' (show) : show/hide the invisible edges.
-quadE 'Turn' : turns invisible edges of the face selection.

UVW Modifications
- 0-1 : normalize the UVs between 0 and 1. The function operates on the bounding box of the Uvs. For a real deformation, use morphMap.
- roundoff : round off the UVs. For example, if your current tiling is about 2.8, that will be rounded to 3.
- one : modify the tiling of the smallest axis to 1 and keep the Uvs aspect.
- W=0 : set the coordinate W of UVs to zero.
- Tile (U,V) : modify the tiling of UVs. 1.0 = 100%, 2.0=200%, 0.5=50%
- Tile
(U,V) : '2' and '3' are preset values.
- offset (U,V) : move the UVs
- Flip 
(U,V) : create a mirror on the selected axis.
- axis : you can set the axis to 0,0 or on the selection center.
- rotations : 
+30, +45, -90,+90,180, +20, +10, free : rotate yours UVs.
- UVWmap : add an UVWmapping modifier.
- Unwrap : add an Unwrap modifier.
- collap : collapse the stack.

Version history:
0.49b - partial support of primitives (without guarantees) / support of illegal meshes for 'Face Map'
0.48b - multiselection / dockable interface / advanced face mapping / ....

0.28b - more compact interface / the "convert to" option adapts itself to the object type ( avoid a bug of convertion with 3DSmax 8 if you start from a mesh ) / no action if no face is selected in face mode
0.25b - if "convert to polys" is checked then morphMap return to the face mode when it's necessary
0.24b - the symbol " ° " in buttons of rotation is removed
0.23b - add usable undo
0.22b - add a warning if there is no outline
0.21b - first version

Installation of the macroscript:
1. Click the MAXScript item in the Main Menu, select Run Script...
2. Locate and select the script and press Open
3. Go to Customize > Customize User Interface and select the desired Tab (Keyboard, Toolbars, Quad or menu)
4. Locate the category 'UVWtoolBox' under group 'Main UI'
5. Search in the category for the name 'morphMap'
6. Drag the script to the toolbar, Menu, QuadMenu or assign to a Shortcut

If you encounter bugs or problems that I am not aware of, please send me yours comments.
Any suggestions are welcome.

example of allowed forms :

The common forms such as the squares, the rectangles deformed, the
open rings are accepted without problem.

Amusing thing: the script does work with a circle. In the UV space the circle is deformed regularly until becoming a square on the edges.

The vertical surface shows a case where the script does work with a volume.
The wall has two similar edges opposed. It is the only case where that can does work correctly with a volume.

Example of current limitations :

The uv grid is created by using the edges, not the surface. That is why it does not give the ideal result with a volume.

Example with a concave form : a road

A priori, this form presents 2 edges in 'S' and cannot be mapped directly with morphMap. If you show the grid, there is overlapping.
The trick is to map the road with 4 steps :

Each turning is mapped separately. It will undoubtedly be necessary to
turn some mapping to unify them. Use the functions of rotations (little trick: force the face mode, it's easier)

This picture shows why the road must be mapped by using several steps.

menu | version francaise