eliz Posted July 11, 2011 Share Posted July 11, 2011 Hi, I'm trying to render a liquid and have the refraction tint set to the color that is a point attribute of the geometry for the liquid surface. I am using the basic liquid shader, and I have tried setting the channels of the refraction tint to Cd.x, Cd.y, and Cd.z. This just renders the surface as black. When I apply the basic_surface to my geometry, the color appears when I have "use point color" checked, but I cannot figure out how to pipe this color into the basic_liquid shader. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
anim Posted July 11, 2011 Share Posted July 11, 2011 Refraction Tint in basic_liquid shader is label for vector parameter called: transmitColor you can see it if you hold your mouse over that label so just create vector attribute called "transmitColor" in SOPs, it will override that parameter in shader if that attribute is Detail then it will be overridden for whole object if the attribute is primitive then it will be overridden per primitive and so on to create that attribute based on Cd attribute use Attribute Create SOP to create transmitColor vector attribute (point if your Cd is point) then in Value parameters write $CR $CG $CB or just use Attribute SOP to rename Cd to transmitColor similarly you can create attributes for other parameters of the shader, just look at the real name of the parameter and create attribute of that type and name NOTE: if vector does not work use float3, but i think it should Quote Link to comment Share on other sites More sharing options...
eliz Posted July 11, 2011 Author Share Posted July 11, 2011 Thank you very much! I tried both methods and they both worked well (both the Attribute Create SOP and the Attribute SOP). In case it helps someone else, I went with the Attribute Create SOP, which kept the Cd attribute, so I could continue to see the color in the viewport. 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.