Game Development Community

Hole in mesh for no (apparent) reason?

by Ka Wang Wu · in Torque Game Engine Advanced · 11/22/2007 (1:56 pm) · 6 replies

So I was finishing up the main room in my building. Then I tried to export it over with the map2dif_plus.exe option in Constructor (I have recompiled the map2dif_plus.exe and it has worked before with portals.. I also got the Constructor patch). The map2dif.exe crashed at lightmap generation. So I went to try the export legacy TGEA .dif which produced a .dif for me. It worked pretty nicely.. except for one location where I seem to have lost a polygon face:

[IMG]http://img406.imageshack.us/img406/1964/72895531uf8.th.jpg[/IMG]

However the other side of the wall looks like it should. I tried looking at it with the F9+debug but it didn't really tell me anything.

The weird thing is that the missing part is just a part of a brush and not a whole brush face. It's quite puzzling cause the hole lets in light too.

Oh.. and earlier, while I was building the room, exporting this area worked fine so I don't see why it would cause problems a lot later.

#1
11/22/2007 (2:37 pm)
Did you install the patch, that might help.
There is a thread on this kind of holes etc on the constructor board and different possibilities to reduce the chance that they happen.
#2
11/22/2007 (3:17 pm)
Looking at those threads didn't really help. They were all mostly just suggesting me to restart constructor and try gain.

The good news is... I think I fixed it I think!

I'll share with people what I did here:
1. I already had the patch installed. Just writing it here in case anyone gets the same problem and wants to try what I did. I don't have the link anymore though. It's on the forums..
2. I used the recompiled map2dif_plus.exe. The reason I used this was cause it actually crashes when there's a lightmap error instead of continuing like the legacy exporter in Constructor does. That's my take on it at least. Basically it'd tell me if there'd be an error when I exported.
3. With the knowledge that the exporter would crash if something was amiss I started out by deleting brushes to narrow down the problem brushes. It took a while but if you try to export every now and then you will have a good idea on what brushes aren't a problem (i.e. ones that you didn't add or modify lately).
4. I narrowed it down to 5 brushes that all caused the exporter to crash. 3 of them were floor brushes and 2 other were roof decorations.
5. THE FIX: I cut up the offending brushes into smaller parts that seemed to fit in with the rest of the geometry. Voila! Fixed.

Apparently it seems as if the exporter doesn't like large brushes that are connected with a lot of other geometry even if the brushes themselves are simple blocks. Now I didn't really try to reproduce and prove my theory. But I'm pretty sure it has something to do with too big blocks.. I remember back when I was making maps for Counter-Strike that someone mentioned the same thing that I am now. So I guess practicing making areas with their own independet block set is a good idea :)

NOTE: The actual brush with a missing face was NOT the offending brush. Also I didn't try to export it with the legacy TGEA exporter yet so I didn't confirm that the face isn't missing with that exporter. It does work with the other exporter though.

So my take on this whole business is.. use the recompiled map2dif_plus.exe to export your maps or else you might have a lot of problems piling up without you even knowing it until you notice a missing brush..
#3
11/22/2007 (3:41 pm)
The problem is not the exporter but the MAP generation step of the constructor that fails when calculating the final planes ( .MAP is a plane based format, no geometry / triangle based one )
Thats the reason that more complex geometry tends to raise this problem more often although there are different cases that are now fixed with the patch.
#4
11/22/2007 (4:13 pm)
Oh, I see. guess I was too hasty with pointing out the exporter :)

should I supply my faulty geometry to someone? in case that person needs more information to improve Constructor's map conversion?
#5
11/22/2007 (4:17 pm)
I think the problems that cause it are known but not that simple to overcome unless the "brush capabilities" are cut down ...

One thing thought you should check before export is that you do not have invalid faces (they get a clearly visible outline on the triangles of the faces) as they will just be removed.
Perhaps thats what happened to your problem faces as well.
#6
11/22/2007 (4:48 pm)
Nah, I think I've been modeling meticulously to make sure that I don't get concave objects. In fact it has been a real pain in the ass since I'm used to normal polygon editing, hehe. Oh well.. as with everything there are good and bad points about it. Texturing has been surprisingly easy so far since I only have to deal with blocks :)

Oh the horrors of UV-mapping...