Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Modeling (https://simplymaya.com/forum/forumdisplay.php?f=9)
-   -   Triangulation direction (https://simplymaya.com/forum/showthread.php?t=33623)

Lennart123 18-01-2010 09:33 PM

Triangulation direction
 
Hello fellow Maya enthusiast,

I've got a bit of a problem with a polygonal terrain mesh I'm creating, namely when triangulated it tends to look rather distorted on the parts where it's stretched. This has everything to do with the triangulation direction of my faces, as they're exactly in the wrong direction. I have found the "Flip Triangle Edge" function in maya, which is exactly the function I need, only it's incredibly slow. By slow, I mean it's not very usable because I have to manually select every individual triangulate-edge and then apply the function. Imagine a terrain which has 100000 triangles, and I think you can see my problem :headbang:

Here's a model that helps illustrate the problem:
http://www.lennarthillen.com/Problem.jpg

Now, these screens do not show the artefacts that the problem causes with my actual terrain, but it does illustrate the problem well.

So, my question. Is there any way to mass-flip the triangulate direction of a group of faces?

It should be possible with the formerly mentioned "Flip Triangle Edge" function, only selecting every triangulated edge is a nightmare. Perhaps there is a way to select all the triangulate edges after doing a triangulation function on a mesh? Or perhaps some other way to filter out these triangulate-edges? I have not found it, and am really in need for a solution.

http://www.lennarthillen.com/Problem2.jpg

Thank you for your time, and I really hope to find some kind of solution or work-around for this silly little problem.

Cheers and have a nice day,
Lennart

honestdom 18-01-2010 11:16 PM

do you have a screenshot of the pre-triangulated model? that might shed some light on the why process has done this.

...btw, if you select one edge and press the up arrow on your keyboard it will select the edge loop/ring. alternatively you can double click the edge and it will do the same.

Joopson 19-01-2010 02:08 AM

I like you, Lennart, you seem cool. Hope you stick around.

At any rate, I don't know.

Try what Hammer said, because beside that I don't know. I always slave away manually when that happens, and it sucks.

Good luck on your model!

NextDesign 19-01-2010 05:05 AM

It isn't technically "wrong". What it's doing, is trying to preserve the planarity of the faces; this may or may not be what your looking for.

One cheap way to do it, is to create a plane with as many divisions as you want, triangulate it, then sculpt it. It should then have all the edges facing the same way.

Just a quick question however. Why does the direction matter, and why do you need to triangulate the mesh? It's generally not done expect when working with old game engines.

By the way, excellent post. You've really covered your question well.

BennyK 19-01-2010 11:58 AM

I think it should be possible to apply the function for each of the selected edges with a relatively simple script... not sure exactly how to build it though... Found this after a quick search:

Code:

for ( $node in $select )    // process each selection {
 /* … */
}

I can't test it because I currently don't have Maya installed but you can get the command for 'Flip Triangle Edge' from the script editor after using the operation. just replace it with the '/* … */' and run the script with the edges selected.

As for the selection of the edges - hammer has mentioned select edge loop/ring tool which should help you both spot and fix the problematic sections.

Hope this helped,
Benny

Lennart123 19-01-2010 02:05 PM

Possible solution
 
Hi People,

Thank you all for your responses.

With your help, I have found a solution, which makes me rather happy! Apparently, in the attribute editor of a mesh, you can set the triangulation direction of the quads to left, right or best shape. Using this feature, I just divvy up the mesh into separate parts, set up their triangulation directions, and whoopee -> triangulate. This simply allows me to triangulate entire sections of my terrain into the direction I choose, which gets rid of the nasty artefacts I've been having.

Wondering what artefacts? Here's an example!
http://www.lennarthillen.com/Solution.jpg

I am now one happy artist, so I thank you all for your endeavours.

I'm one step closer to finishing this skiing terrain.
http://www.lennarthillen.com/Ski.jpg

Cheers,
Lennart

NextDesign 19-01-2010 10:31 PM

Very cool mate. Glad you figured it out.

BennyK: What that does, is select each edge separately from all of the selected edges. This wouldn't be very useful, as it would flip all the triangles, regardless of their orientation.


All times are GMT. The time now is 04:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018