Announcement

Collapse
No announcement yet.

Basic VRay Caustics (refractive) Tutorial

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

  • Basic VRay Caustics (refractive) Tutorial

    OK. This is my attempt at a tut on achieving refractive caustics.

    -------------------------------------------------------

    1) Create glass material - settings are shown below:



    This isn't an explanation of how to create glass in VRay, so I won't go into the details of the material, except where the Fog Color is concerned. The color you choose determines the color of your glass, and the multiplier determines the particular hue of the fog color. Lower numbers (like 0.1) will make the glass very close to the hue that you chose. Higher numbers (like 2.0) will adjust the hue downward (such as in the case of the image I posted, the green color of the glass is a lower hue value within the green-->teal range; if the multiplier were 0.1, then the color of the glass would pretty much be the same as the color shown in the swatch). If you need more of an explanation on this, just ask me.


    Approximate hue range for fog multiplier.


    Fog multiplier set to 0.1 (notice the absorption effect in the darker areas of the torus)


    Fog multiplier set to 2.0

    Notice also that the fog color also affects the color of the caustics.

    2) Apply the glass material to an object (in this case, the torus knot), which for the sake of example sits upon a plane that has a standard grey material.

    3) Now for the light set up. I started with an omni, but I didn't want photons going all over the place and being wasted. So, I chose a target spot. The settings are shown below:



    Two things to take note of here: the multiplier and the decay type. These two values go hand-in-hand. For the spot to emit "physically correct" light, the decay type should be set to inversse square, because that's how light behaves (the intensity of light decreases by the inverse square of the distance that it travels because the area that the light spreads increases by the square of the distance traveled - check out a little experiment with this at Exploratorium) Believe me, any other setting will completely botch the effect.

    Now, since we have a light that is decaying and spreading in area in a "natural" way, the multiplier has to be set pretty high in order for enough of that light to illuminat the chosen target. In this case, a multiplier of 20,000.00 is a good place to start. The above images used this setting, and the image below uses a multiplier of 40,000.00:



    4) Finally, the render set up. First, make sure that Caustics are turned on in the render rollout.



    This first thing I want to talk about is the max photons setting. This will determine how many photons from the spot will contribute to the caustic effect. It basically works like this: the fewer the photons, the crisper the effect; the greater the photons, the softer the effect - as shown below:


    20 photons


    200 photons


    2000 photons

    I chose to leave the max photons at 200, since that gave a nice looking result. The setting of 20 was nice and crisp, but also had a lot of artifacts, whereas the 2000 setting was far too blurry.

    Next, I'll talk about the search distance. This determines the max radius for finding contributing photons. I'll let the pictures speak for themselves:


    Search distance 0.1


    Search distance 0.5


    Search distance 20

    In this particular case, values above 20 do not improve the resulting render.

    Next, the caustics multiplier. This determines the intensity of the effect independent of the light multiplier. Examples:


    Light multiplier set to 5000.00 / Caustics multiplier set to 1.0


    Light multiplier set to 5000.00 / Caustics multiplier set to 5.0


    Light multiplier set to 5000.00 / Caustics multiplier set to 20.0


    Light multiplier set to 40,000.00 / Caustics multiplier set to 0.25

    And lastly, under the system rollout make sure that under light settings... your light source (in this case the target spot) is set to generate caustics, under object settings... your object(s) (in this case the torus and plane) are set to generate and receive caustics. Yes, I know that the plane does not generate caustics





    Notice also that there are separate caustics multipliers in both the object and light settings. I'll let you play with those.

    One last note: you'll notice that under the light settings there is a caustic subdivs spinner. This basically controls the accuracy of the effect. See below:


    Caustic subdivs set to 100


    Caustic subdivs set to 2000

    -------------------------------------------------------

    Comments, questions, corrections are welcome and appreciated

  • #2
    Very nice...

    robert
    I'm registed believe me! Just miss that logo.

    Comment


    • #3
      Thanks Keith, for the very nice explanation you have done here!

      Very, very nice!

      Gonçalo

      Comment


      • #4
        Thanks Keith!!!
        This is something we all were needing since the beggining!

        Vlado please consider it to put in the manuals...

        Regards,
        Joao.

        Comment


        • #5
          The tutorial has been added here:
          http://vray.info/entry.asp?entryID=97
          Torgeir Holm | www.netronfilm.com

          Comment


          • #6
            Very nice and well explained...

            Thanks,
            Dean
            karoodesignviz.com

            Comment


            • #7
              NP, everyone. My pleasure

              Comment


              • #8
                very nice clean and simple tutorial !!!!! thank you so much was a great help and very easy !!

                Comment


                • #9
                  You're welcome, prey

                  Comment


                  • #10
                    Hi,
                    I am struggling like mad to get any result out of your caustics tut... I create the material, apply it, turn everything on as required, etc. What I get is a dull grey torus knot on a dull grey plane. What on earth am I missing here?
                    Is it in the material that should be a standard material with a vray material in the refractive slot? Is it a missing light source like a vray light?
                    Help appreciated
                    Ad

                    Comment


                    • #11
                      All the materials should be VRay materials, nothing more is required. Are you sure that you set all the material's parameters correctly as shown in the first screenshot? Getting a plain gray material seems that you either didn't apply the material to the object properly (and instead you see a standard MAX material there or something ) or that the material settings are messed somehow... Maybe try to show us your material settings (screenshot) and we'll see...
                      Because even if the caustics are not working (for some reason), the material should at LEAST be visibly transparent, otherwise it's VERY strange.
                      BTW: do you have VRay set as the current renderer? :P

                      Comment


                      • #12
                        Thanks Dusan!
                        The first thing I now discovered is that I forgot to put the Refract color to white (banging the head against concrete wall). (Working with Alpha channels a lot mislead me apparently). Now the caustic effects are very heavy indeed, but that should not be too difficult to correct.
                        I'll do the tweaking first, and then let you know the outcome.
                        Thanks again
                        Ad

                        Comment


                        • #13
                          Awesome little tut thanks heaps.

                          These are the types of little tuts we need for all those types of popular features. CHEERS

                          Comment


                          • #14
                            Thanks for the kind words I agree that more tuts are needed, but it's a really time consuming process. I found that the best way to approach doing a tut is to pick a feature then go through a process of achieving a good result with it, while at the same time keeping a record of the steps you went through. It may not happen on the first pass, but eventually you end up with something that others can benefit from. I mean, the caustics tut came together after about 5 tries on my part to develop a predictable workflow.

                            I hope that in the near future others, and perhaps even I will be able to make additional tuts on all the great capabilities of VRay.

                            Comment


                            • #15
                              ..........

                              Comment

                              Working...
                              X