Getting Alpha in refraction with mantra?

   3964   5   2
User Avatar
Member
67 posts
Joined: May 2014
Offline
As the title says, I rendering though a glass sphere and need the alpha of what's inside…

any ideas?

Thanks!
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Maybe one simple way is using Indirect_Rayracing Image Plane , then use compositing for changing this data to alpha .

So Just add Indirect Lighting (per-component) extra image plan to your mantra node. 8)
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
67 posts
Joined: May 2014
Offline
Hi Joker,

Thanks for your reply, but that didn't give me an alpha. Any other ideas

Best,
Cris
User Avatar
Member
258 posts
Joined:
Offline
Really not quite sure what you want an alpha of, but if you have an object inside the sphere, and you want a way of extracting a matte to be able to tweak whatever is inside of the sphere in post:

Just create an attribute called matte on the object, make it a vector, and set the x channel to one. In your shader, you will need to bind and export that attribute and add an image plane in your rop called matte, and set it to type vector. That way you should get a mask in the red channel in your image plane called matte.

If this is not what you are looking for, can you clarify a little…
User Avatar
Member
67 posts
Joined: May 2014
Offline
Thanks for your reply.

Yes that's exactly what I need the alpha of an object that's inside a glass sphere.

However the method you are suggesting implies I pipe a parameter via the “interior objects” shader, when is actually the sphere outside who has the refraction shader.

I've tried it anyway but it doesn't work, since it wont consider refraction.

any other ideas?
User Avatar
Member
606 posts
Joined: May 2007
Offline
Not trivial, but think you need to setup your shaders to pass information between each other, http://www.sidefx.com/docs/houdini14.0/vex/functions/trace#idm47446624006848 [sidefx.com]
  • Quick Links