see through SOP

   4456   6   1
User Avatar
Member
105 posts
Joined: Nov. 2007
Offline
Do any of you guy's know if there is such a SOP that allows you to look through objects ,to an object that might be right behind it, kind of like making the object in front transparent just in the right places?

best Ross
User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
hmmm, interesting. There might be an easier way but you could orient the normals of the “see through object” away from the camera, and then use a Ray sop to test for intersections with the other object. You could use a point attribute on the behind object set to an ID to determine if it hit the correct object.

Move the points to their original location and then delete with an expression that says “if the attribute == the correct id, delete, otherwise keep”

If you wanted to do transparency than instead of deleting you'd have to use that test to set the transparency of the object in the shader.

anyone got an easier way?
User Avatar
Member
12490 posts
Joined: July 2005
Online
In Houdini 9.5 you can write OpenGL 2 shaders and you could possibly write this yourself.
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
7733 posts
Joined: July 2005
Offline
Here's a hip file that I created from trying out Andrew Lowell's idea. Hit play to see the rough keyframed camera animation I did.

Attachments:
cam_cutout.hip (667.6 KB)

User Avatar
Member
537 posts
Joined: Dec. 2005
Offline
whoa it actually worked :shock: thanks Edward! I'll have to remember how to do that
User Avatar
Member
105 posts
Joined: Nov. 2007
Offline
Thats great thanks alot
User Avatar
Member
12490 posts
Joined: July 2005
Online
With Andrew/Edwards approach, you could possibly also use the Visibility SOP instead of the Delete SOP - it may be faster and your invisible prims will still make it into your render (if that's what you want).

The reason I suggested OpenGL2 shaders is that it's realtime from any view in the viewport. Did you want this in the viewport? Or just in the rendered image?
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
  • Quick Links