Jump to content

Lighting a uniform volume with caustic lights

Recommended Posts

I'm attempting to build an efficient catch-all system for rendering murky liquids, in general, and inside of transparent glass.  I've come up with a way to split geometry and fluids down into light-interface shells, so refraction works correctly and accurately between all air, liquid, and glass boundaries.  I've got it working well with caustic photon maps cast separately from an environment light and an additional complementary sun-light, and it all works perfectly without modification when I give the liquid refraction-attenuation(absorbtion) to tint it.

Alas, absorbtion alone doesn't quite cut it - it's fine for pure-looking translucent fluids, but I need uniform volumes with multiple scatter bounces to give a true murky look.

I've achieved the look I want doing that (and it looks delicious!) - but only if I enable "All paths" pbr rendering, so that it works out caustic illumination directly.  That would be fine, but it directly conflicts with the cast-caustics I want for the rest of the render - the "All paths" approach works great for the murky volume, but simply can't manage the caustics cast onto nearby objects - I get a far better result for that using the photon map approach.

I'm trying to work out one of two ways to unify the setup, without getting into the troublesome(to my OCD :-)) realm of splitting it into separate passes and compositing them together.

...firstly - is there any way I can get caustic photons to illuminate a uniform volume?  I've tried, but it always just seems to come out fully black-shadowed that way.  It seems like photons just flat-out miss volumetrics.  Would it even work if they did hit?

...or secondly - is there any way I can tailor the setup so that "All paths" is enabled exclusively for shading the uniform-volume object, and disabled for everything else?  I've absolutely no experience assigning component labels/categories, so I've no idea if it's able to achieve that kind of thing.



(Edit: Incidentally, I also tried using a "Faux caustics" approach, which if it worked would of course also conflict with the caustic photon map element, but I couldn't seem to get it to illuminate the uniform volume regardless, so I ditched that idea)

Edited by danw
  • Like 1
Link to comment
Share on other sites

Ah, I think the answer might have been there in the question all along... I can leave it set to "All Paths", leave "Volume Limit" at a sensible value, but turn "Diffuse Limit" down to zero - the volume will still receive refracted light and bounce that light within itself, but Mantra won't attempt any caustics on regular diffuse surfaces, leaving that for the caustic photon map.


Hopefully I don't end up needing Diffuse pbr bounces for anything... I suppose I might be able to achieve that with another photon map if required...

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...