Announcement

Collapse
No announcement yet.

How to get cleaner Cryptomatte in dark areas

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

  • How to get cleaner Cryptomatte in dark areas

    Hey guys,
    is there a way to get cleaner masks for Cryptomatte workflow in dark areas of the render? Typically the masks get noisy, the darker the RGB gets. It was the same with the MMRE workflow, so not related to Crypto. Does raising Min AA help?
    https://www.behance.net/Oliver_Kossatz

  • #2
    Is multimatte any better for you?

    What about adding a VRay ambient light and then subtracting it out in post?

    Comment


    • #3
      Yeah you would need to raise the min aa a lot. We have to get the aa to be 10-16 min some times.
      Dmitry Vinnik
      Silhouette Images Inc.
      ShowReel:
      https://www.youtube.com/watch?v=qxSJlvSwAhA
      https://www.linkedin.com/in/dmitry-v...-identity-name

      Comment


      • #4
        That's interesting. I was under the impression that cryptomatte didn't take anything like samples into account and was mathematical and based on other scene data.
        I am better informed
        https://www.behance.net/bartgelin

        Comment


        • #5
          Originally posted by Morbid Angel View Post
          Yeah you would need to raise the min aa a lot. We have to get the aa to be 10-16 min some times.
          You are doing this specifically for the Cryptomattes? Specifically for dark areas? I have not run into this much with multimatte, and can usually do minor cleanup of the matte in post (min/max erode/dilate type stuff).

          I am also of the school of get the beauty to look as close as possible to the final comp. If I make heavy changes in comp I usually bring those back into 3d as much as possible during the lookdev phase.

          Seeing this in both bucket and progressive? We hardly ever use progressive for final rendering.
          Last edited by Joelaff; 28-11-2024, 11:32 AM.

          Comment


          • #6
            I just recently had this issue with cryptomatte. It was not a dark scene or anything but heavily motionblurred where two objects were overlapping each other and the crypto was super grainy in that area. Raising the aa a lot made it cleaner but not super fine. We did end up going with multimatte as it gave the cleanest result. The way we do it though is that we render beauty and utilit layers where in utility we just have the secondary aovs only. So the rgba is lite and samples fast.

            About the math, I think once you start motionblurring things you get into a land where pixes become interpolated data where by default crypto like zdepth can't be interpolated. This is why it may cause issues. However from comp pixel sampling point of view its better to have a smooth edge even if its slightly inaccurate.
            Dmitry Vinnik
            Silhouette Images Inc.
            ShowReel:
            https://www.youtube.com/watch?v=qxSJlvSwAhA
            https://www.linkedin.com/in/dmitry-v...-identity-name

            Comment


            • #7
              Interesting... Yeah, MB and DOF change everything, but so rarely look good in post (or at least not as good as in the render if you can do it).

              So this is what I was talking about with the Vray Ambient light. Works quite well...

              The render:
              Click image for larger version  Name:	image.png Views:	0 Size:	2.05 MB ID:	1221406
              It's Multimatte:
              Click image for larger version  Name:	image.png Views:	0 Size:	71.6 KB ID:	1221410

              With the Ambient Light:
              Click image for larger version  Name:	image.png Views:	0 Size:	1.93 MB ID:	1221408
              The multimatte with the ambient light:
              Click image for larger version  Name:	image.png Views:	0 Size:	72.8 KB ID:	1221412

              Cleans it right up. (Same thing with cryptomatte, but you can't see it as well in a still). For the past few years we have been including an ambient light (usually set to a super low value) not for this purpose typically, but just to get some detail everywhere in case we need it in comp. You can always subtract the ambient, or adjust the black point. ​
              Attached Files

              Comment


              • #8
                But of course TANSTAAFL... This can cause more noise in other parts of the image (once you subtract out the ambient light). It's probably faster to render twice, assuming the scene doesn't have a tone of overhead.... Once, with ONLY an ambient light (and no GI) for all the mattes, and once the normal way, with sane AA settings.

                Of course Using Bucket also fixes most of these jagged edges, as I mentioned in my initial post (Not quite as good as the ambient light, but way better than progressive).

                Comment


                • #9
                  You should set up a data pass, which renders pitch black in the RGB (lights off), to be rendered with a fixed-4 AA and MSR of 1.
                  That will render as quick as it possibly can be rendered, with nicely anti-alised data edges (where applicable.).
                  It has the bonus that it will free you of having to rerender the expensive beauty if you need changes to the masks down the line, and that it will render very very quickly.

                  Here's an MM Re rendered like this:
                  Click image for larger version  Name:	image.png Views:	0 Size:	30.6 KB ID:	1221447

                  To reply directly to the OP, a min of 4 will produce the same result as above on the masks, regardless of noise (as fixed sampling performs no adaptation.), and knowing what you normally render, it won't be a massive drag on total times.
                  But it's *far* less efficient overall than preparing a data pass.​
                  Last edited by ^Lele^; 29-11-2024, 02:41 AM.
                  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
                    Hey guys,
                    thanks for all the information. I tried a Min AA of 4, the result is on the left side. Min AA of 1 on the right.

                    Click image for larger version

Name:	crypto.jpg
Views:	115
Size:	131.1 KB
ID:	1221458
                    https://www.behance.net/Oliver_Kossatz

                    Comment


                    • #11
                      Hello Lele,
                      that would be really great to have this black magic you describe as a button for "render masks only".

                      I miss the script "render masks" so much when doing post production.

                      Kind regards
                      algato

                      Comment


                      • #12
                        Originally posted by algato View Post
                        Hello Lele,
                        that would be really great to have this black magic you describe as a button for "render masks only".

                        I miss the script "render masks" so much when doing post production.

                        Kind regards
                        algato
                        I couldn't agree more !
                        Windows 10 - RTX 3090 - AMD Ryzen 9 5950X - 128 Go RAM
                        Sketchup PRO 24.0.594 + V-Ray 7.00.01
                        3DS Max 2024.2.3 + V-Ray 6.20.06
                        3DS Max 2025.3 + V-Ray 7.00.04
                        Chaos Vantage 2.6.2
                        GeForce Studio Ready Driver Version 566.14​

                        Comment


                        • #13
                          Are 3dsMax rendering settings presets or V-Ray presets no good?
                          https://help.autodesk.com/view/3DSMA...B-582C2316A971
                          https://docs.chaos.com/display/VMAX/Presets

                          OakCorp Japan - Yuji Yamauchi
                          oakcorp.net
                          v-ray.jp

                          Comment


                          • #14
                            It indeed used to be very convoluted, but it's quite simple to pull off today:
                            From your Beauty pass, go in the render settings, and turn off the "Lights" toggle.
                            Click image for larger version  Name:	image.png Views:	0 Size:	3.9 KB ID:	1221489
                            EDIT: You may need also an override material should you have emissive shaders.

                            ​Set the sampler to a fixed 4 (attached, example for the bucket sampler. for progressive match min and max subdivs.)
                            Click image for larger version  Name:	image.png Views:	0 Size:	14.6 KB ID:	1221490
                            Remove any non-data render element (i.e. those depending on the scene being lit.), adjust the file output, and save as "*_dataPass.max".

                            I can surely script something simple, but as soon as one starts having to cater for the various user cases, one ends up having to write renderpass manager.
                            Last edited by ^Lele^; 29-11-2024, 12:42 PM.
                            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


                            • #15
                              Honestly, one of the biggest reasons we don’t do this separate pass more often is that render elements can’t be controlled individually with state sets, and the separate scene method can be difficult to keep in sync.

                              I like the turn off Lights trick! Does that automatically disable GI as well? I had been disabling GI for this type of pass as well as manually disabling lights.

                              Been trying to find a decent pass manager for a while. Just never have the time to research fully. Pulze looks promising, but is a non starter because their licensing requires an internet connection to work (last I checked).

                              Comment

                              Working...
                              X