Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 18-01-2010, 09:33 PM   #1
Lennart123
Registered User
 
Join Date: Jan 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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:


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.



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
Lennart123 is offline   Reply With Quote
Old 18-01-2010, 11:16 PM   #2
honestdom
The Nurb Herd
 
honestdom's Avatar
 
Join Date: Oct 2007
Location: London
Posts: 2,381
Thanks: 4
Thanked 298 Times in 288 Posts
Default

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.
honestdom is offline   Reply With Quote
Old 19-01-2010, 02:08 AM   #3
Joopson
Registered User
 
Joopson's Avatar
 
Join Date: Jul 2005
Location: Los Angeles, CA
Posts: 2,313
Thanks: 1
Thanked 33 Times in 33 Posts
Default

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!
__________________
Environment Artist @ Plastic Piranha
www.joopson.com

Last edited by Joopson : 19-01-2010 at 02:10 AM.
Joopson is offline   Reply With Quote
Old 19-01-2010, 05:05 AM   #4
NextDesign
Technical Director
 
NextDesign's Avatar
 
Join Date: Feb 2004
Posts: 2,982
Thanks: 33
Thanked 532 Times in 471 Posts
Default

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.
__________________
Imagination is more important than knowledge.
NextDesign is offline   Reply With Quote
Old 19-01-2010, 11:58 AM   #5
BennyK
Registered User
 
BennyK's Avatar
 
Join Date: Oct 2007
Location: IL
Posts: 738
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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
__________________
When in doubt, delete history and freeze transformations.

My latest snake game
(Requires DirectX9 SDK and Framework)
BennyK is offline   Reply With Quote
Old 19-01-2010, 02:05 PM   #6
Lennart123
Registered User
 
Join Date: Jan 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!


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

I'm one step closer to finishing this skiing terrain.


Cheers,
Lennart
Lennart123 is offline   Reply With Quote
Old 19-01-2010, 10:31 PM   #7
NextDesign
Technical Director
 
NextDesign's Avatar
 
Join Date: Feb 2004
Posts: 2,982
Thanks: 33
Thanked 532 Times in 471 Posts
Default

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.
__________________
Imagination is more important than knowledge.
NextDesign is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.