

Modo to Unreal
Part 1: Static mesh workflow
Introduction
This article will describe my modo-to-Unreal workflow for static meshes. I use
Modo 301 and RoboBlitz's Unreal3 version, but the principles are similar in UT2k4.
For the skeletal mesh workflow, check out the Modo to Unreal - Part 2 article.
Modeling
This is the object we want to export, a sink of some sort.
We can leave the planar quads and n-gons. Only triple non-planar polys where the automatic tripple might screw up edge alignment.
Texturing
The model has three UV sets: UV1, UV2 and UV3.
The first one is for the tiling base texture.

The second is for an ambient occlusion map, but it will be used as the UV set for the lightmap in unreal.

There is a lightmap guide texture, which helps setting up the UVs.

It's a 128x128 image, so a square is one pixel, and the dark green would be one pixel on a 32x32 texture. The reason why its important, is that the UV islands need to be at least one pixel from each other and from the edges. That way each pixel has only one polygon over it, and the bilinear filtering won't smudge over unwanted colors from the neighbours. Also since the lighmaps in Unreal are placed next to each other in 1K textures, so the one pixel distance from the edge will ensure the total separation from other objects.
In this case I plan to assign a 128x128 lightmap, so I used these black pixels as guides.
The third UV set is for detail patterns on the surface.

At this point the whole model is contiguous, so open edges won't interfere with the UV unwrapping procces. This has a sideffect tho, which is very apparent when we switch to shaded view.

This is quite ugly. Modo tries to smooth all polygons, there are no hard edges. We quickly forget modo's solution to this, that outdated "smoothing angle" based method. Instead we will emulate 3D Max's smoothing groups. It's called "separated polygon technique" and the basic idea is to separate polygon groups from the rest of the polygons. This way these poly islands will be smoothed separately, and we will get hard edges between them.
First we have to make sure that no hard edges come from the smoothing angle based method, so we set that angle to 89.9 in all materials.
Then we just select the polys we want in one smoothing group, then cut and paste them.
Now we have hard edges, exactly where we want them. The shading is all right, so we can bake the ambient occlusion map.
Collision
We can create a child layer below the current one which will contain the collision hulls.
Naming this layer properly is very important, because that indcates to the importer that this data is supposed to be a collision hull.
In U3 as far as I know there are only two possible names:
UCX: General convex geometries.
USP: Sphere primitive.
In UT2004 the names are as follows:
MCDCX: General convex collision hulls.
MCDBX: Box primitive.
MCDSP: Sphere primitive.
MCDCY: Cylinder primitive.
During the import Unreal will try to convert general convex geometries to simpler geometries. In other cases it uses the bounding shape of the suggested type. For example it's enough to put a simple sphere on a layer with the USP name, the importer will make an ideal sphere around it.
Working with general convex hulls need a bit more attention.

These are simple, closed, convex volumes. Make sure that they don't touch each other, because that confuses the importer and makes it generate many unnecessary collision primitives. For details on this topic visit the related pages on UDN.
Export
Okay, everything is ready to export. Select the layer you want to export. It can have any number of child layers, properly named for collision purposes. Run the ASEExport4Unreal.lua script. It will export the actual layer to the "LW content directory" (set in the preferences window).
The name of the exported file will be the name of the selected layer.
The exporter exports the following vertex maps (if they exist): Three UV sets, with the names of "UV1", "UV2" and "UV3" and an RGB map called "Color".
Sometimes smoothing groups are not exported properly. A re-export after restarting modo will fix it.
By default the script assumes that modo's unit system is set to "GameUnits", so 1 unit in modo becomes 1 unit in unreal. If you want to use a different units system, change the following line in the code:
UnitSystem = "GAMEUNIT" -- Set what you want to be 1 unreal unit:
"GAMEUNIT", "METER", "MILLIMETER", "FEET", "INCH".
On my Athlon 64 X2 3800+ machine I have the speed of around 32 polygons per second, so it's a quite slow process, please be patient. :)
After a successful export, the ASE file is ready to be imported.
Import
Start UEd. In the general browser select the generic tab and click on file/import. Locate the exported ASE file, and open it. Name the package/group you want to store the object in, and rename the object if necessary.
Double click on the object to bring up the static mesh browser. Let's take a look at the properties panel:

The LightMapCoordinateIndex is 1 because the UV sets are indexed from 0 in Unreal. Select a shader in the general browser and use the green arrow in the Material input field to assign that shader to the object. (There will be as many elements in the list as many materials are used in the mesh.)
You can check the collision geometries by clicking on the 4th icon on the toolbar.
I made a shader which uses all three UV sets, so the finished object looks like this: