Deleting polygons within some distance

   3494   2   0
User Avatar
Member
54 posts
Joined: Sept. 2008
Offline
Hi there.
I am trying to pour water into a glass cup, but having problem due to the contacting point of water and glass.
So I want to delete the polygons of glass touching the water.
In other words, how can I delete polygons of one object that are within specified distance from other object.
Maybe simple question, but hope some kind advice.

Thanks in advance.

S. Lee
User Avatar
Member
12557 posts
Joined: July 2005
Online
You can use a Ray SOP and Delete SOP for this.

The Ray SOP can find the closest surface for every point and store that value in a “dist” attribute. (You can tell the Ray SOP to not transform the points when it does this)

The Delete SOP can delete using a filter expression using $DIST as a threshold.

Depending on your geometry the Ray SOP might be slow, so you might want to use something like a Magnet SOP or AttribTransfer to make a soft tinting of the water's geometry and then delete based on that.
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
54 posts
Joined: Sept. 2008
Offline
Thanks Jason.

Second option works very well.

I will also try the Ray Sop.

Sincerely,
  • Quick Links