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.
render last intersectable/intersected surface
959 1 0- kleer001
- Member
- 55 posts
- Joined: Jan. 2006
- Offline
- dlee
- Staff
- 424 posts
- Joined: Sept. 2016
- Online
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)
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