Announcement

Collapse
No announcement yet.

Refraction Environment Override Caution

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Refraction Environment Override Caution

    Imagine a reflective object, reflecting the environment;
    If the reflection ray has to pass through a transparent (refractive) object (like a window/glass) before hitting the environment;
    The reflection ray will only pick up the refraction override;
    So the reflections on these objects will be what ever is used in the refractive override slot; Not the reflection override slot.
    And in my case at the moment its black = no reflections from these objects.
    Sound confusing? I am confused - does this sound right?
    Last edited by bob-cat; 20-09-2011, 10:32 PM.

  • #2
    Well what you have to consider is that any ray that has passed through a refractive material has become a refractive ray rather then reflective. So, when you see a chrome object through a glass, in rendering term you are seeing a refraction and not a reflection, even though thats what it is in reality. Even if you split this into render elements, you will see that the reflection pass is empty and rather the objects reflection is baked into the refraction element.
    I think to solve your current issue, you can assign your reflection environment to that reflective shader into the environment slot, and under options of the vray material set environment priority to 1, this should return the reflection to its previous state.
    Dmitry Vinnik
    Silhouette Images Inc.
    ShowReel:
    https://www.youtube.com/watch?v=qxSJlvSwAhA
    https://www.linkedin.com/in/dmitry-v...-identity-name

    Comment


    • #3
      This is slightly different, you are NOT looking through a transparent object - for intance an interior scene.
      See attached images:

      Click image for larger version

Name:	NoRefractionOverride.jpg
Views:	1
Size:	130.4 KB
ID:	844502Click image for larger version

Name:	RefractionOverride.jpg
Views:	1
Size:	114.8 KB
ID:	844503

      A basic room with glass from floor to ceiling and open at one end.

      The first image has no refraction override, the second has black.

      Why are the reflections picking up the refraction override material?

      Thanks for the tip on the environment priority, but this has no effect.

      Is this by design or a bug?

      Comment


      • #4
        Hey maybe I did not understand correctly your problem. Here is a scene I have created which should replicate your issue and the use of environment override. Please have a look.

        http://www.mediafire.com/?wq2tpo9m2t832pj

        The image is rendered inside a close object which is glass and the environment is reflected in the teapot with refraction override enabled (set to black)
        Attached Files
        Dmitry Vinnik
        Silhouette Images Inc.
        ShowReel:
        https://www.youtube.com/watch?v=qxSJlvSwAhA
        https://www.linkedin.com/in/dmitry-v...-identity-name

        Comment


        • #5
          Thanks Dmitry,

          But now the refraction override does not work? The refractions should be black.
          Any suggestions?
          It seems that different refraction/reflection overrides don't work in this case?

          Comment


          • #6
            The reason you are getting override colors in your reflections is because the reflected ray is returning the result of the refracted ray (ie, black). The best way to handle this would be use a VrayOverrideMtl wrapping the Glass material. You want the base (what is returned by Camera/Eye rays, ie rays that hit the object directly without passing through anything else) and refracted material (what is returned by rays refracted through an object, ie glass in front of glass) to be your current override material, however the Reflected Material (the material as seen in reflected rays, ie your teapot) will be a standard glass with no refraction override.

            Does that make sense?
            -Eric

            Comment


            • #7
              Hey Eric, thanks.
              That hurt my head thinking of that, think I understand, will give it a go.
              Won't the refraction of the reflection material override use the gobal refraction override....?

              Comment


              • #8
                Ok got it sorted, thanks.

                I'd be interested how everyone else deals with compositing backgrounds behind glass (refractive materials) in post.

                Without this I always get abit of the Vray environment in the refraction of the glass.?

                This is the material setup which works, without the refraction override enabled (which also affects reflections):

                Click image for larger version

Name:	RefractOverrideMaterial.jpg
Views:	1
Size:	237.8 KB
ID:	844598

                As Eric mentioned, a VrayOverrideMtl, with a copy of the glass material in the refraction override with a black colour in the environment slot of that material.

                Cheers

                Comment


                • #9
                  Originally posted by bob-cat View Post
                  I'd be interested how everyone else deals with compositing backgrounds behind glass (refractive materials) in post.
                  typically you would not render refraction, only transparency, you would simulate refraction by using a refraction vector with a combination of fall off (fresnel) to distort the background if you needed to on a curved surface. That works for most of the cases where your glass is straight and does not bend refraction anyway. But there are some situations where that does not work, so a more elaborate approach is required.
                  Dmitry Vinnik
                  Silhouette Images Inc.
                  ShowReel:
                  https://www.youtube.com/watch?v=qxSJlvSwAhA
                  https://www.linkedin.com/in/dmitry-v...-identity-name

                  Comment

                  Working...
                  X