Announcement

Collapse
No announcement yet.

Option to disable DOF per object - eg. to render glass with rain on live-action plate with baked-in DOF

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

  • Option to disable DOF per object - eg. to render glass with rain on live-action plate with baked-in DOF

    I would like an option to render with depth of field, but be able to disable it for specific objects (typically a background plate/object with an image on it), for the ability to render eg. glass with rain, or other objects with dof, on top of a background plate that already has baked-in DOF that cannot be removed.
    In other words, the objects that have the DOF Disabled property, would just render completely sharp - as if the camera had DOF disabled - but only for these objects.

    Maybe a workaround for this already exists and I just couldn't find it? My search got me some results in a Corona forum, but the thread didn't end up with any implementation nor solution, as far as I could tell.
    http://henrikbclausen.com

  • #2
    DoF is calculated on the scene, via the Camera.
    It's simply impossible to turn it off per node.
    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


    • #3
      I see. But is there a possible workaround to solve the use-case as described above?

      And happy new year!
      http://henrikbclausen.com

      Comment


      • #4
        Originally posted by HenrikBC View Post
        I see. But is there a possible workaround to solve the use-case as described above?
        Entirely unsure.
        Other stuff can be composited using render passes (i.e. moblur: render the scene without, and a scene with a single node with, composite.), bot for DoF, i'd be quite skeptical it'd ever work.
        Marrying the CoC with the straight render is going to be exceptionally tricky at best, quite likely resulting in artifacts in a number of cases.

        You could surely attempt it entirely in post, with deep renders and a post-effect DoF, but that too will prove difficult (refractions, reflections, and such), and the visual results, even when one managed to achieve an overall convincing DoF, would look out of sorts, i'd think.

        And happy new year!
        Likewise!
        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


        • #5
          Yeah, and one major reason for keeping it in 3D is to get correct refractions thru the glass/water materials. The developer (I think he was) in the Corona thread seemed to think a method was not impossible, but alas the thread never ended on an answer or follow up..
          http://henrikbclausen.com

          Comment


          • #6
            Originally posted by HenrikBC View Post
            Yeah, and one major reason for keeping it in 3D is to get correct refractions thru the glass/water materials. The developer (I think he was) in the Corona thread seemed to think a method was not impossible, but alas the thread never ended on an answer or follow up..
            Do you have a link to that thread?

            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
              https://forum.corona-renderer.com/in...p?topic=8181.0

              They mention it might be possible as a screen mapped bg. That would work perfectly for my example.
              http://henrikbclausen.com

              Comment


              • #8
                no, not currently possible. We have some internal prototype, but it was not working well, needs more work
                I rest my case.
                I'll poke Ondra anyway, see where it fell apart.

                I still can't get my head around the marrying of the two circles of confusion: the blurs blend together, normally, so splitting them will *have* to generate artifacts.
                For example, if the un-dofed BG was seen through a dofed glass, seems to me to produce an unsolvable case.
                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


                • #9
                  I can see that it's tricky - if not impossible. But I also see utility - if it were, somehow, possible.
                  Just did some experiments. Putting a map in the V-Ray Reflection/Refraction environment slot, set to Screen, is sort of towards my goal - except that besides "bypassing" depth of field, it also bypasses any refractions.
                  http://henrikbclausen.com

                  Comment


                  • #10
                    It's not impossible at all: it's just quite limited to specific cases not involving reflection or refraction.
                    If you think of a diffuse-only scenario, f.e., it's trivial to obtain with simple alpha compositing (of the foreground on the backplate.).
                    But when it coms to those two effects, my head melts trying to find a solution (which is also why i'm not Ondra, or Vlado, or any of our devs, btw. ^^).
                    That, too, would have to be limited to the BG, in case, as marrying *any* node within some other's CoC would become a source of artifacts the eye would be drawn to immediately.
                    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


                    • #11
                      Let me know if one of the uber-devs comes back with any updates.
                      http://henrikbclausen.com

                      Comment


                      • #12
                        it should work per object with multiplier:
                        Click image for larger version  Name:	Screenshot 2022-01-10 131858.jpg Views:	0 Size:	38.5 KB ID:	1136121

                        cpu only.

                        edit: heh. DOF not MB. my bad..
                        Marcin Piotrowski
                        youtube

                        Comment


                        • #13
                          piotrus3333 If only it were that easy.
                          http://henrikbclausen.com

                          Comment

                          Working...
                          X