Welcome Material Defender!
Verify Your Mine!
Tools
If your not using the latest version of D3Edit... DescentForum.DE is the place to get it. Go to the 'Tools' section of the 'English Embassy'.
You will also need your existing, uber l33t but slightly broken, level.
A good potion made up of 3 parts patience and 3 parts dilligence. ;)
Note: Vert, Verts, Vertex, Vertice... Same/Same.
Build An Error Free Mine
It's not that hard... really!
Why bother?
Simply put, a poorly constructed mine will not play well. Shifting textures and faces, disapearing faces, player getting outside the level, these are some things that you may experience in such a level. But, truth be told, a few errors may not kill your mine. The Outrage levels had plenty of errors, T-joints, bad shells, etc...
Usually these problems are easy to find and fix, but it will take patience and perserverence! There's no reason not to have an error free mine, if you run into errors you can't seem to find a fix for, ask for help!
Where do errors come from?
227 rooms and 45,805 faces, error free!
Try as you might, some errors are inevitable. Most of the functions we commonly use to build rooms and levels can generate errors, even the simplest operation, such as moving a few verts, can produce numerous errors.
When should these errors be repaired?
As soon as possible! It's never a good idea to add errors to errors. Most errors can be removed as soon as they are made. If you've made a room seperate from the mine, verify it before you attach it. After you are more familier with the proccsses, you will get an idea of which operations are likely to produce errors and which are not.
Can every error be removed?
I believe so. But it should be noted that some 'Errors' reported by Verify are not really errors. For example, external rooms report as having the room center not in the room. And if you make a room on the terrain, then link all the faces to an external room, Verify will report this as duplicate rooms.
When building a mine, introducing errors cannot be avoided. But we can and must remove them!
A Small Mine With Typical Errors
The first step is to run Verify. Open your mine, and in world view, select 'Verify Mine' from the file menu. Or, select 'Verify Room' if you are working in one room.
Verify Reporting
Here is Verify's report. There are no bad normals or duplicated rooms, but we'll go over them anyway.
Press the button marked with an 'M'. This opens the message bar.
This window is additional info from Verify. It tells us what room, face, and vertex the error is at. Right click in world view, then select 'Select room by Number', and enter the room number from the message bar. Click OK to go to this room. Now you can select your faulty face or portal by number also, and both world and current room cameras will zoom in on the aflicted face. This sweet tool (thanks, Atan!) also works on objects, too.
Now let's discuss what the errors are and how to fix them.
But, first another sweet tool...

This one is stashed under the 'K' button. You need to be in a room view. Select the 'Errors' tab, and select the error you wish to target for destruction. Then press 'Mark'. Now all faces afflicted by your selected error are marked. How cool is that? Hey it gets even cooler, see the little '<' and '>' buttons? Press '>' and the first marked face will become the current face! Slick! Press it again! Ooh! Spank me!... I mean, uh, let's continue...
Common Procedures
Some Keyboard Shortcuts
To advance the current room to the next, press 'R', 'Shift+R' for the previous. Works in room or world view.
To step through faces, in room view, use 'F' or 'Shift+F'. Step through edges of the current face, use 'E' or 'Shift+E'.Step through verts of the current face, use 'V' or 'Shift+V'. Use 'P' or 'Shift+P' for portals.
Remove Extra Verts
More than one vert can occupy the same place. But if they are verts belonging to shell faces, it would be seen as a hole in the shell. It's easy enough to remove extra verts, just click the 'Remove Extra Vertices' button. Many repairs can leave extra verts. And removing extra verts may also be all thats needed to repair some things. So if verify says there are extra verts, remove them first.
Run Verify Again
After making repairs you should verify your room again, and when you are done with the room, verify the entire mine. To keep an eye on your progress, and update the message bar.
Non Planer Faces
Imagine a piece of paper flat on your desk. All four corners are on the same plane. Pick up one corner, and the paper will bend. It becomes 'Non Planer'. Descent cannot handle non planer faces, and will output unexpected results. Now picture a diagonal fold in the paper, so that three corners are on the desk while one is being lifted. The paper has been split into two sections, each are planer. In our level we can split a face into smaller faces that are planer. A face that has only three verts will always be planer.
Once you have maked the nonplaner faces, you can use 'Face Planer Check' to split the faces. This is the quick and easy way, but you will have to retexture the new faces. You can also split faces manualy. Mark two verts in a face. The next button to the right is 'Split Current Face'. Use this to control the way faces are split. For example, to maintain symetry.
Another way to regain a planer face is to snap the verts to the grid, then move them to the same gridline. Use 'Snap marked to grid' after marking the verts, or you can 'Snap curent vert to grid'. These buttons are found in the 'Vertex' section.
Yet another way to correct non-planer faces is to delete them and build new faces. This sometimes is the easiest way to get a specific geometry.
Concave Faces
Note, you can set the level of concavity tolerance in the editor settings dialog. A lower number may detect more faces. At the lowest setting, 0.0010, you may have a bit more work to do but you will end up with a better shell.
If you can draw a line between any two vertices on a face, and that line is outside the face, you have a concave face. Most often the best way to deal with this is to split the face. Use the mark tool to make the concave face the current face. Look at the message bar to see which vert is causing the concavity, if you are not sure. Mark that vert and one other (but not the next one) and hit 'Split Current Face'. A face that has only three verts will never be concave. Some concavities are very hard to see, but using the procedure above, you can easily remove all concavity from your level. As with non-planer, you may sometimes prefer to delete the face and build new.
Here's a view of a face that is concave. (above/left) The red line that I've drawn between two verts is clearly outside the face. The white arrow points to the vert that is concave. I could simply move that vert upwards, but that would change the architecture of the room. And it might create more errors. It's easy enough to mark the concave vert and one other to split the face.
Here's another example of a concave face. This face has four verts. The current edge (yellow line) crosses over the opposite edge. All four verts are on the same plane, so the face is planer. I've drawn a red line between two verts to show how it is outside the face. This is a unique situation, in that the face is actualy twisted over itself. There are actually twelve faces shown here in the same predicament. This error is so severe that it allows the player to actually fly outside the level, and makes the level very laggy. Because the shell is not properly defined, there is no way to know where to stop the player. I did not try it, but I believe if I tried to just split all twelve faces as described above I would get a jumble of confused faces and possibly other errors. But I do have another idea.
In this view we can see that there is a twelve sided face (would that be a dozengonical face?) conected to our problem faces. In vertex mode, I will lasso all twelve of these verts to mark them. Be sure you only have these twelve verts marked. Now, making sure the one of them is current (click on the face to make it current if not) I hit 'Snap marked to vert'. Twelve verts all in the space of one. And the twelve sided face has become the size of a point. (a 'degenerate face') The edges of the concave faces, that are in common with the edges of the twelve sided face also become zero in length. They will all disapear and become one vert when we hit the 'Remove extra verts' button.
Duplicate Faces, Bad Normals, Degenerate Faces
When two identical faces occupy the same space, they are duplicate. Mark them with the mark tool and delete. Mission accomplished. Bad normals are not good normals. Degenerate faces were good faces but they've fallen on hard times, there is little to no hope for either one. You can send them packing with the 'ol mark, delete and rebuild routine. Sometimes snapping a marked vert to another vert, then removing extra verts works also, although that may be how you got them in the first place. Nothing like a little hair of the dog, though!
Mismatched Portals, Bad Portals
Most likely caused by moving a face or vert adjacent or part of a portal. Another cause is attaching a room to a face adjacent to a portal, when the face is split, a vert is added to the existing portal. This breaks the portal. You can try deleting the portal, joining all the faces that got split by it, then using 'Join Rooms' to make a new portal. Or, you may have to delete one of the rooms, (save it as a room file first!) rejoining faces, then re-placing the room. In the future, if you are going to place a portal in a face that has a portal in it already, you can try to split the face in a manner that does not affect the existing portal, then add the new portal. Or better yet, build the room with built in isolation.
T-Joints
This one is pretty easy. A T-joint is a joint between two faces. One face has a vert in the common edge, the other does not. There is a button to remove t-joints from the current face. By now, you should know how to find and select the offending face.
You've just added a vert to the edge that was missing one. If the face you fixed is a portal, you also broke the portal. See the section on portals. Many of the doors included in D3 have errors, including T-joints. If you delete the door and reinstall it, you'll have the same problem. You can try deleting the portal, fixing the t-joint, then rejoining the room.
Important: Never delete a door by delete room. ALWAYS delete a door by going through the Door tool bar!
Bad Shell Faces
Bad shell faces can be the trickiest to repair. Often they come about as a result of other errors and get repaired when repairing the other errors. Sometimes they result from the repair of other errors. If you've repaired all the other errors (and removed the extra verts) but you still have a bad shell error... well, good luck, you're on your own... no, no, just kidding... But... are you sure you fixed all the other errors? Make sure you run verify mine once again to be sure.
Mark the faces using the mark bar, and examine the area in question carefully. By stepping through the verts of the edges identified in the message bar, you may find some tiny gap that is not readily visible... either snap verts together or make a new face.
Boa and Lighting
When you are satisfied that you have removed all the errors, you will need to recalculate the BOA and run lighting again. BOA stands for Big Ole Array, and tells D3 what room are visible from where. If the BOA is not valid, it will be calculated when you run lighting.