Degenerative faces

Discussions regarding modelling with SOFTIMAGE©
Post Reply
Falam

Degenerative faces

Post by Falam » 29 Aug 2013, 03:36

I've been searching for a script that can highlight degenerative faces on a mesh, similar to this blender script. If they can be fixed as well, all the better, although highlighting will suffice :)

User avatar
gaboraa
Posts: 314
Joined: 16 Apr 2010, 23:14

Re: Degenerative faces

Post by gaboraa » 29 Aug 2013, 08:56

I would recommend using mCleaner. It's very cool and powerful for finding topology errors.
http://www.si-community.com/community/v ... f=4&t=2209

Falam

Re: Degenerative faces

Post by Falam » 29 Aug 2013, 15:26

I've been using mCleaner for a long time, although it doesn't have this option :(

User avatar
myara
Posts: 403
Joined: 28 Sep 2011, 10:33

Re: Degenerative faces

Post by myara » 29 Aug 2013, 20:36

I'm slowly working on a new version of mCleaner in my free time, so if it isn't too difficult to write I could include this feature, but the thing is I'm not sure what it is. I have never seen a degenerative face in Softimage. I think I had in Maya but never in SI. If you can upload somewhere the scene file I could give it a look.
M.Yara
Character Modeler | Softimage Generalist (sort of)

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: Degenerative faces

Post by Daniel Brassard » 29 Aug 2013, 21:23

Have you tried the merge vertices with a low threshold?
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
myara
Posts: 403
Joined: 28 Sep 2011, 10:33

Re: Degenerative faces

Post by myara » 30 Aug 2013, 06:42

I just watched the video in my PC, and now i understand what degenerate faces are :P

I found this snippet in Stephen's Blog:
http://xsisupport.com/2013/03/13/findin ... s-by-area/

But the script may not work if your object isn't named cube, so you may try this:

Code: Select all

#Python
si = Application
epsilon = 0.00001
 
# Get PolygonArea DataArray (which is a tuple)
attr = si.Selection(0).ActivePrimitive.GetICEAttributeFromName( "PolygonArea" )
areaData = attr.DataArray

#
# Find the indices of the bad polys
#
bad = [ x for x,y in enumerate( areaData ) if y < epsilon]

# Select the degenerates with a string like 'cube.poly[112,114,155]'
if len(bad)>0 :
   si.SelectGeometryComponents( (si.Selection(0).fullname) + '.poly[%s]' % ','.join(str(i) for i in bad) )
 
Is the same code but I changed the string "cube" with your current selected object and added a condition to avoid an error if your object doesn't have degenerate faces.

It will select the degenerate polygons in your selected object.
M.Yara
Character Modeler | Softimage Generalist (sort of)

User avatar
gaboraa
Posts: 314
Joined: 16 Apr 2010, 23:14

Re: Degenerative faces

Post by gaboraa » 30 Aug 2013, 10:50

Last night I tried to produce degenerative faces in Maya because I wasn't able to produce in SI and I was familiar with degenerative polygons when I used Cinema 4D and I tired your script and Stephen's on my mesh and both couldn't delete the degenerative face but filtering points did the job. I attached the obj so that you can check if I was doing something wrong. BTW I love all your plugins, huge time savers!
Attachments
degenerative.rar
(13.71 KiB) Downloaded 76 times

User avatar
myara
Posts: 403
Joined: 28 Sep 2011, 10:33

Re: Degenerative faces

Post by myara » 30 Aug 2013, 11:14

Thanks gaboraa.

Stephen's script only selects the degenerate polygons, it doesn't fix anything.
My version is just Stephen's modified to work with your current selection instead of a cube.

The faster way to fix them would be to select the object and Filter Points. But in some cases you may be having overlapping points deliberately in your modeling so it would be better to first detect the degenerate polygons and then decide where do you want to run Filter Points.

That's where this script is useful. Run the script, change your selection to points(Select Adjacent), change your selection manually as you want, and then run Filter Points.

You could also delete the selected polygons but that would create separated edges.

By reading the definition in the net, to create a degenerate polygon you just need to move the points until you are overlapping them with others and the polygon area disappears.
Ex, create a cube and move the points until you get a pyramid.

By the way, you could have a Quad/Ngon where just a triangle part is completely hidden but this wouldn't qualify as a degenerate polygon in this script because the Quad/Ngon still has area. You'll have to have a very messy modeling workflow to do this though, but if you do, triangulate it before checking.
M.Yara
Character Modeler | Softimage Generalist (sort of)

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests