Convex Hate

The problem I’m facing is a seemingly tough one. What I want to allow ToeTag to do is to import triangulated meshes from a modeling program (in my case, Cheetah 3D) and then break that mesh down into convex chunks when it writes the MAP file out for compiling.

It’s tough because I can’t quite come up with a routine that will work for any arbitrary mesh. I can get it to work on some meshes but not others. I think it’s worth the effort though because when it works it will allow so much more expression in my level design.

Coding, coding…

5 Responses to “Convex Hate”

  1. RickyT23 Says:

    If you can crack that one it would be ace! I have never even made a model in my life, but I dont think any editors for .map files can do that, can they??!?

  2. Warren Says:

    Not that I know of. It’s a bitch though. I thought I was on the right track yesterday until I started easily breaking it. It’s a hard problem (for me anyway).

    Will keep plugging away…

  3. than Says:

    Very cool that you are adding such a neat new feature. How are you converting the tris into brushes? I guess you could add a single vertex behind the triangle and create a pyramid pretty easily, which would guarantee convex brushes*. Are you doing something fancier?

    Are you writing your own qbsp as well as the editor?

    *that sounds like a good idea for a Maya export script and would be a piece of piss to write! :)

  4. Warren Says:

    I’m really trying to avoid the pyramid method as that leads to problems and cracks and things.

    What I’m -trying- to do is automatically break down the triangle mesh into convex chunks. It’s a hard problem (for me, anyway). Everytime I think I’ve discovered a method that will work, I can think up a shape that will break it within minutes.

    I might just do the pyramid thing for now and work on the ‘good’ method as time permits.

  5. Warren Says:

    Oh, and I’m not writing a new QBSP but rather trying to modify the existing one. I’m not THAT masochistic. :)

Leave a Reply