2
$\begingroup$

Hope you're all good,

I have a question, I made an object and use the refraction BSDF on it, so it refract the image I put in the background. And I want to keep the refraction of the object but i want to make transparent the background. If you can help me and know how to do this, please tell me :) I put you the picture i work on. The first picture is with the background. And the second picture is what i want to acvhieve but with the refraction of the first picture. enter image description here

enter image description here

$\endgroup$
3
$\begingroup$

There are a few methods you could use to achieve this.

The most practical ones are:

  1. Material with a light path node
  2. Compositing

for a simple scene like yours, I'd recommend the material option as you just need to add 3 nodes to your material setup and you can see the result in the viewport.

In my case the sphere is the refractive object, and the cube is the background object.

Add a mix shader between your existing shader and the material output node (in the background object material that is). add a light path node -> is transmission ray to the fac input of the mix shader node.

add a transparent shader with a white color in the first (white emission shader in the screenshot) and your existing shader in the second shader slot (red emission shader in the screenshot).

enter image description here

$\endgroup$
1
  • $\begingroup$ thank's a lot !! $\endgroup$ – Corentin Montant Feb 12 '20 at 12:46

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.