Announcement

Collapse
No announcement yet.

Vray Caustics through glass

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

  • Vray Caustics through glass

    Hello, my client would love to have these kind of caustics in my renderings. My scene have a few glass suspensions scattered with forest pack, with a sphere light for each.

    Any ideas how to approach this? I'm afraid not to be able either to have a clean result or decent render times, as it cleates noisy caustics and fireflies. I would love to hear how you would approach this.
    Here are a test with progressive and photon map systems, with default settings.
    Thank you in advance,


    Attached Files

  • #2
    I'd use dedicated light sources (i.e. point-like spots) for the caustic pass, and compose the caustics later.
    You're trying to achieve an identical lensing effect to the real world, but any -even minute- difference in geometry, shaders, lights or even distances will produce potentially wildly different results (f.e. a bit more or a bit less glossiness in the refraction.).
    So, you either have the time, patience and data to match the scene precisely, and then render the caustics, or you're much better off reining them in with a custom setup.

    It's however a hunch, as without a scene it's hard to tell what may be wrong. We can definitely do such sharp caustics, with either engine.

    edit: see attached. Notice there is no need to let the render run for ages: if they are right, they'll show up mostly complete right away (see my rendertimes. the caustics show up from pass 2.).

    Click image for larger version  Name:	image.png Views:	0 Size:	397.9 KB ID:	1181766
    Last edited by ^Lele^; 25-05-2023, 01:48 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


    • #3
      I see, this should indeed be a better compromise to composite it later. I did create a simplified scene with both scaterred object sources and the forest one, if you got time to test it
      Attached Files

      Comment


      • #4
        Yep: remove refraction glossiness, make the light source smaller.
        Click image for larger version

Name:	image.png
Views:	680
Size:	5.31 MB
ID:	1181773
        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
          Oh that is really helpful, thank you!
          When you say "i.e. point-like spots" you mean using Vray IES instead of my Vrayspheres?
          Is there a way to only use specific lights to calculate the caustics to avoid compositing? (to use for exemple actual spheres for the source and dedicated spots for the caustics, and not having the HDRI/Sun system interfere)

          Comment


          • #6
            Originally posted by MartinDarzacq View Post
            Oh that is really helpful, thank you!
            When you say "i.e. point-like spots" you mean using Vray IES instead of my Vrayspheres?
            I meant max's own spot. ofc you can do it with a small v-ray light, but the smaller, the sharper the resulting caustics, and nothing is smaller than a point.

            Is there a way to only use specific lights to calculate the caustics to avoid compositing? (to use for exemple actual spheres for the source and dedicated spots for the caustics, and not having the HDRI/Sun system interfere)
            You can surely set it up in the scene,. but it's going to be cumbersome to maintain for many lights, and you may have to make look-breaking changes to the shaders to get the caustic shape you'd like.
            Much better to prepare a caustic-only version of the scene, and plus the results of the caustic RE to the actual scene rendering.
            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
              Alright, thanks a lot for your guidance, I will experiment with this. Have a fantastic day!

              Comment


              • #8
                If you want to save on render time you could make an image of the concentric rings effect and use it as a texture map in a light to essentially project the fake caustics pattern on the ground. Then it could be varied and blurred to taste per light, and would not slow down your render like actually tracing the rays through the glass.

                This sort of slide projector pass could easily be comped in later too.

                Pretty cool what you guys are getting with actual tracing, though.

                You could even use one of your lights to compute a still of the pattern with a camera looking straight on to a plane, or Bake to Texture, etc.

                Comment


                • #9
                  Originally posted by Joelaff View Post
                  Pretty cool what you guys are getting with actual tracing, though.
                  Once it's properly set up, the actual caustic tracing is so quick it can be edited with IPR active, and it will feed back quite quickly.
                  As such, it becomes a lot simpler to go and change the light size, position and intensity to achieve just the effect one wants.
                  Granted, if it's a baked image it's going to be quick, but it's hard to capture the kind of nuancing the tracing offers (download the source for better quality.).
                  Those rendered for 15 seconds each (about 16 to 18 passes each), so forgive the noise.
                  Also this attached one, with 5 colored lights arranged above the caster (think of it as an LED-composed source, f.e.).

                  Notice we have a lot of traced rings, most of which are secondary and tertiary, as the caster object only has 10 ridges. I find it awesome. ^^

                  Click image for larger version  Name:	image.png Views:	0 Size:	1.24 MB ID:	1181847
                  Last edited by ^Lele^; 25-05-2023, 10:22 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
                    Cool. video. I like your little Fresnel lens, lol.

                    Can you share that test scene so I can see the settings. I haven't messed much with caustics in VRay lately.

                    Is that latest colored example using colored IOR mapping, or does the Dispersion setting (Abbe number) do that for caustics?


                    Certainly if you need the detail and have the time tracing is the way to go. Just sometimes the cheats can save hours or days.

                    Comment


                    • #11
                      Originally posted by Joelaff View Post
                      Cool. video. I like your little Fresnel lens, lol.

                      Can you share that test scene so I can see the settings. I haven't messed much with caustics in VRay lately.
                      sure, attached.
                      Of note:
                      Render Setup: MSR @ 1 so to favour camera passes, and therefore photon passes.
                      Do not use to render a beauty scene with, it's just so to maximise the number of photons traced per minute.

                      Glass material: the glossiness @ 0.99 adds really nothing (besides showing they work with rough transmission), feel free to set it to 1.0 for quicker tracing.
                      Glass Material #2: "Affect Shadows" has to be off for caustics to work.
                      Glass Material #3: Use "Affect all channels" if you want your caustic pass to also contain what is behind refraction.

                      Is that latest colored example using colored IOR mapping, or does the Dispersion setting (Abbe number) do that for caustics?
                      You can surely use dispersion, in my case though i was tracing five individual colored lightsources.
                      here's a single lightsource, with dispersion in the glass, and an abbe of 1. 1 min render.
                      Click image for larger version  Name:	image.png Views:	0 Size:	1.54 MB ID:	1181860

                      Certainly if you need the detail and have the time tracing is the way to go. Just sometimes the cheats can save hours or days.
                      If set up properly, and within reason, it's terribly quick.
                      It shouldn't be considered something to be just turned on in any scene, as it has limitations.
                      But if one caters for those, this thing flies.*

                      *It has to be said the technique doesn't much like many cores and lower clock speeds, favouring the latter over core count, past a certain limit. So if you have a quick 12/16 core, have that run the caustic passes, you'll be a happy camper.
                      Attached Files
                      Last edited by ^Lele^; 25-05-2023, 10:53 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


                      • #12
                        That latest one looks amazing! thx

                        Comment


                        • #13
                          I did manage to do something interesting thanks to your guidance. May I ask which workflow would you use to composite it in post?

                          I tried various ways, the closer I got was rendering with a dark override material ( value 6) excluding the dedicated glass suspensions. Blending it in screen mode in Photoshop playing with levels. The result feels a bit off.
                          I tried using a black material, but with a value of black 0 in the override, I did not get any caustics in render. How would you do that?

                          Comment


                          • #14
                            It can be done in two ways: vanilla, and advanced.

                            Vanilla, just add the caustics RE, and plus it to the rest of the layers. Notice in this mode caustics seen behind refractive shaders will be in the refraction RE.


                            Advanced, on the Max side, make the refraction affect all channels in the refraction options, so the caustics will *also* show up in the caustic RE if seen behind glass.
                            Do this for as many shaders as you need to.
                            On the comp side, you should be able to minus the caustics RE from the refraction RE as needed (i.e. Refraction RE- Caustics RE).
                            With a "cleaned" refraction, you're free to comp as usual, lastly plussing the caustics RE.
                            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
                              Thank you very much, I'll give it a try!

                              Comment

                              Working...
                              X