Announcement

Collapse
No announcement yet.

Handling Shadow Masks in VFB

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

  • Handling Shadow Masks in VFB

    Hi,
    I would like to be able to lighten/darken or tint only the shadows of the objects in the VFB.
    Would someone have a tuto or the kindness to explain me how to manipulate the shadow masks in the VFB ?
    I don't understand how Matte/RAW Shadow masks work​.
    Windows 10 - RTX 3090 - AMD Ryzen 9 5950X - 128 Go RAM
    Sketchup PRO 23.0.419 + V-Ray 6.20.02
    3DS Max 2024.2.1 + V-Ray 6.20.06
    Chaos Vantage 2.3.0
    GeForce Studio Ready Driver Version 546.01​

  • #2
    Hello DCHA34,
    Thank you for your question.
    Perhaps the easiest way to do what you describe would be by adding Shadows Render Element.

    Shadows RE works as a reverse mask for shadows. It is a color image that can be used to lighten, darken or tint shadows.

    Shadows can be lightened in the composite by adding this render element, or darkened by subtracting this render pass from the final composite.

    Click image for larger version  Name:	Shadows.jpg Views:	0 Size:	128.6 KB ID:	1173812

    This Shadows RE is the product of multiplying the Raw Shadow RE with the Diffuse RE in the composite.

    So by multiplying the Diffuse RE by Raw Shadows RE and adding them on top of the RGB channel will give you similar\same to Shadows RE results.

    Click image for larger version  Name:	Raw_shadows.jpg Views:	0 Size:	144.0 KB ID:	1173810

    And the third option is to add Matte Shadows RE to Raw Lights RE.
    Matte Shadows RE shows areas where light doesn't reach. Compared to the Raw Shadow RE, which gives areas of cast shadows.

    Click image for larger version  Name:	Matte_Shadows.jpg Views:	0 Size:	146.2 KB ID:	1173811

    Multiplier and add amount depends on what results you want to achieve.
    I am also attaching the test scene with settings, hope it helps.
    Shadows_compositing.zip
    Attached Files
    Last edited by natalia.gruzdova; 22-02-2023, 08:01 AM.
    Natalia Gruzdova | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Hi Natalia,
      thank you for this detailed explanation.
      While trying quickly different blending modes, I found this "artifact" (see photo) with the Raw_Shadows RE and the Shadows RE.
      Is it a bug?

      Click image for larger version

Name:	Bug.jpg
Views:	131
Size:	189.8 KB
ID:	1173818
      Windows 10 - RTX 3090 - AMD Ryzen 9 5950X - 128 Go RAM
      Sketchup PRO 23.0.419 + V-Ray 6.20.02
      3DS Max 2024.2.1 + V-Ray 6.20.06
      Chaos Vantage 2.3.0
      GeForce Studio Ready Driver Version 546.01​

      Comment


      • #4
        Natalia,
        I just took a closer look at all this. It's not exactly what I expected.
        In fact, I would have liked to have a classic black and white or grayscale shadow mask.
        Exactly like the attached image. This is a save of the Sketchup screen in shadow mode only.
        In summary, can we have the shadows in Cryptomatte mask format.
        I hope I've been clear enough.​

        Click image for larger version

Name:	SketchupShadowsOnly.png
Views:	140
Size:	139.3 KB
ID:	1173830
        Windows 10 - RTX 3090 - AMD Ryzen 9 5950X - 128 Go RAM
        Sketchup PRO 23.0.419 + V-Ray 6.20.02
        3DS Max 2024.2.1 + V-Ray 6.20.06
        Chaos Vantage 2.3.0
        GeForce Studio Ready Driver Version 546.01​

        Comment


        • #5
          I think this is the effect you want, just follow the screenshot. The test file is below. tast.rar

          Comment


          • #6
            rendering result

            Comment


            • #7
              Hi wzfwzfwzf
              thanks for taking time to look for a solution, but it's not a style of rendering I'm looking for.
              It's the possibility in V-Ray to have a Cryptomatte mask of the shadows and thus have the possibility to " tweak" the shadows only in the VFB.​

              Here is an example made with the "Sketchup mask" in Photoshop

              Click image for larger version

Name:	Example.jpg
Views:	142
Size:	399.5 KB
ID:	1173876
              Last edited by DCHA34; 23-02-2023, 01:33 AM.
              Windows 10 - RTX 3090 - AMD Ryzen 9 5950X - 128 Go RAM
              Sketchup PRO 23.0.419 + V-Ray 6.20.02
              3DS Max 2024.2.1 + V-Ray 6.20.06
              Chaos Vantage 2.3.0
              GeForce Studio Ready Driver Version 546.01​

              Comment


              • #8
                Hello DCHA34,

                While trying quickly different blending modes, I found this "artifact" (see photo) with the Raw_Shadows RE and the Shadows RE. Is it a bug?
                Thanks for sharing, I will need to look further into it.

                It's the possibility in V-Ray to have a Cryptomatte mask of the shadows and thus have the possibility to " tweak" the shadows only in the VFB.​
                The Shadow Select feature (that is perhaps most close to what you are describing) is logged as a feature request for evaluation. Cryptomatte Render Element can select only objects for masking and also can be added to Lens Effects.

                Here is an example made with the "Sketchup mask" in Photoshop.
                Similar results are possible with all three approaches I have shared previously. This is example for Shadows RE compositing in the VFB:

                Click image for larger version  Name:	Shadow_compare.jpg Views:	0 Size:	387.1 KB ID:	1173927

                The render elements itself look different from what you give as an example, but combining Matte Shadow (10%) + Raw Light gives similar results, please see here:

                Click image for larger version  Name:	Matte+RawLights.jpg Views:	0 Size:	126.3 KB ID:	1173928 Click image for larger version  Name:	Matte_shadow_RE.jpg Views:	0 Size:	171.2 KB ID:	1173929
                Natalia Gruzdova | chaos.com
                Chaos Support Representative | contact us

                Comment

                Working...
                X