Announcement

Collapse
No announcement yet.

(Closed, Open, Closed) [HOU-1635] [HOU-1644] [HOU-1645] Shadow catching workflow

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

  • (Closed, Open, Closed) [HOU-1635] [HOU-1644] [HOU-1645] Shadow catching workflow

    Hello! We have at our studio been using Vray for Maya for many yearsbut we are now in the process of switching to Vray for Houdini for a number of projects.

    What I'm interested in, is finding the best way in Vray to integrate CG objects into live action plates. I am posting here in the Houdini forum because that is where my focus is right now but I will refer to how stuff works in Maya as a comparison. Let me know if I should be posting this in another forum.
    I would also like to know if there is a better way of doing this. The process I will try to explain is from vacuuming the internet and found by trial and error over the years. I can not find any documentation on how to do this.

    I'm going to make a breakdown of the process to better explain and to highlight the problems that arise.


    Backplate: Click image for larger version  Name:	backplate.png Views:	1 Size:	687.3 KB ID:	1060890


    I have this backplate that I want to integrate CG objects into.


    1: Click image for larger version  Name:	vray_case1.png Views:	1 Size:	750.2 KB ID:	1060891


    Here is a render of the CG objects I want to integrate into the plate. They are roughly lit to match.


    2: Click image for larger version  Name:	vray_case2.png Views:	1 Size:	817.3 KB ID:	1060892


    Projecting the plate onto the ground plane using vray light material to get light and reflections cast from the plate. Shadows are missing obviously.

    3: Click image for larger version  Name:	vrayMaya_case3.png Views:	1 Size:	802.7 KB ID:	1060893


    Setting the environment override on the ground material to the projected backplate and setting some matte object properties on the ground plane. It's looking very promising. But there is no GI cast from the plate.

    3.1: Click image for larger version  Name:	vrayMaya_case3_1.png Views:	1 Size:	791.3 KB ID:	1060894


    Here, I first rendered the shadows separately and comped over the plate in nuke. Then projected that comp back using a vray light material. Note the GI from the plate correctly affects the CG objects. This is how I would like the Step 3 image to look.
    This is however not a good solution as it requires a lot of manual steps and needs to be recreated every time something moves or lighting changes.
    Last edited by Gosho.Genchev; 18-02-2020, 08:19 AM.
    Head of Lighting @ Goodbye Kansas Studios

  • #2
    4:
    Click image for larger version

Name:	vray_case4.png
Views:	120
Size:	378.7 KB
ID:	1060948
    All previous images are from Maya.
    This is what I get in Houdini. Setting it up as in image 3.

    Making this work is crucial for our upcoming projects.

    Maya and houdini files attached.
    shadowCatcher.zip

    Cheers!
    /Hannes
    Attached Files
    Last edited by Hannes Drossel; 12-02-2020, 06:41 AM.
    Head of Lighting @ Goodbye Kansas Studios

    Comment


    • #3
      Hannes Drossel, last image is not attached also abc files are missing, will be nice to have those...
      Last edited by bdancer; 12-02-2020, 05:14 AM.
      V-Ray For Houdini | V-Ray Hydra Delegate | VRayScene
      andrei.izrantcev@chaos.com
      Support Request

      Comment


      • #4
        Btw, in Houdini you are not using "alpha contribution"=-1 (as you do Maya) - is that intentional?
        V-Ray For Houdini | V-Ray Hydra Delegate | VRayScene
        andrei.izrantcev@chaos.com
        Support Request

        Comment


        • #5
          Yes of course!

          Updated the hip file a bit to make easier for you as well.
          shadowCatcher_v002.zip

          Cheers!

          /Hannes
          Head of Lighting @ Goodbye Kansas Studios

          Comment


          • #6
            Originally posted by bdancer View Post
            Btw, in Houdini you are not using "alpha contribution"=-1 (as you do Maya) - is that intentional?
            I wasn't really bothering with the alpha at this point. The beauty is the same regardless though. But no the intention was to have the same settings in both apps.
            Head of Lighting @ Goodbye Kansas Studios

            Comment


            • #7
              Uploaded the last image just now.
              Head of Lighting @ Goodbye Kansas Studios

              Comment


              • #8
                Hey, Hannes Drossel ,

                for a while there's been a very simple way to set things up - we've taken a note and will add a guide for this in the documentation.

                Our suggested workflow is to enable "Projection Mapping" on the Matte for Secondary Rays parameter on the Object Properties.
                You can then plug your plate in the V-Ray Environment ROP and things should work straight away.
                I'm attaching a bunch screenshots showing the process.

                1. Here is the geometry from your scene, rendered with a non-textured Dome Light and a default V-Ray material on the ground plane:

                Click image for larger version

Name:	01_lightAndMaterials.jpg
Views:	272
Size:	23.4 KB
ID:	1061100

                2. Adding V-Ray Object Properties to the ground plane and enabling Matte Surface, Shadows, Affect Alpha and setting Alpha Contribution to -1:
                Click image for larger version

Name:	02_matteGeometry_RGB.jpg
Views:	155
Size:	12.9 KB
ID:	1061102
                Click image for larger version

Name:	02_matteGeometry_Alpha.jpg
Views:	152
Size:	27.6 KB
ID:	1061101

                3. Adding a V-Ray Environment ROP node and specifying it under the Environment parameter of the V-Ray Renderer ROP.
                Inside the Environment, I've plugged the image you gave us in your first post in the Image File VOP. UV Type is set to Projection -> Perspective and the Camera is specified there. Use Background is enabled and the plate is plugged in the backgroud texture slot.
                Click image for larger version

Name:	03_useBackground_noProjection.jpg
Views:	169
Size:	70.4 KB
ID:	1061103
                Click image for larger version

Name:	03_useBackground_noProjection_Alpha.jpg
Views:	148
Size:	27.3 KB
ID:	1061104


                4. Set the Object properties -> Matte for Secondary Rays to "With Projection Mapping". If you now also enable "Use Secondary Matte" on the Environment Settings VOP and plug the texture there, things should be looking as good (I've intentionally color corrected the image to make the GI and the texture used for secondary rays obvious ):
                Click image for larger version

Name:	04_matteProject_useSecondaryMatte_RGB.jpg
Views:	157
Size:	75.6 KB
ID:	1061105
                Click image for larger version

Name:	04_matteProject_useSecondaryMatte_Alpha.jpg
Views:	153
Size:	27.4 KB
ID:	1061106

                I've attached the modified scene here: https://drive.google.com/file/d/1sZH...ew?usp=sharing

                Please ping us if that workflow is not what you're looking for - we'll try to figure something out.

                Hope that helps!
                gosho.genchev@chaosgroup.com

                Comment


                • #9
                  Great stuff @Gosho.Genchev!

                  So that solves the first problem actually! Thank you!

                  Ok so more questions:

                  2: How do I catch reflections with reflection alpha? This has been possible before in Maya. Though not using the environment settings thingy.


                  Added a reflective material to the matte ground plane. Click image for larger version  Name:	vray_2.1.png Views:	2 Size:	776.7 KB ID:	1061167


                  Alpha Click image for larger version  Name:	vray_2.2.png Views:	1 Size:	298.1 KB ID:	1061168


                  3. The dome light is reflected on the ground. Can this be turned off? In maya there are reflection exclusion sets that you can use. Can't find that in Houdini. Tried using the reflection mask parameter on the geo, but that did not affect lights.
                  Changing the light mask parameter made the reflection of the dome disappear. But so did the shadows. Click image for larger version  Name:	vray_3_1.png Views:	1 Size:	14.7 KB ID:	1061169
                  Click image for larger version  Name:	maya_3_2.png Views:	1 Size:	738.6 KB ID:	1061170

                  Reflection of dome gone. Great! Shadows gone. Not great.


                  Click image for larger version  Name:	vray_3_3.png Views:	1 Size:	9.7 KB ID:	1061171

                  Alpha looks great.
                  Head of Lighting @ Goodbye Kansas Studios

                  Comment


                  • #10
                    Hehe! Realize now that I answered question 2 by posting question 3.
                    Head of Lighting @ Goodbye Kansas Studios

                    Comment


                    • #11
                      Next question.

                      4: Render elements.
                      is it possible to get these light contribution affecting the plate into separate render elements? We need to get this separate in order to be able to tweak stuff in comp. at the moment browsing through the render elements they are mostly empty. What we used to do in maya was to setup a render layer for each element basically. Changing object properties and building complex shading networks with switches changed per render layer. Would make so much simpler to setup if that would end up in the render elements.
                      Head of Lighting @ Goodbye Kansas Studios

                      Comment


                      • #12
                        Regarding 2/3 - It would be the simplest to add support for the Reflection/Refraction Mask parameters for lights as well as objects - technically Houdini has 'categories' on their lights but those are per-light, not per-object. The Reflection/Refraction Masks, on the other hand, only work with geometry with Mantra. So, if we add support there, we may end up causing confusion when someone removes the wildcard "*" and lights stop exporting. Really not sure how to handle this...

                        As to resolving the problem - you could add a second dome light and disable all contributions for it from the Advanced tab so it doesn't illuminate the scene, reflect, etc - it's there just to throw shadows from the geometry over the matte, in case you really need the dome light shadows .Then you can exclude the original dome light from your matte geometry.

                        Click image for larger version  Name:	domeLgt_matte_castShadows_noReflection_rgb.jpg Views:	1 Size:	86.4 KB ID:	1061313
                        Click image for larger version  Name:	domeLgt_matte_castShadows_noReflection_alpha.jpg Views:	2 Size:	14.3 KB ID:	1061315
                        Click image for larger version  Name:	setup.jpg Views:	1 Size:	205.7 KB ID:	1061316

                        ---------------

                        Regarding 4: I am not sure I understand this - could you please clarify, e.g. with an arrow on the image, what you guys are looking to get ?
                        Last edited by Gosho.Genchev; 14-02-2020, 06:21 AM.
                        gosho.genchev@chaosgroup.com

                        Comment


                        • #13
                          2/3 - Tried your suggestion and it works in this case. However other lights are still reflecting. Having duplicates of all lights in a scene wouldn't be a good workflow. Added a picture of a reflected light.
                          Click image for larger version  Name:	vray_lights_reflection_01.png Views:	2 Size:	779.2 KB ID:	1061344
                          Would it make sense to have exclude/include-lists on the object properties? Like in maya?
                          Click image for larger version  Name:	exclude_lists.png Views:	1 Size:	6.6 KB ID:	1061345
                          May add confusion as there are now two places to manage reflection contribution. Maybe have the Houdini reflection mask work by default and the one in object properties override that one if enabled?

                          What do you think?
                          Head of Lighting @ Goodbye Kansas Studios

                          Comment


                          • #14
                            Having duplicates of all lights in a scene wouldn't be a good workflow.
                            Yeah, that's an understatement


                            Would this make sense / be use-able for you ? We can default those 2 lists to "*" - it is what happens currently anyway.

                            Click image for larger version

Name:	lgtMask.jpg
Views:	164
Size:	196.8 KB
ID:	1061372

                            Maybe have the Houdini reflection mask work by default and the one in object properties override that one if enabled?
                            ​​​​​​My thinking is that the Reflection/Refraction Mask menus on the Render tab of the Geometry node do not list lights in the pop-up window anyway (and that's by design) - you'd have to manually type the light paths. With our own lists in the object properties, we could at least make this easier.
                            The downside is that you'd be excluding reflections of geometry in one place, and reflections of lights in another.
                            gosho.genchev@chaosgroup.com

                            Comment


                            • #15
                              Looks good to me!

                              I like the idea of using the general Houdini UI as much as possible. This adds features not available in Houdini so it makes sense to add extra parameters.

                              Cheers!
                              Head of Lighting @ Goodbye Kansas Studios

                              Comment

                              Working...
                              X