Retain polygon position but make planar

284 views
Skip to first unread message

Crest Christopher

unread,
Jan 26, 2016, 10:09:00 AM1/26/16
to Python Programming for Autodesk Maya
Hi, I'm hoping someone on this list can help.

I'm looking for a script that can retain the current polygon(s) rotation
as modeled on an object, not to destroy the appearance of the mesh, of
course. Even the polygons out so they go from non-planar to planar; I
hope that was understood ?

Thank You


Michael Boon

unread,
Jan 26, 2016, 10:35:56 PM1/26/16
to Python Programming for Autodesk Maya
So when your script finds a non-planar polygon, how do you want to fix it? Should it move the vertices? If so, how should it move them? Or should it split the polygon?

Finding non-planar faces and triangulating them is quite simple, as Maya has commands to do each of those things.

Moving verts would take some maths.

Christopher.

unread,
Jan 27, 2016, 12:18:04 PM1/27/16
to Python Programming for Autodesk Maya
It should move the vertices, I assume very subtle; otherwise if it's too exaggerated the angle or flow of the polygons that make up the appearance of the mesh will be altered.  

How it should move the vertices, if there is some intelligence that can verify the axis or array of axis to which need to be moved to make the polygon(s) non-planar.

Nicolas Combecave

unread,
Jan 27, 2016, 12:37:56 PM1/27/16
to python_in...@googlegroups.com
I guess if you move a vertice of a non planar face to make it planar, a previously adjacent planar face may become non-planar...

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/44a92dc1-5f22-4e01-b8bb-497de18cace9%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Christopher.

unread,
Jan 27, 2016, 12:55:04 PM1/27/16
to Python Programming for Autodesk Maya
I tried that method; unsuccessfully.  If you have adjacent non-planar and you make the selected polygon, planar, the other polygons can become non-planar, it becomes a cul-de-sac. 


On Wednesday, January 27, 2016 at 12:37:56 PM UTC-5, combi wrote:
I guess if you move a vertice of a non planar face to make it planar, a previously adjacent planar face may become non-planar...
2016-01-27 18:18 GMT+01:00 Christopher. <crestchr...@gmail.com>:
It should move the vertices, I assume very subtle; otherwise if it's too exaggerated the angle or flow of the polygons that make up the appearance of the mesh will be altered.  

How it should move the vertices, if there is some intelligence that can verify the axis or array of axis to which need to be moved to make the polygon(s) non-planar.

On Tuesday, January 26, 2016 at 10:35:56 PM UTC-5, Michael Boon wrote:
So when your script finds a non-planar polygon, how do you want to fix it? Should it move the vertices? If so, how should it move them? Or should it split the polygon?

Finding non-planar faces and triangulating them is quite simple, as Maya has commands to do each of those things.

Moving verts would take some maths.


On Wednesday, 27 January 2016 02:09:00 UTC+11, Christopher. wrote:
Hi, I'm hoping someone on this list can help.

I'm looking for a script that can retain the current polygon(s) rotation
as modeled on an object, not to destroy the appearance of the mesh, of
course. Even the polygons out so they go from non-planar to planar; I
hope that was understood ?

Thank You


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

Michael Boon

unread,
Jan 28, 2016, 10:33:46 PM1/28/16
to Python Programming for Autodesk Maya
Yeah I don't think there's a simple solution. At any vert where 4 or more faces meet (which is most points), it's likely to be impossible to move the vert to make one face planar without making at least one of the other faces non-planar. 

Think of a simple case, a 3x3 grid of faces:
0-----1-----2-----3
|     |     |     |
|  A  |   B |   C |
4-----5-----6-----7
|     |     |     |
|  D  |  E  |  F  |
8-----9-----10----11
|     |     |     |
|  G  |   H |   I |
12----13----14----15

And imagine it was creased in a straight line from vertex 0 to vertex 15, so faces A, E and I were non-planar. This is a pretty common case wherever edge flow doesn't line up with the shape it's trying to describe. I don't think there's really any wiggling you can do to the verts that will make all those faces planar. You'd have to triangulate those three faces, or completely change the edge flow.

Christopher.

unread,
Jan 31, 2016, 2:31:00 AM1/31/16
to Python Programming for Autodesk Maya
I was going to make a video; but you understood perfectly. If the edge flow is how it should be by design; how do I change it without triangulating ? I've tried deleting the faces and recreating the faces, the non-planar reappear again, frustrating.

Michael Boon

unread,
Feb 9, 2016, 10:19:18 PM2/9/16
to Python Programming for Autodesk Maya
Sorry I forgot to reply to this.

Consider this vase:

There is no way you can build it from planar, 4-sided polygons. If the mesh you are dealing with has any areas where the vertices resemble these, and you don't want to change the edge flow (which would be a manual process anyway), there is nothing you can do.

Crest Christopher

unread,
Feb 9, 2016, 10:22:52 PM2/9/16
to python_in...@googlegroups.com
Why does Maya have this toggle option to begin with, I say this because, if you have a clean mesh, nice edge loops and so forth and you toggle this option on and Maya informs you, that you have 32 non-planar polygons, what is the purpose ?

If on the other hand you make a sphere in a scene, that will obviously have no, non-planar polygons. We are not making spheres on a weekly basis ;-)

Michael Boon wrote:
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/OqyE9Qvjzac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/b8cd0e36-66e1-4400-b197-294fd5d4dbb7%40googlegroups.com.

Boon & Tulip

unread,
Feb 9, 2016, 10:37:39 PM2/9/16
to python_in...@googlegroups.com
I guess it depends on what sort of models you're making and how they will be used. For some kinds of models and in some environments, planar faces are really important. I assume that people working under those conditions have techniques to ensure their faces stay planar. 

"Nice edge loops" is very subjective. Those aforementioned people would say that, if you have non-planar faces, then your edge loops aren't nice at all. For the work I do, planar faces are much less important than having the right vertex normals for good lighting.





Michael Boon wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/OqyE9Qvjzac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/b8cd0e36-66e1-4400-b197-294fd5d4dbb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/OqyE9Qvjzac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.

Crest Christopher

unread,
Feb 9, 2016, 10:40:19 PM2/9/16
to python_in...@googlegroups.com
I'd like to know the techniques used to ensure faces stay planar for those working in those conditions; at this point I really would !


"Nice edge loops" is very subjective. Those aforementioned people would say that, if you have non-planar faces, then your edge loops aren't nice at all

I suppose, little curious as to the technicalities behind this.



Boon & Tulip wrote:
Reply all
Reply to author
Forward
0 new messages