render last intersectable/intersected surface

   956   1   0
User Avatar
Member
55 posts
Joined: Jan. 2006
Offline
How would you render the furthest ray hit surface?

The goal of this render is to provide the comp department a “back side” layer to put things inbetween the regular front side render.

I have an altered shader using IsFrontFace to “turn off” the camera facing polygon. The problem is that this only gives me the next surface behind the first. Which is great if one is rendering a simple convex shape. But for a more complicated concave shape, like a wildly rippling blob of liquid, this isn't very usefull for comp.

I imagine this would require something like what the Ray SOP does, but in the shading context.
Edited by kleer001 - March 26, 2019 12:56:47

Attachments:
notBackHelp.hip (3.1 MB)

“If you can eat it raw you can't under cook it”
User Avatar
Staff
420 posts
Joined: Sept. 2016
Offline
Probably the simplest way to do it is via custom lens shader (push the camera P to far clip and flip the ray direction). I'm not sure how useful it would be for comp though. For proper depth compositing with transparent/translucent things, I'd suggest deep camera maps instead.
edit: oh wait, I just remembered that only partially opaque things work with DCMs, not transparency/refractions (it would've looked incorrect anyway due to lack of refraction, absorption, shadows, whathaveyou. There really isn't an ideal solution)
Edited by dlee - March 26, 2019 15:07:17
  • Quick Links