6
$\begingroup$

Let's we have this setup:

enter image description here

Sky is black for camera and textured for reflection:

enter image description here

And I want to remove sky from reflection on the ground like this:

enter image description here

And the way that I found is using a post processing nodes like this:

enter image description here

But there is a few disadvantages for this method:

  1. If I add lamps (any emission material) they are also subtracted.
  2. Cycles passes are not denoised. So, this method looks bad with build-in denosing.

Any outer way to achieve this task?

$\endgroup$
9
$\begingroup$

[This is more of a hack.]

Duplicate your Glossy floor plane and assign it an invisible Refraction BSDF. Scale it to wards the Camera as little as possible.

enter image description here

After doing this, all rays bouncing of the Glossy floor plane will pass through the Refraction plane and have the Is Transmission Ray set. They will also be at a ray depth of 4 after leaving the transmissive plane. If it hits the world output at this point, we want it to be black. If there are more bounces, it isn't the direct ray from camera-transmission-reflection-transmission-world and shouldn't be black.

With nodes, combine the Ray Depth <= 4, Transmission Ray and Camera Ray parameters.

enter image description here

The result will also work if other emissive objects are added to the scene.

enter image description here

$\endgroup$
  • $\begingroup$ This hack works great! $\endgroup$ – Crantisz May 4 '18 at 10:30
  • $\begingroup$ that is genius! $\endgroup$ – rob May 4 '18 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.