Static Meshes Made With UEd

Having gotten into the editor a bit, you might be wondering whether static meshes made in the editor are worth using, and what the differences are between them and ones made with a separate 3d program. In this report I will go through and explain exactly why meshes should never be made within the editor, and why time spent learning an external program is well spent.

Although the editor has no trouble turning simple shapes like cubes and cylinders into meshes, anything more complicated than that quickly goes downhill. As an example of this I have set up a simple slab with a 12 sided cylinder cut out of it:

Once that is set up we can see how BSP works by exporting our level to an external 3d program and taking a look at it there. In this report I am using 3d Studio Max.

BSP stands for Binary Space Partition, UEd's way of dividing areas for optimization and lighting. Looking at it logically we can see the way UEd has divided the front surface. It chose one of the 12 sides of the cylinder and made a tangent line along it to create the polygon labeled 1. It then proceeded counter-clockwise making tangent cuts along the other 12 sides to create polys 2, 3, 4 and so forth until the entire surface was divided. This may seem like a clean way of doing it, and in the case of BSP it is. However, if we look this method has created 12 extra vertices, highlighted in red. These extra vertices have no effect on BSP as BSP surfaces are lit per-pixel. However, static meshes are vertex lit, meaning the engine calculates the lighting at each vertex and uses those values to light the surfaces. Since this information takes up space, these 12 extra vertices are increasing our file size unnecessarily, 24 if you count the ones on the back face.

The tangent-line method of dividing the surfaces has one major problem that makes it unsuitable for use with static meshes, as demonstrated by the following picture:

To see what I mean we will take a look at the highlighted polygon labeled 1. At first glance it may seem like it has 5 vertices, but the edge highlighted red is actually only connected at the endpoints, the green vertex is not connected to it. If we move the bottom vertex we can see this:

This might not seem like a problem, but if we take a look at this mesh in the editor we can see that it definitely is noticable:

In this picture I have used a black texture on the mesh and a white one on the walls to illustrate the problem. Because those vertices are not connected, it creates a visible seam in the editor, which is much more pronounced as you move around. In addition to that, those vertices are not used to calculate the lighting for the adjacent polys, which gives an ugly result:

Now let's see what this mesh would look like optimized. After a few minutes using Max the mesh is completely optimized and all of the extra vertices have been removed:

Exporting it to UEd and placing it side by side with the UEd made mesh, we can immediately see the difference:

As you can see, in this simple example optimization has no effect on the poly count, but more extreme examples quickly give you an idea how effective this can be. Here is a complex static mesh created in UEd:

After optimization in 3d Max, poly counts have been dramatically reduced:

A major thing that UEd cannot provide is smoothing groups. Smoothing groups get rid of sharp edges on meshes by combining the lighting applied to them, as demonstrated by the following picture. The same static mesh is used for both the before and after shot, the only difference is that the one on the right side has had all of its polys put into the same smoothing group:<

I hope that this report has convinced you that meshes should never be made in UEd. The time spent learning a 3d program is well spent in order to have great looking levels. There is even a free Personal Learning Edition of Maya included with the game for people who don't have thousands of dollars lying around for full versions of the program.

Good luck and have fun!