bhaveshpandey Posted July 27, 2011 Share Posted July 27, 2011 (edited) Hi, I'm doing a project which involves an ocean and CG character. I wanted to know if there's any documentation on creating a surface shader for ocean? I tried using the Liquid shader which is shipped with houdini but its too clean and cpu/time intensive. So I'm trying to roll out a decent ocean surface shader. The shader I have made gives it more of a plastic look rather than ocean. Is there any way of faking refractions,sss in the ocean shader? This is what I have so far: I need to atleast match it to this: IMG http://img828.imageshack.us/img828/247/elementaryshot010052.jpg][/img] Edit: I wanted to know if there's any documentation for creating an ocean surface shader?? or any shader guru could point me to the right direction? Any suggestions/critics is welcome. Thanks. Edited July 27, 2011 by bhaveshpandey Quote Link to comment Share on other sites More sharing options...
vbk!!! Posted July 28, 2011 Share Posted July 28, 2011 Hi, I think I will follow this thread ... I am working on a open ocean shader myself. I tried some stuff to obtain surface thickness but I am stuck because of the IOR Here is the pic of the test and the hipnc file attached. Nice little wave by the way. How did you achieve that ? ++ Vincent thickness_test_01.hipnc Quote Link to comment Share on other sites More sharing options...
bhaveshpandey Posted July 28, 2011 Author Share Posted July 28, 2011 I tried using trace vop for refractions but had two major issues: 1) too slow to render. 15+ minutes for Half HD renders. 2) too clean to be used for ocean. of course these issues could be more because of my lack of knowledge about shader writing/optimising etc. The waves are done using HOT and another 3d app. If anyone could just make any suggestions, that would be great. Quote Link to comment Share on other sites More sharing options...
loudsubs Posted July 29, 2011 Share Posted July 29, 2011 Maybe you've already seen it, but in the HOT documentation, it briefly talks about using fresnel reflections in the shader and environment lighting. Quote Link to comment Share on other sites More sharing options...
bhaveshpandey Posted July 29, 2011 Author Share Posted July 29, 2011 Hi arrev, I'm using fresnel and env maps for reflections already. I guess issue is more refraction and sss related. Its just being a bitch Quote Link to comment Share on other sites More sharing options...
Serg Posted July 31, 2011 Share Posted July 31, 2011 Hi arrev, I'm using fresnel and env maps for reflections already. I guess issue is more refraction and sss related. Its just being a bitch Excluding the ocean from it's own reflections/refractions is an easy way to speed up renders. You don't normally notice the water reflecting/refracting >itself< unless its choppy and you are at a grazing angle to see it. You can probably get away with having only the spray particles and whatever else is in the water in the reflet/refract object scope. iirc, the trace vops don't set the sampling quality to 1 if raylevel > 0. So the number of samples grow exponentially with every bounce (though not generally that bad with a flat surface that tends to not reflect itself). You can use a raylevel vop, and a switch to set samples to 1. Even the indirect lighting nodes don't do this... Quote Link to comment Share on other sites More sharing options...
bhaveshpandey Posted July 31, 2011 Author Share Posted July 31, 2011 (edited) Hi Serg! thanks for the answer. Could you be a bit more elaborate with the raylevel vop? This is my first attempt at shading something so deailed. Should I modify the Basic liquid shader and plug the raylevel somewhere with trace vops used for refraction and reflection? I'm pretty lost here. Thanks. EDIT: Just reading the help card again..Did you mean that I should set the vm_reflectlimit /vm_refractlimit at the propeties vop (within the basic liquid material) to 1 if the ralbouncelevel >0?? Edited July 31, 2011 by bhaveshpandey Quote Link to comment Share on other sites More sharing options...
Serg Posted August 1, 2011 Share Posted August 1, 2011 (edited) Basically you connect a ray bounce level to a switch. On the following inputs you plug the samples parameter and a constant set to one. So, at ray bounce level = 0 it will use input 0 (the samples parameter), and if ray level is 1 (or greater because the switch uses the last value) it will use one sample. I would try to use the indirect lighting nodes instead of trace. Remember you can only have one Direct Lighting node per shader og Using the wave height to subtly lighten the colour can be effective at faking sss, for the cost. cheers S EDIT: meant to say Direct Lighting instead of Indirect Lighting. When multiple Direct Lighting nodes are present in the same shader mantra will render garbage or crash. Edited August 2, 2011 by Serg Quote Link to comment Share on other sites More sharing options...
Serg Posted August 1, 2011 Share Posted August 1, 2011 (edited) The ray level stuff will probably not have a large impact on your scene... unless multiple bounces are actually visible. Edited August 1, 2011 by Serg Quote Link to comment Share on other sites More sharing options...
bhaveshpandey Posted August 2, 2011 Author Share Posted August 2, 2011 Thanks a lot serg! I'll test it and get back to the thread. btw loved your work on volumes! cheers. Quote Link to comment Share on other sites More sharing options...
vbk!!! Posted September 22, 2011 Share Posted September 22, 2011 Hi Tamte on the sidefx forum gave some clue to get surface thickness to a shader. There is my result here : the refaction applied to the thickness matchs pretty good with the refraction from the surface model node. Unfortunately, I can't find a way to get blurry refraction with this combo ... ++ Vincent 1 Quote Link to comment Share on other sites More sharing options...
Adam Ferestad Posted September 22, 2011 Share Posted September 22, 2011 Hey, you are going to post a how to on this right? I would love to use this to master some concepts that I have been struggling with in houdini. This is amazing. Quote Link to comment Share on other sites More sharing options...
Adam Ferestad Posted September 22, 2011 Share Posted September 22, 2011 Hey, you are going to post a how to on this right? I would love to use this to master some concepts that I have been struggling with in houdini. This is amazing. Quote Link to comment Share on other sites More sharing options...
Pazuzu Posted September 23, 2011 Share Posted September 23, 2011 (edited) Hi!! To get blurred refractions with your setup you can replace the ray hit with a gather vop, the main problem is that is a bit slow. Here are your scene modified. thickness_test_01.hipnc Edited September 23, 2011 by Pazuzu Quote Link to comment Share on other sites More sharing options...
vbk!!! Posted September 24, 2011 Share Posted September 24, 2011 (edited) i didn't know that " gather vop" thanks. I 'll prepare an explaination of my process. edit : you can see picture of shader network here : http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=23300 Edited October 3, 2011 by vbk!!! Quote Link to comment Share on other sites More sharing options...
dennisvolkerts Posted May 23, 2013 Share Posted May 23, 2013 Hi Tamte on the sidefx forum gave some clue to get surface thickness to a shader. There is my result here : the refaction applied to the thickness matchs pretty good with the refraction from the surface model node. Unfortunately, I can't find a way to get blurry refraction with this combo ... ++ Vincent can you post some examplefile about the shading? 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.