Home Technical Talk

When to triangulate

polycounter lvl 9
Offline / Send Message
mbrzezicki polycounter lvl 9
Here comes what probably looks like a stupid question to many:

I know that usual practice is to model as quads, keeping it as that through texturing and normal map transfers, and that when the asset is moved into the engine it is automatically triangulated, or sometimes manually, but either way it is triangulated for use in the engine. Usually the triangulation makes no difference to the asset but I have noticed that triangulating models can sometimes mess up the normal mapping and give some very undesired results. Obviously, I've found a way around this is to triangulate models before transferring normal maps, but is this the right way to be going about it?

I've seen that games artists tend to display their models as quads on their portfolios, and I've heard it said that quads are a clearer way to show topology, which suggests to me that my method of triangulating my models before texturing them is not the correct one.

This has been something that been nagging and troubling me for some time now. It bothers me that I'm this shaky on the pipeline process. Can anyone help me and tell me what the right way to be going about things is? My confidence is being affecting by being unsure about this and I just want to get back to modelling and know how things should be done! :poly122:

A big thanks in advance.

Replies

  • pior
    Offline / Send Message
    pior grand marshal polycounter
    Hi there!!

    Well after a while I found out that some artists and tech artists sometimes do things out of habit without really questioning things. Especially with stuff like triangulation - it's one of these details that can easily create shading errors, but most people seem to not notice because it's 'good enough'.

    I personally mostly build my ingame meshes based on a loop system for one simple reason : clean loops make selection very easy (select one, and grow/shrink from there) hence it makes both UV and skin weighting much easier and faster.

    However when it comes to baking, things can get tricky as some apps dont even triangulate the same way before (hidden edges oriented one way) and after the bake (shown edges oriented the opposite way) so to avoid all that I tend to triangulate before the bake and keep the asset that way from that point on. But I do keep the mostly quad version in a safe place, if I ever need to go back to it.

    I tried triangulating an ingame mesh the geodesic way like that once :
    http://www.chem.umn.edu/groups/roberts/images/geodesic.jpg
    but I really didnt like the results. It looked to spiky in terms of silhouette.

    So I would say ... build as if it was a clean quad structure, and triangulate when needed for the specific pipeline you are using. Tricky ...
  • sama.van
    Offline / Send Message
    sama.van polycounter lvl 17
    It depends...

    For exemple on Unity I had to delete my auto-triangulate functions while exporting as FBX file because the triangulate work is better done by Unity when importing the model...

    But as Pior said, to create a very clean mesh with quads giving good horizontal and vertical line is always a good way. ( it will help in your Uvs work too ^_^... )

    After it will depend of the engine you are working with :)

    Once I listened Mudbox crashed with a bad topology.... Pior , didn't you say that me?
  • Eric Chadwick
    You also might need to triangulate at deformation points, like the crotch, shoulders, face, etc. if you notice bending/creasing/collapsing problems. It's always better for a human to decide the edge direction.
  • SHEPEIRO
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    as little as possible for the envirnoment work i do more triangultion (or even propper gridded quads) can be a pain when cutting in details material splits etc, but cleaning it up into nice quads and the occasional tri for shading later on is a nessacary (but you dont have to be a slave to it so what if your building facade has some five sided polys in it if it exports correctly everytime.

    but as others have stated allready if your baking from high then its very important.
  • mbrzezicki
    Offline / Send Message
    mbrzezicki polycounter lvl 9
    Thanks pior, and thank you everyone else for your thoughts. I really really appreciate the help - all very useful advice. I had started to feel a bit of an idiot but it's nice to find out that I'm not doing anything wrong. And it's always great to find new ways to make workflow more efficient and effective.

    Whilst we're on the subject: I often find that triangulated models don't display normal maps as well as the quad versions of the same model. I ensure normals are softened, topology is clean and when transferring normals (in Maya) of a higher poly mesh to the low poly quad one, I get lovely results, but in the case of doing the exact same to the then triangulated mesh, quite often I find that the tris just won't 'hold' the normals as well as with quads, which I find hard to understand, as I know all quads have a 'hidden' edge within them, making them actually two triangles anyway.

    Does anyone know why this happens? And do you know how to work around it?
  • funshark
    Offline / Send Message
    funshark polycounter lvl 16
    Well, I don't know much about Max, but in Maya the vertex normals are not the same when you switch from quad to tri.
    If you're using Maya, just show the normals and look the tiny difference.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Yep, in Maya if you wanna keep the quad normals you have to "Lock Normals" before triangulation.
    Ideally your export tool would just store the normals from the quadrangulated version before triangulating the mesh (it's what ours does). So that way you only need to triangulate key parts like problem edges for normal-mapping, or better deformation for animation.
  • mbrzezicki
    Offline / Send Message
    mbrzezicki polycounter lvl 9
    Ooh, I've not tried locking normals. Thanks for pointing that out to me. Ah, that would make sense that the vertex normals are affected.

    Thanks, everyone. You're really helping me with an issue that's been bugging me for ages. I'll try locking the normals and see how that changes the process. Will keep you posted.

    Thanks!
  • mbrzezicki
    Offline / Send Message
    mbrzezicki polycounter lvl 9
    Amazing. Troubles all solved. Confidence fully restored.

    An enormous thank you to you all. How I never knew about locking the normals, I don't know, but it's rescued all my models.

    Thank you!
Sign In or Register to comment.