Welcome to Brazil for Rhino Sign in | Join | Help

Brazil for Rhino

Advanced rendering tools for professionals
Home Gallery Documentation Support Downloads Buy
in Search

tutorial for caustic effects

Last post 02-05-2010 6:57 AM by Christian. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 02-03-2010 6:21 AM

    tutorial for caustic effects

     Who knows a tutorial to produce caustic like the image attached???

    what parameter we should match for this??


     

  • 02-03-2010 8:12 AM In reply to

    Re: tutorial for caustic effects

    Christian
     
    I don't see an image - did you forget to attach it?
     
    However, you might want to take a look at the Jewelry tutorial included with Brazil - that has a pretty good overview of reflective and refractive caustics.

    --
    Andrew le Bihan
    Robert McNeel and Associates
    http://www.rhino3d.com
    http://brazil.mcneel.com
    <Christian> wrote in message news:3344@brazil.mcneel.com...

     Who knows a tutorial to produce caustic like the image attached???

    what parameter we should match for this??

     

    cau



    http://brazil.mcneel.com/forums/p/1112/3344.aspx#3344

    Andrew le Bihan
    Brazil Product Manager
    Robert McNeel and Associates
    brazil.mcneel.com
    www.rhino3d.com
  • 02-03-2010 10:32 AM In reply to

    Re: tutorial for caustic effects

    Hi Christian,

    Here's a sample file for you to look at.

    The two most important factors in creating caustics like those you've shown are 1) the lights position in relation to the model and 2) the shape of the refractive (or reflective) portions of the model. In this model I used a lens type shape several times and one spot light. Photons are enabled for the spot and caustic photons is turned on in the settings. The default result was very bright so I reduced the caustic photon power in the lights properties to .1, I also tinted the light for the blue effect. 

    Brian James

    Brazil for Rhino / Technical Support
    Robert McNeel & Associates
    www.mcneel.com
    www.rhino3d.com
  • 02-03-2010 10:33 AM In reply to

    Re: tutorial for caustic effects

     

    Brian James

    Brazil for Rhino / Technical Support
    Robert McNeel & Associates
    www.mcneel.com
    www.rhino3d.com
  • 02-04-2010 1:28 AM In reply to

    Re: tutorial for caustic effects

     Thanks soo Much Brian!!!

  • 02-05-2010 3:13 AM In reply to

    Re: tutorial for caustic effects

    Brian James:
    The two most important factors in creating caustics like those you've shown are 1) the lights position in relation to the model and 2) the shape of the refractive (or reflective) portions of the model.

    I think that can't be stressed enough, so I've quoted it :)

    If you look at the @ character that was posted, you'll notice that the sides of the model are very slightly curved.  Anytime you've got curves is when you'll get the interesting caustics.  Flat surfaces - like a glass pane - just let light through almost entirely 'as is', so you don't even recognize them as caustics but as just "light coming in through the window.

    I want to focus just a little on the 2nd point Brian made here when it comes to the models and their geometry.  Along the way, I'd like to adjust Brian's scene just a little to touch on a few other points - so if you want to follow along, just open Brian's scene supplied above.

    For testing purposes, let's disable the anti-aliasing - we can re-enable it later on if you do so - this is entirely optional, although it does help you see the sharpness of the caustics better.

    0. Go into the Brazil Render Settings, Antialiasing panel, and enable the Detailed Controls.  Then in the Sampling Parameters group set the Min and Max values to 0 (zero).

    Caustic intensity
    Let's start with the intensity of the caustics.  Brian mentioned that they were rather bright in his scene so he lowered their intensity.  There's a few reasons they appeared so bright.  One major reason is that his lenses currently use a Glass material that has "transparent shadows" checked on. This allows the light to pass through the lenses and is appropriate for window panes and the like.  However, when you're generating caustics, all the light that would normally pass through the glass surfaces is already contained in those caustics.  If you let the light through 'as is' as well, then you'll essentially get twice as much light on the surface as you should.

    1. So let's go into the Glass material, go to the Brazil Base Options panel, and uncheck the Transparent Shadows option.

    The next bit that is making the caustics appear a little on the bright side is the nature of the light itself.  Right now it doesn't decay, while in the real world it would have an inverse square decay.

    2. So let's go into the Light and in the Features panel, enable the Decay option.  Scroll down to the Color panel and set the Multiplier to 1500 - this to counteract the decay of the light at its current distance a little.  Scroll down to the Decay panel and change the dropdown from Inverse to Inverse Square, and the Scale value to 1.0.  Because Brian lowered the intensity of the caustics in the light, we'll have to bring them back up a bit as well - go to the Photon Maps panel and change the Power value back to 1.0.


    The caustics will now appear rather bright again; but their intensity is accurate.  Rather than decreasing the Power value for artistic control, you could thus lower the Multiplier value in the Color panel instead.  For now, let's continue as is.

    Caustic Colors
    Brian chose to use a rather light in this scene - let's actually make the material of the lenses themselves change the colors of the caustics. ( obviously in real life we'd like our lenses as colorless as possible, so please use your mental powers to change the lenses into a fine art nouveau sculptur instead )

    3. Go back up to the Color panel of the light, and change the color to white.  Go back into the Glass material, and Enable the Absorption option in the Refraction Parameters panel.  To get the blue color, change the absorption values for Red, Green, and Blue to 2.0, 1.0 and 0.5 respectively.

    Using Absorption, rather than a Filter color just makes the material itself more interesting in terms of colors and the caustics. The caustics passing through thicker parts of the object will appear much bluer than those passing through thin parts.


    Now our caustics don't seem so bright anymore either - excellent.

    Caustic Sharpness
    Now let's try making the caustics just a little sharper.  One good thing to check when you're doing a render where caustics are important, is to make sure you're not wasting any photons on your scene that won't be creating the caustic effects.  The best way to do this is to use a Private Focus on the Light's photon settings.  Brian has already enabled this, but let's see if we can't improve on his values a little.

    4. Go to the Light's Photon Focus panel.  The two values here are similar to the light's regular focus but act as an additional focus specifically for the photons.  We'll want them to be as tightly around our object of interest as is reasonable.  Now, I have to admit, I have no idea how to perform the following in Rhino: Set the light as your viewport's view.  So I made do by what I did know to do: Go back up in the Light's panels to the Type panel and change the Target value to 32.5.  This makes the lines and circles in the viewpot roughly line up with the largest lens element.  Now change the Front view to a Perspective view, and just position the view to behind the Light so that the lines from the light appear straight.  Immediately, it should be clear that the black circles (those of the Photon Focus) are much too wide around the model. Let's tighten those - go back to the Photon Focus panel and set both the Hotspot and Falloff values to 37.5.


    Now that we're no longer wasting photons, the result is much sharper already.  But we can do even better.  Right now, quite a few photons get 'estimated' together.  More photons in the estimate means a cleaner result, but it also means a more blurry result.  So let's just see what happens when we play with the estimate settings a little.

    5. Go into the Brazil Render Settings and down to the Photon Map panel.  You'll see a bunch of settings there because it is in Detailed Controls mode, which is exactly what we want.  What I'd like to point out here - and is also described in the documentation - is that all of the settings on the right hand side can be adjusted -after- the photon map has been generated; so we don't have to re-calculate the photons all the time if we're just weaking those values.  To take advantage of this, though, first change the Photon RAM Cache drop-down (on the left) to Reuse.  Let's lower the Photons in estimate value (on the right) from its current 64 to 32.


    That's a little sharper already - you will probably also have noticed that it took less time to render.  If you render again, it will take even less time as we're Reusing the photon map we just calculated.

    6. Let's lower the Photons in estimate value a bit further still, to 16.


    Now the result is very sharp, but it's also getting a bit noisy.  The above value, simply put, is too low for the number of photons we're using.

    7. Let's go off on a tangent here a little as I noticed the value of the setting just below, the Max Search Radius.  This value basically tells Brazil how far out from the currently rendering 'pixel' it should search for photons in order to get to the Photons in estimate value.  Right now it's at 100.0 (one hundred) - much too large for the current scene.   Let's lower than to 1.0 (one).


    The result render is still the same, but because Brazil won't waste its time looking for photons far, far out where there are none, it now renders in about 2/3rds of the time.

    8. The result is still a bit too noisy, though, so let's bring the Photons in estimate value back up to 32 and try something else; enabling the Filtering option, and let's set the Filter coef. value to 1.0.  The filter basically gives a greater importance to photons that are near the 'pixel' being rendered, than to photons that are a bit further away; essentially acting as a sharpening filter in this case.


    Much better, now let's go for broke and make these caustics razorsharp by bumping up the number of photons.  Always try sharpening your caustics with the above steps before just throwing more photons at the problem, but in the end: the more photons, the more detail that is picked up in the caustic.  There's two places you can change the number of photons - either in the Photon Map panel of the Brazil renderer settings, or in the Photon Maps panel of the light.  Let's presume you don't have one light, but two - then it's much easier to just change this in the Brazil renderer settings, so let's do that here as well.

    9. Go to the Brazil renderer settings' Photon Map panel and on the left-hand side, change the Count mult value from 1.0 to 10.0

    If you render now, you shouldn't see any change.  Cookies for whoever realizes the reason immediately, for the others: join the club.

     
    The reason we don't see any change is because we are still re-using the existing Photon Map.

    10. Go to the Photon RAM cache group and change the dropdown value from Reuse to Free after frame so that the Photon Map will not linger around after rendering again.  Because the Photon Map is still in memory -now-, and we need it to be gone for our current render, also click the little crossed out X button right next to the dropdown.

    If you render now, you'll notice first of all that it takes a good bit longer for the render to start - this is because many more photons are being calculated. Second, you might notice that the rendering itself isn't any slower - this is because for rendering the caustics, the aforementioned Photons in estimate and Search Radius values are what matter the most.  Third, of course, the caustic is now indeed very, very sharp.


    However, you might also notice something else - there's strange 'bands' in the caustic, especially in the outer wide loop on the right, that don't seem to make sense from the rest of the caustics.  So, finally...

    Geometry
    As mentioned - the model and its geometry are very important in caustics.  Flat surfaces cause bland caustics, curved surfaces cause nice converging and (less noticeable) diverging caustics.

    But one of the 'cheats' used in rendering - and indeed in your viewport views of models - actually hides the cause for the banding you currently see in the caustic; "Smoothing" or "Surface normals".
    In order to make a sphere look like a sphere, rather than the disco ball of facets it really is, the renderer is instructed to very slightly change the apparent surface angle (normal) across such a facet, so that near the edge of the facet, that angle lines right up with its adjacent facet.  As a result, the surface appears perfectly smooth.

    But, of course, it isn't.. those facets are still facets and not perfectly curved panels; and the photons will thus actually strike these surfaces on those facets, and get calculated further from there.  The result of this is the banding you see in the caustic effect.

    The only way to truely 'fix' this would be to change those facets into actually curved panels - but we'll have to make do with the second best option available to us, and that is to increase the detail level of the mesh generated by the surfaces when rendering.

    We'll have to do this for the entire document as it seems the custom meshing settings per surface aren't picked up on, so..

    11. Go to the Mesh menu and select Render Mesh Properties.  In there you can select between different meshing options - let's just try the Smooth and slower option first.


    The result is now a bit better, but still not quite there yet.

    12. Go back to the Render Mesh Properties and change to the Custom option, as we'll have to tweak things ourselves.  Let's use the Maximum distance, edge to surface value, and set that to 0.0005.  ( Density, Maximum angle, Maximum aspect ratioMaximum Edge Length all at 0 (zero), and disable the Refine Mesh option if not already disabled.


    Much better - if you disabled anti-aliasing in step 0 (zero) as I did, all that's left to do is

    13. Go into the Brazil Render Settings, Antialiasing panel, and enable the Detailed Controls.  Then in the Sampling Parameters group set the Min value to 1 and the Max value to 2.


    Richard Annema
    Director of Client Relations
    SplutterFish
    www.splutterfish.com

    Caustic Graphics
    www.caustic.com
    twitter.com/causticgraphics
  • 02-05-2010 6:57 AM In reply to

    Re: tutorial for caustic effects

     WOW  GREAT TUTORIAL!!!

    THANK YOU VEEERY MUCH!!!

     the result!!!

    with dispersion


Page 1 of 1 (7 items)