Announcement

Collapse
No announcement yet.

Shadows on black are still a problem

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

  • Shadows on black are still a problem

    A pretty common thing for me is to render stuff on black with a shadow catching plane.
    I'll then comp any bg color in later, and the alpha in combination with a multimatte for the ground plane also gives nice control over the shadow falloff in post.
    That flexibility is super cool, but it comes with a problem: Shadows are also black, so the alpha is super noisy because it's massively undersampled,
    In CPU mode I have to raise the min subdivs to 10-15 which is a pain, but in GPU there isn't even a min subdiv parameter. That's making GPU unusable for me for that kind of job.
    Leaving me with render times that are up to 10 times as long as they'd have to be if the sampler would incorporate the noise in the alpha.
    ​Would it be possible to change that?
    Click image for larger version  Name:	Screenshot_8.jpg Views:	0 Size:	48.5 KB ID:	1160179 Click image for larger version  Name:	Screenshot_7.jpg Views:	0 Size:	167.1 KB ID:	1160180
    Last edited by Ihno; 20-09-2022, 04:41 AM.
    German guy, sorry for my English.

  • #2
    Hi could you send us a scene that reproduces the issue? I am not sure I understand your setup completely.
    You can send the scene here or thought the support contact form.
    If you choose the contact form please mention that you also have a forum thread opened.
    Vladimir Krastev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Hey Ihno

      V-Ray GPU uses 8 Min Subdivs by default, you also have control over Min Subdivs using Rays Per Pixel parameter in Performance tab

      Click image for larger version

Name:	Screenshot_70.jpg
Views:	336
Size:	46.1 KB
ID:	1160495

      This is the formula used for conversion

      minSubdivs=int(sqrt(vraySettings.rt_productionGpuR aysPerPixel*4)

      so using higher amount of Rays Per Pixel will give you more Min Subdivs

      I personally don't like this workflow for shadows, I render my shadows in their separate pass using a shadow catches and white background it is easier this way. See this video

      Best,

      Muhammed
      Muhammed Hamed
      V-Ray GPU product specialist


      chaos.com

      Comment


      • #4
        Thanks Muhammed!
        Kinda feel dump now because of the Rays Per Pixel thingy
        To render against white doesen't really work for me because I can't get blurry things like dof to comp right against darker backgrounds.
        German guy, sorry for my English.

        Comment


        • #5

          Click image for larger version  Name:	Screenshot_17.png Views:	0 Size:	693.0 KB ID:	1161842
          Obviously the background is sampled more often than once.. I just feel that's always to less compared to the overall noise level.
          Which might be a perceived thing and if measured right it might be the same. But somehow to me it's always too noisy in the shadows.


          Edit:
          left: Rendered against white background from dome light (no texture just a color 1,1,1) vs. Right: rendered against black backgound (domelight invisible) with a white png in the vfb background Layer. No camera /exposure whatsoever
          Isn't that supposed to look the same brightness wise?

          Anyway, it's very clear the noise level on the ground is very different. I'd like to get the shadowcacher always as clean as if its renderd against white.

          Here is the scene: (Max 2023 Vray 6 Hotfix 1)
          ShadowAlphaTest.zip

          Click image for larger version  Name:	Screenshot_18.png Views:	0 Size:	1,012.7 KB ID:	1161845

          How do the VFX guys do that? I mean, they gonna have to render that way all the time... do I miss something?
          Attached Files
          Last edited by Ihno; 10-10-2022, 01:45 AM.
          German guy, sorry for my English.

          Comment


          • #6
            Data passes, and anything that's generally not well sampled (as sampling happens on the beauty, the matte is derived from that.), is rendered with fixed AA.
            You'd try and extract a matte/shadow scene out of the beauty (properly removing unneeded shaders and such), and render it by itself with fixed AA.
            Noise levels wouldn't match, ofc, but the matte render would be done with noise well below visible level.
            Compared to oversampling the expensive beauty to get a clean shadow matte, the approach saves a ton of time (more if one can script the scene generation, although now with conditional overrides this gets a lot easier.).
            Lele
            Trouble Stirrer in RnD @ Chaos
            ----------------------
            emanuele.lecchi@chaos.com

            Disclaimer:
            The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

            Comment


            • #7
              For VFX we always just have to crank up the sampling. Or you break it out and disable unused things, like Lele suggested. Sometimes turning off GI helps (I think that might slow down dome lights, though, but I would have to test). If you can make it a separate render where the result you get is the beauty pass (like a black shadow on white) that is usually faster, too.

              In VFX it's not at all uncommon for shadow renders to take longer than the CG element renders in a lot of cases. The real shadows are usually worth it in terms of realism. Sometimes you can cheat and use an AO pass in place of a dome light, and then just render your keylight shadow perhaps.

              Comment


              • #8
                Thanks!
                so everybody would save time/disk space if the alpha would get sufficient samples right away?
                I mean it's not like it's fixed, look at my samplerate element. Eveything outside the box is pure black, the shader doesn't have any refection.
                So vray does somehow recognize that that needs more samples, it just puts too less on it still.
                Couldn't that be changed internally or is there an parameter that's accessible through script?
                I don't shy away from rendering multiple passes but I like to avoid it if I can.
                Last edited by Ihno; 11-10-2022, 12:20 AM.
                German guy, sorry for my English.

                Comment


                • #9
                  The math to get a shadowmatte has always been troublesome, across most engines (it can't be sampled directly, only derived.).
                  Unless some major paradigm shift happens somewhere, I can't imagine this being fixed anytime soon.
                  You could however try and denoise it, as the difference at your noise threshold may well be cleaned up effectively by it.
                  Alternatively, you may try and use a vrayMatteShadow RE, which may produce slightly less visible noise (while that too isn't directly sampled.).

                  If none of the above works, and you don't want to deal with multiple passes, then simply pad the AA with a high min value, like 10 or 12.
                  It'll cost you some time, but it shouldn't be terrible a cost in a properly complicated production scene.
                  Lele
                  Trouble Stirrer in RnD @ Chaos
                  ----------------------
                  emanuele.lecchi@chaos.com

                  Disclaimer:
                  The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                  Comment


                  • #10
                    I'll for now continue raising the minimal samples
                    I would have thought you'd "just" go and tell the part of vray that's responsible for measuring the noise amount to also look at the alpha. Sorry for my ignorance.
                    But as there is something that's deciding to put more samples on the pure black background, wouldn't it be possible to crank that up a bit or to give the user a (maybe hidden) parameter for doing that?
                    German guy, sorry for my English.

                    Comment


                    • #11
                      I see your point, but the risk of abuse, and with it having endless renders, is very high.
                      The point is down to how the matte is derived: sampling is done on the RGB, so that noise threshold is obeyed at that stage.
                      The Matte being derived means the noise is visible only in the matte for a well sampled (i.e. noise threshold met) RGB, and a second sampling stage would have to be initiated to verify what noise level the derived alpha has.
                      Automatically oversampling for the matte/alpha would be somewhat bearable for super-simple situations (i.e. flat, diffuse plane), but could cost a lot if the RGB area was instead complex and expensive, and the oversampling was severe enough (depending on the conditions, it could be many times lower than the RGB requires.).
                      Lele
                      Trouble Stirrer in RnD @ Chaos
                      ----------------------
                      emanuele.lecchi@chaos.com

                      Disclaimer:
                      The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                      Comment


                      • #12
                        Yeah well, It seems to be way more complex than I thought it would be.
                        I'll stick to the raising the min subdivs to like 10-20 approach.
                        For me its only for stills, still a pain to wait over night when min subdivs to 1 is done in 1-3 hours (depending on the count of images) but its not like I'm rendering thousands​ of images that way. Thanks for clearing that up​!
                        German guy, sorry for my English.

                        Comment


                        • #13
                          Actually, a per-channel (RGBA) threshold for noise (or multiplier so that a single threshold controls it all but the user can weight the channels) would be very helpful. I assume some of that is already built in (weighting green more than red more than blue).

                          Comment


                          • #14
                            Originally posted by Joelaff View Post
                            Actually, a per-channel (RGBA) threshold for noise (or multiplier so that a single threshold controls it all but the user can weight the channels) would be very helpful.
                            mental ray flashback
                            Click image for larger version

Name:	mentalray.png
Views:	176
Size:	39.4 KB
ID:	1162678
                            Attached Files
                            German guy, sorry for my English.

                            Comment


                            • #15
                              Like that, but I would make the RGBA setting normalized and be multipliers for the main threshold. So users that didn’t want to mess with it would just set the main threshold, and others could modify the sampling per channel as needed.

                              Comment

                              Working...
                              X