Home Technical Talk

Convex triangulation.

polycounter lvl 7
Offline / Send Message
Kligan polycounter lvl 7
Hello!
I'm using Maya to make my 3d models, and I'm wondering, is there a way to automatically triangulate so that each surface becomes convex?
Specifically, this is needed for making collision to import to UE4. Because even slightest concave surface screws up the way unreal reads collision boxes, attached to models.

It seems to me that the "triangulate" command in maya has some threshold, after which it stops differentiating between convex and concave surfaces, because the difference is really small and it wouldn't matter anywhere, outside of exporting collisions. 

Here's an exxample:

I moved the marked vertices up a tiny bit, and then applied "triangulate" to the cube. This automatic triangulation made concave surface, which would be a problem if I imported this cube as collision to UE4 (the engine would attempt to split it to several pieces to avoid concave geometry).

Here's an example of UE4 failing to read those slightly concave boxes and attempting to "fix" it:


Is there a way to somehow automatically triangulate geometry so that all the surfaces be convex?

Replies

  • janoshx
  • Kligan
    Offline / Send Message
    Kligan polycounter lvl 7
    janoshx said:
    Thank you for the reply and suggestion.
    This thing is just a step above creating collisions inside unreal 4. The issue is - automatic generation often messes up, and creates non-optimal solutions. Not to mention optimization.
    And besides, I'd have to manually tweak stuff in the end anyway. Because tools like that, at least in my experience, don't handle very well shapes like this, for example:


    I don't mind making collision by hand, it's more precise and optimized that way. I just find it annoying that triangulation in maya does not have an option of triangulating surfaces in a way that would always make convex geometry.
    And that's what adds up work time - fixing triangluation in places where it messed up and made concave geometry.
  • Kanni3d
    Offline / Send Message
    Kanni3d ngon master
    If you're making collision by hand, why not triangulate by hand to get yourself predictable and proper triangulation? (just have connect edges on a hotkey when selecting two verts)
  • Kligan
    Offline / Send Message
    Kligan polycounter lvl 7
    Kanni3d said:
    If you're making collision by hand, why not triangulate by hand to get yourself predictable and proper triangulation? (just have connect edges on a hotkey when selecting two verts)
    Well that's what I'm doing. But it's tedious to check every face to see which vertices to connect to make convex geometry.
    That's why I wish there was an automatic way to triangulate properly, instead of just whatever maya's doing :)
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    If you are using such a detailed collision geometry, then you might as well just use a lod version of the mesh and per poly collision of that. Performance wise, that would be the same.
Sign In or Register to comment.