Jump to content

Cloudy/Murky Liquid


Recommended Posts

I am relatively new at Houdini and I am trying to create a shader for liquid, specifically for Gatorade. I am simply using a basicLiquid material, tweaking the given parameters as values and using PBR, but I am hoping to give it more of a cloudy/murky depth (as if the water has color dye in it) look not necessarily subsurface scattering.

More like the shading in this test:

post-9028-0-27583700-1364980445_thumb.jp

Link to comment
Share on other sites

Hi,

One way to do this would be to duplicate the surface and apply a uniform volume to the inner surface. In Houdini 12.5 the shelf tools set it up like this by default. The linear volume renders pretty fast with PBR and should give you the cloudy look you're looking for.

Attached a super quick example made using the shelf tools. Check out the particle_fluidinterior node.

lczd.hipnc

Link to comment
Share on other sites

As Julian mentioned, you can prototype this effect with the default Wavetank shelf tool. It sets up the shading network to do all the right steps.

The murkiness is generated by a constant tile volume at render time and this is created as Julian mentioned by the fluidtank_fluidinterior object which is assigned to the uniformvolume shader to render this as a volume.

The fluidtank_fluidinterior object contains a single polysoup primitive and no volumes. So what gives?

The answer is that Mantra can construct constant tile volumes for you at render time and this is exactly what the uniformvolume shader is doing: constructing a constant tile volume for the fluid interior contained by the manifold object in the fluidtank_fluidinterior. All you need to do is add the render property vm_volumedensity and match this value to the density that you set for your volume in the surface part of your shader. This is exactly what the uniformvolume shader is doing internally in the VOP network.

Tweak the values of the uniform volume shader to control how the light penetrates inside the water.

----

I always change a few of the defaults on the shaders dropped down by the shelf tool.

On the basicliquid shader:

- set the Diffuse Intensity to a way smaller value. Try 0.05

- set the Reflection Angle to 0 for sharp reflections and then increase slightly if you want a bit of a rougher look, say 0.1 if you like.

- reduce the Specular Intensity (reflection strength) to say 0.95

- Disable the Separate Object Reflections parameter for now. Have object reflections match light reflections

For the murkiness, the first parameter to tweak is the refraction colour on the basicliquid shader.

- adjust the Refraction Color to your starting color entering in to the volume in the uniformvolume shader. Gatorade? Assume green I guess...

Then go to the uniformvolume shader and this is where you control how the light travels under the water. Play with these parameters until you get the look you like.

I can't believe the difference scattering phase has on the look btw. Cool. It's like the murkifier with negative back scattering values.

post-371-0-43613500-1365001545_thumb.jpg

Backscatter set to -0.1

post-371-0-60636800-1365001555_thumb.jpg

Backscatter set to -0.347

And the file with the shader tweaks:

murky_green_water_from_flipfluidtank.hip

Hope this is in the direction you want to go.

Link to comment
Share on other sites

Is there a way to do add noise to the volume without resorting to sops? Getting an internal volume to be accurate is doable, but it'd be nice to find a way to do it in shops so it lines up with my render mesh better (esp if using displacements or subds). I understand that'd slow it down, that's fine, just curious how one could add noise to the volume shader.

Edit -- figured it out, you can add noise to the incoming density parameter.

Re-Edit -- Adding noise to the incoming density seems to affect it on just the surface hit. It doesn't seem to fully fill the volume itself with the turbulent values, rather just getting the first density value it finds and using it all the way back. I'd like to find a way to do a volume inside an object without having to mask the volume in comp where the density feathers outside of the original object it if at all possible...

http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&p=95592&sid=4d6ec66772245b54a1160de6ae2c8625 found this thread, and that totally makes sense. I guess I'll just hack it. Would still be nice if you could do some kind of an arbitrary detail grid at render time based off the same concept, but non-uniform.

Edited by Solitude
Link to comment
Share on other sites

  • 6 months later...

I've been looking at the uniform volume approach to do opacity attentuation with pbr using the method described above but I'm running into a render issue when I try to render both the "interior" volume and the "exterior" surface at the same time (for the sake of convenience).

Here's the "exterior" only:

post-237-0-08141000-1381763628_thumb.jpg

The "interior" only:

post-237-0-41896200-1381763658_thumb.jpg

And when rendered together:

post-237-0-51026500-1381763691_thumb.jpg

Not the result that I was looking for obviously (too dark, red is all but gone, bucket artifacts). I know that you'd typically want to stay away from coincident geometry but I was hoping that it wouldn't be an issue here because the "interior" is being rendered as a volume. Here's the file:

uniform_volume_test.1.hipnc

Thoughts? What's the preffered method to get attentuated opacity with pbr?

Link to comment
Share on other sites

While turning Faux Caustics on will reveal the volume it'll invalidate the shadow cast by the liquid given that I'm generating caustics with photons.

Right. So instead then, firstly tweak your caustic light to remove the red-square-artifacts. Then on your Mantra ROP, go to PBR -> Allowable Paths and set it to "All paths". Nothing yet, but then go to Shading and set your Volume Limit to something greater than 0. Now the red is visible and you got your caustics.

For the record, I don't know this already, just learning through experimenting.

Edited by Skybar
  • 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.

Guest
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...