Hey guys, im using Maya and im wondering if everybody does that or just in some cases? I know that triangulating in Maya might mess out with vertex normals, but what im wondering if after I bake the animation might change the triangles if I let them as quads, or no?
Thanks in advance.
Replies
I can't decipher this.
Are you asking about baking normal maps? Or baking animation? Or both?
I usually wouldn't bother, since our exporter at work takes the vertex normals before triangulating during the export step. If you're only planning on using the objects in Maya then it should be fine (although Maya's viewport display may be dodgy if your mesh is skinned, since it re-triangulates when deforming, for some insane reason). It should render ok in that case though.
If you have to manually triangulate for whatever reason before exporting just remember to lock the normals before you do. That should mean that you don't ever need to work with the triangulated mesh. This is another reason why I much prefer Max's method of managing triangulation :P
My guess would be that without triangulation you might experience shifting triangle splits. Maya always places the hidden triangle splits along the shortest path, and since animation = polygons deforming the triangle splits might shift.
Haven't studied this in detail, but I believe this is how it works.
I wonder why I haven't noticed this on other animated models in maya before? I would expect this to look like shimmering or flickering on say an elbow during a deformation?
Note that my example shows a really skewed polygon face. You're pointy end of an elbow was probably defined by actual edges and not these "hidden" triangle dividing edges. Your actual edges never flip like this, only the hidden ones.
I wouldn't say this is an issue you run into all that often, or at least not something you notice as an issue that often. However as Bugo was asking if triangulating would solve this? Yes it would, triangulating would eliminate all the hidden edges and instead let you choose exactly how every edges would be.
Like kodde showed, Maya does dynamically choses the 'shortest edge path' between verts when ngons are deformed. However if you have a 'static' mesh in a tpose looking fine before triangulation, applying a mesh>triangulate wont change the surface (no edge flips), it will just make everything into tris. In that regard you can export for normalmap baking very safely (xnormal even requires that)
However, you might want to save and store your mesh 'untriangulated' for readability reasons when you dont need to export it. BUT if animation is applied inside maya, you wil notice the edge 'flickering'. It's okayish on diffuse-only models, but horrible on normalmapped models.
However, the mesh data exported to your engine will be triangulated anyways, so in-engine the flickering will diappear since you will have a edgeflipproof triangulated model driven by bones.
The real problem arises with building morphtargets in Maya. If there are quads on the mesh, you very likely end up with morphB having different edge orientations than morphA, and it cause huges problems for export and ingame blending of A and B (in my experience, holes appeared where the edges were flipped.)
Meaning that if you have morptargets to do in Maya, you want to :
Create morphA in quads,
deform it to get morphB in quads (flips will appear but save this anyways)
before exporting A and B : apply triangulation to A, export as "exportedmorphA",
apply morph B to the triangulated meshA,
export this triangulated meshA with morph B applied, as "exportedmorphB". That way the deformation info is applied on top of the flipproof triangulated model, and Maya won't try to decide for you.
Yes, this is a nightmare :P But it can be automated I guess.
Good luck!
My only problem is that if I triangulate after the nmap is baked the vertex normals will change, and Im sure we dont want that, right? And if I bake before I wont be able to edit it later.
My hope is that the engine itself saves not only vertex positions but also the normals even if I dont triangulate inside Maya (they will be triangles anyway ingame, i know)
I will help you with your issue, but...
Someday, and that day may never come, I'll call upon you to do a service for me. But, until that day, accept this as a gift on my daughter's wedding day.
I'll have to read up on the info MoP posted sounds like it might be pretty helpful.
although i never skin stuff as im an env artist. any export would be made from the t pose surely so baking the norms when in this position would be best and triangulating befor baking always gets better results if using external baker in my experience
Time spent finding solution: 5 minutes
Time spent f-ing around with screencap, re-encode, publishing: roughly 1 hour
[ame]
EDIT: Crap... just noticed that I had missed to check recording With Mouse showing... Not going to redo this.
1. bake normals on quaded mesh in maya
2. triangulate mesh and check to see where dark spots are occuring with normal map
3. flip tris where it would make sense and rebake with triangulated mesh.
4. exoprt that tri mesh, import into your engine (this way your game engine doesn't automatically triangulate a quaded mesh)
5. peep the super crispy normal map
6. profit