Check for self-intersection

933 views
Skip to first unread message

Milos Vukotic

unread,
Mar 2, 2014, 1:41:44 PM3/2/14
to maya...@googlegroups.com
Hey there people. I've realized in the middle of my project that I must make sure that there is no self intersection on my high rez polygon model. So of course since I don't want to do it all from scratch, I'd appreciate if anyone could give me some idea on how could I check if my model intersects itself anywhere (i.e. do any of it's faces intersect with another one of it's faces or edges).

If I just knew what's a Python or MEL function that determines intersection between faces and edges (although I suck at MEL), I'd easily do the rest of course (just iterate through each face and make sure it doesn't intersect with any other element).

Any help would be greatly appreciated!

After this rumble ends I'll hopefully create a free script for this :)

ryan harrington

unread,
Mar 3, 2014, 6:41:02 AM3/3/14
to maya...@googlegroups.com
I can't think of a way to check this that would be as simple as you might like. 
As I understand it, checking distances from vert to vert is fairly simple, but checking if an edge is penetrating a face is not trivial.

Ambient occlusion can tell you when surfaces are close together...You could do an occlusion bake with very, very low distance settings and then manually look closely at any areas that turn black in the baked map..



If you need to make sure your mesh is not self intersecting so it will simulate, test it and see. 
If you have a dynamics person waiting for the mesh, ask them to do a "quick test sim". That way it get's tested for exactly what it needs to do and you don't fix anything you don't need to.

For a quick test I think I would probably turn it into an nCloth and try to explode it to see what parts tangle together:
Turn it into an nCloth, put a strong radial field, or fields in the middle of your mesh and play the sim (set your timeline prefs to "play every frame").

Try a few presets in the nCloth's attribute editor as they solve differently...This won't give you a definitive answer unless you dig into the collision and self collision attributes in the nCloth.

R

Milos Vukotic

unread,
Mar 3, 2014, 10:33:37 AM3/3/14
to maya...@googlegroups.com
Thanks for your reply Ryan,
Your ambient occlusion suggestion sounds great, how come I haven't came up with that.

This model is not for simulation, it's a model of a soap that I'll later convert to .stl so the client can send it to the manufacturer. I basically just need to make sure that from the top view there is no such thing as invisible faces (basically a projection of shape from y axis), that's because I must make sure that it can be nicely pulled out of the mold once it's finished, so no part of the model gets stuck and keep soup unable to be pulled out. Now all that seems to go well and I finished most of it, but I just want to make sure that there are no self-intersections, and checking everything manually will kind of take a while as it's not exactly the simplest model ever, but if that's the only way I'll do it of course.

But I just needed a solution as I'll perhaps do few more of these soap models in the near future, so I wanted to come up with a more fluent workflow.

So if there's a way to check if any of the faces intersects another face, that would be just as good, as I've cleaned up my model and made sure that no face is squashed into an "edge" so all faces are proper.

--
You received this message because you are subscribed to the Google Groups "maya_he3d" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maya_he3d+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Duncan Brinsmead

unread,
Mar 3, 2014, 3:08:06 PM3/3/14
to maya...@googlegroups.com

One thing you might try…

Assign a toon line to your object then on the pfxToonShape disable profile, border and crease lines and enable intersection lines. In the intersection line options enable selfIntersect.

You may also want to lower the line width.

 

A nice benefit is that you can see the intersections as you edit the shape. It might get slow for a heavy mesh, though.

 

Duncan

Duncan Brinsmead

unread,
Mar 3, 2014, 3:14:24 PM3/3/14
to maya...@googlegroups.com

Another benefit of toon lines for your mold… if you use profile lines and view from the top it will create lines wherever the mold would break. The profile lines are created where the normals go from forward facing to away facing. By default it uses the vertex normals… if you are more interested in the raw poly geometry then turn off smoothProfile.

 

Duncan

Milos Vukotic

unread,
Mar 3, 2014, 4:50:27 PM3/3/14
to maya...@googlegroups.com
Hey Duncan thanks so much man!
I think you gave me two perfectly valid ways from what I remember of Maya's toon line.
As soon as I get home I'll try it out, thanks a lot!

In the meantime I remembered that I can use Transfer Maps feature and turn my soap mesh as in a Displacement Map and project it on a flat plane, and then convert displacement map back to geometry, so that way I make sure that all the faces are visible from the perfect top view (what's the right terminology for that btw? All faces visible from one axis? is there anything shorter :D).
However I'm not sure how well the projection will look like...I'll try that one too after I try your suggestion.

BTW It's funny how we all think clearer and come up with great workarounds when it comes to helping someone out, but when we need to help ourselves in the middle of the project we can't think for our lives :D I guess stress may be the cause :)

Duncan Brinsmead

unread,
Mar 3, 2014, 5:17:25 PM3/3/14
to maya...@googlegroups.com

Also if you want to see overhangs in the perspective view you can create a profile toon line(smoothProfile off), then convert toon to poly. On the toon shape under Mesh Output  right mouse over “Camera Point” and do “break connection”, then type in a large value for your axis in the camera point( if up  then make it 0 100000 0 ). This is not exactly ortho but probably close enough. This allows you to see any overhangs while modeling as well as zooming and tumbling the view.

 

Yeah, it seems as if thinking about solutions is a bit like trying to find things. It always seems easier for others that you ask.

ryan harrington

unread,
Mar 4, 2014, 5:20:51 AM3/4/14
to maya...@googlegroups.com
Yay for Paint FX! 
good catch.

If you are going to do a lot of this stuff it might be worth checking out the Lightstorm's L3 deformer. I believe you can just push one mesh into another to create something equivalent to your hieghtfield/displacement method quickly and interactively. It looks like a well calibrated set of tools.

Milos Vukotic

unread,
Mar 4, 2014, 8:11:47 AM3/4/14
to maya...@googlegroups.com
@Duncan, Thanks! Excellent idea!
Your suggestions definitely work for me so far, and once I start the next model I will use your last suggestion, cause I want to have those overhangs (btw thanks for this great and short analogy of what I was talking about :D English was never my strength) be constantly emphasized so I can just go on and fix them on the fly instead of going back and forth from top to perspective view.

@Ryan, thanks!! that looks like a perfect plugin for this! I will definitely consider it for my future projects. But knowing myself I'll probably start building my own plugin of this kind and publish it for free on Creative Crash......IF I ever gather enough spare time :D
Reply all
Reply to author
Forward
0 new messages