Announcement

Collapse
No announcement yet.

removing refracted object from alpha

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

  • removing refracted object from alpha

    Currently, there seems to be no way to remove the alpha contribution of objects in refraction rays. You CAN control the alpha contribution of objects in primary rays, but not refraction rays. To be more specific:

    Create a sphere and give it a glass like material (refraction). Place a plane behind with an image texture that will be seen in the sphere's refraction. You can control the primary visibility of the plane and it's alpha contribution to the render, but the sphere alpha will be solid white, instead of semi transparent, as it would be without the plane being present, even when the plane is set as a matte surface. It seems that it is not possible to get the refraction contribution of the background plane in RGB while not getting it in alpha.

    This would be nice if it were possible, for cases when transparent objects need to refract an image plane textured with practical footage elements for live action integration. If it is possible, please let me know what I may be doing wrong. I've been trying every possible permutation in the VRay Object Property node without success.

    Thank you.

  • #2
    Hello,

    Did you set the refractive VRay Material - Affect Color+Alpha (it's on the bottom of the refraction options)?

    Best regards,
    Georgi Zhekov
    Phoenix Product Manager
    Chaos

    Comment


    • #3
      Yes, otherwise you do not get the transparency in alpha. What is happening is: After you put a geometry plane behind the geometry with refractive material, the alpha will look fully white because it is passing through the backdrop plane in the refractions. This happens as long as the plane is visible to refractions. What would be nice is to block the alpha contribution from refraction rays.

      Comment


      • #4
        Currently it is not possible to control the alpha contribution of the objects visible through refraction.
        I can make a feature request about that into our system if you would like.

        The only way I know to remove the alpha from all objects behind the refractive one would be to assign Object Properties node to the refractive-objects and set Alpha Contribution to -1.
        This of course will remove the alpha value of the refractive objects.

        Why do you need that by the way? Have you consider extracting custom masks using MultiMatte/RenderID/MatterialID/MaterialSelect/ObjectID elements and use them in order to get the alpha you are looking for?
        Svetlozar Draganov | Senior Manager 3D Support | contact us
        Chaos & Enscape & Cylindo are now one!

        Comment


        • #5
          Originally posted by svetlozar_draganov View Post
          Currently it is not possible to control the alpha contribution of the objects visible through refraction.
          I can make a feature request about that into our system if you would like.

          The only way I know to remove the alpha from all objects behind the refractive one would be to assign Object Properties node to the refractive-objects and set Alpha Contribution to -1.
          This of course will remove the alpha value of the refractive objects.

          Why do you need that by the way? Have you consider extracting custom masks using MultiMatte/RenderID/MatterialID/MaterialSelect/ObjectID elements and use them in order to get the alpha you are looking for?
          The object properties alpha contribution change only works for primary rays, not refraction, as you know. The reason why you would want the transparency of the refractive material in the alpha is for comping extra information behind the object to control the look in comp some more. It would be nice to get this from one render. We are working on a commercial for a big brand liquor company. My compositor likes to have some of the transparency in alpha to layer more behind the bottle, meanwhile he also likes the bottle look I got from rendering with a backdrop to refract the photography plate. The current workaround is to create a separate render of your refractive object with nothing behind just to extract the alpha buffer from it. I would say it's not a crucial feature, but definitely a useful one to have in production, and not too hard to implement I would imagine.

          Thank you for your help and keep up the great work. I enjoy working with VRay.

          Comment


          • #6
            Thanks for the explanation.

            Object Properties alpha contribution works on a primary rays, that true. I meant to put objects properties on the glass-objects which is directly visible by the camera.
            Regarding your setup would it be possible to send us a example scene and composition file along description of all operations you want to do in compositing stage?
            We might find a way to render it on a single pass.
            Svetlozar Draganov | Senior Manager 3D Support | contact us
            Chaos & Enscape & Cylindo are now one!

            Comment


            • #7
              Here is a simple scene illustrating the situation. It would be nice to get the alpha of the sphere without the backdrop plane in alpha, but get the rgb contribution of the refraction rays. As for comping, it is just as simple. You have a non solid alpha of your top element, giving comper the ability to layer in extra content underneath. If we create a backdrop just to control refraction color information in our render element, it's convenient to be able to turn off alpha contribution in secondary rays. Yes I know we can come up with an alternative at the moment, but it involves rendering another pass with no backdrop.

              Thank you for taking the time to consider this, there is nothing else to troubleshoot really, I just wanted to request that VRay be able to switch off alpha contribution of refracted objects. If I missed an easy way to get this in one render pass, please educate me!

              Thanks,

              Raphael
              Attached Files

              Comment


              • #8
                Hi,

                Thank you for attaching a demo file for this case.
                I have prepared a new scene and screenshot of the render result:
                refract_demo2.zip > Click image for larger version

Name:	2014-12-19 10_53_50}.jpg
Views:	1
Size:	212.7 KB
ID:	854895
                The Refraction affect channels is set to All channels in this setup and Multimatte element is added in order to get a mask for all visible elements.

                Hope this is the requested render result and it is going to work in your production scenes too.
                Tashko Zashev | chaos.com
                Chaos Support Representative | contact us

                Comment


                • #9
                  Yes thank you for showing me, it's simple solution but easy to miss that you control this in the SHADER itself, under "affect all channels". The description is a bit confusing, I must admit, since in logic the setting is that I am trying to affect the Alpha, but if you only select "RGB+Alpha", it doesn't actually work...

                  Also, under the VRay object Properties, there is an "affect Alpha" button in the matte object section, but it doesn't seem to do what you would expect it to do, which is affect the alpha channel. Thank you again for clarifying this!
                  Last edited by freedomfries; 04-03-2015, 12:09 PM.

                  Comment

                  Working...
                  X