phantom vex variable

   3576   6   0
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
is there any way to have different phantom settings in different deep rasters?
.
User Avatar
Member
1390 posts
Joined: July 2005
Offline
zdimaria
is there any way to have different phantom settings in different deep rasters?

Kind of. Phanton simply says mantra, don't even bother to run surface shader for primary rays, assume object's opacity is {0,0,0} in that case.

You can model your shader similarly per AOV basis by multiplying every export with opacity computed with getraylevel(), so whenever getraylevel() returns 0, you are at phantom phase (Of={0,0,0}), otherwise… whatever you wish.
User Avatar
Member
9380 posts
Joined: July 2007
Offline
I'm not sure that will work, this method can be used to get phantom behavior and much more for sure, but I doubt that you can do this per AOV as I think all AOVs share the same opacity ( correct me if I'm wrong )

so if your diffuse is invisible to camera rays and you want your normal pass to be visible for camera rays, multiplying diffuse with 0 for primary rays will give you just black for that object, it will not be transparent, and if you set opacity of your shader to 0 for primary rays your normal pass will be gone as well.
(the possible way may be setting the Sample Filter for AOV to Closest Surface, but I don't think it will do any good, it's lot of problems expecially with cut out opacities)
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
1390 posts
Joined: July 2005
Offline
Good point, thus as I said “kind of”. This will work though for now we have “full opacity filtering” aside of behavior you've watchfully mentioned.

Attachments:
full_opcity_filtering.jpg (31.0 KB)

User Avatar
Member
9380 posts
Joined: July 2007
Offline
try it with more objects on top of each other
are you able to get full AOV color of the object closest to the camera? in my experience in “Full Opacity Sampling” the samples are mixed together if the opacity is not 1 and since you cannot have it on 1 due to faking phantom for diffuse, they will mix
only the “Closest Surface” works kind of correctly apart from mentioned problem, but only if opacity is not 0 so like 0.000001

but maybe there is something I am missing and it works somehow, but I don't see the option of specifying opacity per AOV
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
thank you both. this has given me much to dig around and study
.
User Avatar
Member
1390 posts
Joined: July 2005
Offline
tamte was right btw (thanks!), and it meant be like he said, but I was so happy abusing it recently without flaw. I guess I was lucky.
  • Quick Links