Announcement

Collapse
No announcement yet.

Rendering 'matted' reflections

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

  • Rendering 'matted' reflections

    Not sure if I've asked this before, but quick searches yielded no results.

    Is it possible to render a scene where we can effectively have a matte for the reflections from certain geometry. For instance, if I have a piece of geometry, I want to be able to render a black and white matte, the white being the reflections, the black being where nothing is reflected (i.e. where it is reflecting empty space).

    I want to do this at rendertime, without doing a separate pass just for this reflection matte.

    (actually, I might have just found my old thread on this!!!)
    Last edited by tricky; 25-11-2014, 06:09 AM.
    Kind Regards,
    Richard Birket
    ----------------------------------->
    http://www.blinkimage.com

    ----------------------------------->

  • #2
    you could do something like that with reflective occlusion in extra tex and have an inclusion list where only objects you want to reflect are being traced. then you can pull a black and white matte .
    Dmitry Vinnik
    Silhouette Images Inc.
    ShowReel:
    https://www.youtube.com/watch?v=qxSJlvSwAhA
    https://www.linkedin.com/in/dmitry-v...-identity-name

    Comment


    • #3
      Not exactly sure what you mean here. Is this something to do with Vraydirt in an extratex?
      Kind Regards,
      Richard Birket
      ----------------------------------->
      http://www.blinkimage.com

      ----------------------------------->

      Comment


      • #4
        Yes, vray dirt has a mode - reflective occlusion. It acts as a primary reflection ray, where by it traces the objects in the scene with reflection rays and not occlusion rays. Then, the occlusion color becomes the traced object color. This is how you can generate a mask from it.
        Dmitry Vinnik
        Silhouette Images Inc.
        ShowReel:
        https://www.youtube.com/watch?v=qxSJlvSwAhA
        https://www.linkedin.com/in/dmitry-v...-identity-name

        Comment


        • #5
          Originally posted by Morbid Angel View Post
          Yes, vray dirt has a mode - reflective occlusion. It acts as a primary reflection ray, where by it traces the objects in the scene with reflection rays and not occlusion rays. Then, the occlusion color becomes the traced object color. This is how you can generate a mask from it.
          I've attached a very quick test scene if you had a spare moment to take a look Dmitry. There is a mirror and a teapot. Essentially, I need a matte of the reflections in the mirror. I have been clicking buttons like a monkey writing Shakespeare on a typewriter but cannot get what I want. Any ideas?
          ReflectionMatte.zip
          Kind Regards,
          Richard Birket
          ----------------------------------->
          http://www.blinkimage.com

          ----------------------------------->

          Comment


          • #6
            Right - as Dmitry says you can use a dirt map for this. Stick one into the extra tex map slot and use the include / exclude list on it to only choose the objects that you want to get your matte for - in your case the mirror. In the dirt map set the mode to reflection occlusion and use whatever mode (blinn / phong) is the same as the shading mode your mirror material is using. If you're doing any glossy reflections on the mirror mat, you'll need to use the same value in the vray dirt so they blur the same amount. For a flat sharp mirror then it's just 1. If you've multiple objects but only need a matte of one of them you can use the result affect button in vray dirt to exclude objects that you don't want to get a matte for. The last thing to get this to behave is upping the radius of your vray dirt to a large enough amount that the rays coming from your mirror can reach the object you want to get a matte for.

            reflection_matte_01.zip

            Comment


            • #7
              Originally posted by joconnell View Post
              Right - as Dmitry says you can use a dirt map for this. Stick one into the extra tex map slot and use the include / exclude list on it to only choose the objects that you want to get your matte for - in your case the mirror. In the dirt map set the mode to reflection occlusion and use whatever mode (blinn / phong) is the same as the shading mode your mirror material is using. If you're doing any glossy reflections on the mirror mat, you'll need to use the same value in the vray dirt so they blur the same amount. For a flat sharp mirror then it's just 1. If you've multiple objects but only need a matte of one of them you can use the result affect button in vray dirt to exclude objects that you don't want to get a matte for. The last thing to get this to behave is upping the radius of your vray dirt to a large enough amount that the rays coming from your mirror can reach the object you want to get a matte for.

              [ATTACH]21887[/ATTACH]
              Fabulous! You know, I think the thing that I overlooked was the radius!

              So, to have a single pass render with *almost* invisible glass in the RGB beauty, but have all the control of that glass as a series of render elements (the VrayRawReflection, a matte for the glass (set up through a simple multimatte element) and a matte for the reflections (set up using the VrayExtraTex Dirt method)), we just have to give the glass a diffuse of 0,0,0, a reflection of 1,1,1 without falloff, and set the refraction at 255,255,255.

              Ideally, I'd like to have the glass completely invisible in the RGB beauty pass, but appear in the various reflection elements. I don't thing this is possible though.
              Last edited by tricky; 26-11-2014, 06:15 AM.
              Kind Regards,
              Richard Birket
              ----------------------------------->
              http://www.blinkimage.com

              ----------------------------------->

              Comment


              • #8
                I am not sure if such mask could be extracted from the dirt-map but here how it can be extracted from MultiMatte Render Element.
                First Affect Channels from the Reflection Layer of the mirror object must be set to All Channels - this option will force MultiMatte element to create masks not only from the camera rays but from reflection rays as well:
                Click image for larger version

Name:	kiYWsFC.jpg
Views:	1
Size:	51.4 KB
ID:	854723
                Second we have to create copy the teapot-material which will be used as a Reflection Override Material with unique ID number. This is necessary because otherwise the MultiMatte element will create a mask for both camera and reflection rays so in order to separate them they have to use materials with different IDs. Create a new VrayOverrideMtl, assign it to the teapot, the original material should be plugged into Base slot and a copy of it into Reflect Mtl. Then set ID of the Reflection Override mtl:
                Click image for larger version

Name:	vibZ8rJ.jpg
Views:	1
Size:	105.1 KB
ID:	854724

                The last thing would be to use the same ID number into MultiMatte element and to turn on isMATID checkbox:
                Click image for larger version

Name:	kzjdJFy.jpg
Views:	1
Size:	181.9 KB
ID:	854725

                Please note the strength/value of the mask will depend from the strength of the reflection layer of the mirror but this could be easily modified on post:
                Click image for larger version

Name:	JwhuP39.jpg
Views:	1
Size:	38.9 KB
ID:	854726

                Scene: http://ftp.chaosgroup.com/support/ReflectionMatte01.max
                Svetlozar Draganov | Senior Manager 3D Support | contact us
                Chaos & Enscape & Cylindo are now one!

                Comment


                • #9
                  Svetlozar I don't think the people on the forum tell you often enough that we love you - Much appreciated for all the tips and workflow examples over the years

                  Comment


                  • #10
                    This is certainly thinking outside of the box. I will give this a try....
                    Kind Regards,
                    Richard Birket
                    ----------------------------------->
                    http://www.blinkimage.com

                    ----------------------------------->

                    Comment


                    • #11
                      Originally posted by svetlozar_draganov View Post
                      I am not sure if such mask could be extracted from the dirt-map but here how it can be extracted from MultiMatte Render Element.
                      First Affect Channels from the Reflection Layer of the mirror object must be set to All Channels - this option will force MultiMatte element to create masks not only from the camera rays but from reflection rays as well:
                      [ATTACH=CONFIG]21888[/ATTACH]
                      Second we have to create copy the teapot-material which will be used as a Reflection Override Material with unique ID number. This is necessary because otherwise the MultiMatte element will create a mask for both camera and reflection rays so in order to separate them they have to use materials with different IDs. Create a new VrayOverrideMtl, assign it to the teapot, the original material should be plugged into Base slot and a copy of it into Reflect Mtl. Then set ID of the Reflection Override mtl:
                      [ATTACH=CONFIG]21889[/ATTACH]

                      The last thing would be to use the same ID number into MultiMatte element and to turn on isMATID checkbox:
                      [ATTACH=CONFIG]21890[/ATTACH]

                      Please note the strength/value of the mask will depend from the strength of the reflection layer of the mirror but this could be easily modified on post:
                      [ATTACH=CONFIG]21891[/ATTACH]

                      Scene: http://ftp.chaosgroup.com/support/ReflectionMatte01.max
                      Any chance you could save as a 2014 version?
                      Kind Regards,
                      Richard Birket
                      ----------------------------------->
                      http://www.blinkimage.com

                      ----------------------------------->

                      Comment


                      • #12
                        Thank you guys, thank you very much
                        I am happy to hear that at least some of my posts are useful for you
                        Svetlozar Draganov | Senior Manager 3D Support | contact us
                        Chaos & Enscape & Cylindo are now one!

                        Comment


                        • #13
                          Originally posted by tricky View Post
                          Any chance you could save as a 2014 version?
                          Here it is: http://ftp.chaosgroup.com/support/Re...tte01_2014.max
                          Svetlozar Draganov | Senior Manager 3D Support | contact us
                          Chaos & Enscape & Cylindo are now one!

                          Comment


                          • #14
                            Thanks for the scene.

                            Unfortunately it isn't a good solution for us as we want to have the reflection strength VERY dim (as dim as is possible, if not invisible) in the RGB render, but maximum as an element (in the VRayRawReflection element). This means the reflection colour of the material is just 1,1,1 and rendering a multimatte of the reflections using this method yields a VERY VERY dim matte, if not invisible.

                            Essentially, we want the beauty pass to have no glass in it, but the raw reflection element to have the glass in it as 'mirror-like' glass, and then have a matte for the reflections on their own. We want this all to happen at render time in one pass.

                            The vraydirt option as an extratex gets us 95% the way there.
                            Kind Regards,
                            Richard Birket
                            ----------------------------------->
                            http://www.blinkimage.com

                            ----------------------------------->

                            Comment


                            • #15
                              Yes the DirtMap-approach is more suitable in this case.
                              Svetlozar Draganov | Senior Manager 3D Support | contact us
                              Chaos & Enscape & Cylindo are now one!

                              Comment

                              Working...
                              X