venator11387 Posted April 3, 2013 Share Posted April 3, 2013 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: Quote Link to comment Share on other sites More sharing options...
jujoje Posted April 3, 2013 Share Posted April 3, 2013 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 Quote Link to comment Share on other sites More sharing options...
old school Posted April 3, 2013 Share Posted April 3, 2013 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. Backscatter set to -0.1 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. Quote Link to comment Share on other sites More sharing options...
venator11387 Posted April 3, 2013 Author Share Posted April 3, 2013 (edited) Thank you both! I have not yet upgraded to H12.5, but as soon as I can I will update my progress. Update: Worked great! Thank you very much! Edited April 5, 2013 by venator11387 Quote Link to comment Share on other sites More sharing options...
Solitude Posted April 4, 2013 Share Posted April 4, 2013 (edited) 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 April 7, 2013 by Solitude Quote Link to comment Share on other sites More sharing options...
stu Posted October 14, 2013 Share Posted October 14, 2013 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: The "interior" only: And when rendered together: 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? Quote Link to comment Share on other sites More sharing options...
Skybar Posted October 14, 2013 Share Posted October 14, 2013 If you turn on Faux Caustics on your glass, the red volume will be visible inside the glass sphere. The red-square-artifacts is related to your caustic light. 1 Quote Link to comment Share on other sites More sharing options...
stu Posted October 17, 2013 Share Posted October 17, 2013 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. Quote Link to comment Share on other sites More sharing options...
DanBode Posted October 17, 2013 Share Posted October 17, 2013 maybe try removing the shadow call from your volume shader and just using a fastshadow vop instead with an object scope set to everything but the liquid. Quote Link to comment Share on other sites More sharing options...
Skybar Posted October 18, 2013 Share Posted October 18, 2013 (edited) 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 October 18, 2013 by Skybar 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.