Game Development Community

256 surfaces on an interior hull

by Tom Spilman · in Artist Corner · 06/07/2005 (5:22 pm) · 0 replies

I've seen this error a few times in maps people have sent me that wouldn't export out of Pipeline. For the benifit of beginners I'm posting a classic example of this error with two options on how to fix it.

So the error you usually get looks something like this:

Quote:Fatal-ISV: (\Projects\Sickhead Games\Pipeline\code\TorqueSE\engine\interior\interior.cpp @ 1386) Error, > 256 surfaces on an interior hull
In this case this is the map that generated this error:

www.sickheadgames.com/downloads/gg/original.png
The problem in this case is the interaction between the columns and the floor and ceiling blocks in this map. If you look at just one of the floor blocks and the columns from above you'll see it looks like this:

www.sickheadgames.com/downloads/gg/holes.png
When the surface of that block is processed all the columns that touch it cut holes into that surface. When that occurs it fractures that one surface into hundreds of little surfaces. This causes more surfaces to be generated for that single brush than the DIF file format can handle.

So one fix that is sometimes appropriate is pre-splitting the offending brush surface. In your maps you could split it up even further, but in this case I took the floors and split them in half:

www.sickheadgames.com/downloads/gg/fixed.png
Now this map will export. When we get it into Torque and set interior rendering mode #6 it looks like this:

www.sickheadgames.com/downloads/gg/cuts.png
All those cuts in the surface are caused by those columns punching holes in it.

So this map works, but there are some problems still. These little slivers of surfaces do not shadow well with the scene lighting. Even with a low light scale and a large lightmap border you'll get little spots where light pokes thru in your shadows. Also if this was a larger map the excess of triangles created on these fractured surfaces could start to cause performance problems. To correct this we go with another method, detail brushes.

When we set all our columns into detail brushes and export we see the surface count in the export statistics drop from 1231 surfaces to 479. Looking at the DIF in Torque again we can see why:

www.sickheadgames.com/downloads/gg/detail.png
Happy Torque'ing.

About the author

Tom is a programmer and co-owner of Sickhead Games, LLC.