Announcement

Collapse
No announcement yet.

VRayZDepth with Transparent Glass: Is there a way?

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

  • VRayZDepth with Transparent Glass: Is there a way?

    Anyone know of a way to get accurate ZDepth data when looking through glass? For the life of me I cannot figure it out and not even sure it's possible. Just trying to do nice Depth of Field work in post using After Effects. Everything works great except those pesky transparent materials, lol.

    Tnx

    EDIT: This MentalRay plug is exactly what I'm looking for. Accurate refraction AND reflection data in ZDepth.

    http://forum.german-mentalray-wiki.i...hp?p=1278#1278
    Last edited by landrvr1; 19-01-2010, 08:07 PM.

  • #2
    Have you in the Vray mtl "Affect channels" -> "All channels" tries?
    Work here very well


    Thomas

    Edit: I just saw your second posting. Of course the reflection is a problem.
    Last edited by Thomas_Pardun; 19-01-2010, 08:27 PM.
    Material Preset Manager

    Comment


    • #3
      Yes, I just found that. Tnx.

      But that method still does not account for REFLECTIONS in the glass/transparent material. ??

      Any ideas there? That MentalRay plug handles both.

      Comment


      • #4
        This will never work right. At best you will get something between the reflection and refraction depth, which is not good for any purpose. Also, if you have a solid object with Fresnel reflections, you get the same problem - do you get the z-depth for the object, for the reflections, or something in the middle? Neither of these makes perfect sense.

        Best regards,
        Vlado
        I only act like I know everything, Rogers.

        Comment


        • #5
          vlado, yes completely agree. That's what the MentalRay plug is doing; giving you some sort of in-between grey value for the reflections on a refracted material - which means of course that the background as seen through the reflected part of the glass is slightly less blurry, lol.

          Yikes.

          Yet, this depth of field example happens everyday in real life. Crisp in focus reflections on close up glass; while objects at a distance behind the glass are blurred. Is there no way that VRay could ever accomplish this?

          ?

          Comment


          • #6
            Of course V-Ray can do this - just use proper raytraced DOF and everything will be perfectly correct. Keep in mind that real life does not work with a z-buffer either...

            In any case, what kind of z-buffer would get you that effect? Consider a scene with a glass cup that is in focus:

            a) If the z-buffer contains the distance to the glass, then objects behind the glass will be in focus also;
            b) If the z-buffer contains the distance to the objects behind the glass, then the glass itself will be out of focus.

            If you had reflections, things would look even more weird - a reflective object will appear more blurred in places that reflect objects that are close by. In places where it reflects the environment, it will be blurred to the max, regardless of where it is actually in the scene... which is not what you want, I'm sure.

            The point here is that the z-buffer can contain only one value, which is not enough to get you accurate DOF for all these cases.

            Best regards,
            Vlado
            Last edited by vlado; 20-01-2010, 01:13 PM.
            I only act like I know everything, Rogers.

            Comment


            • #7
              For this I recommend rendering the VrayRefraction pass and the VrayReflection pass as well as your ZD. Mask the glass object, comp in the Refraction pass and blur that with ZD, the comp in your reflection pass back on top and keep it sharp (or sharper).

              It may need some finessing and won't necessarily be perfect, but it should get you close.

              I'm with Vlado in with using camera DOF though: your refractions/reflections are affected by that so it creates looks that you can't always match exactly with post blur.
              Brett Simms

              www.heavyartillery.com
              e: brett@heavyartillery.com

              Comment


              • #8
                Could a separate Z pass with only the objects that are on the other side of the glass be composed over the first all object inclusive Z pass fix it?
                It probably is a simple rectangular mask and another Z pass away...if I understood the problem correctly. The blur of the glass if needed could be
                "bled" over with the exclusion of the objects on the other side...in other words, a multimatte or object id with a percentage on it for multi zone mask.
                Last edited by Mikokariadis; 20-01-2010, 05:50 PM.

                Comment

                Working...
                X