Surface Thickness node?

   6784   3   1
User Avatar
Member
15 posts
Joined: July 2005
Offline
Hi,

I would like to know if there is any “Surface Thickness” node available to create own fake SSS effects. If not, can you give me some hints how to write this sort of operator? I think it should not be very difficult.
User Avatar
Member
252 posts
Joined: July 2005
Offline
I am not sure what you mean by “Surface thickness node”.

If you want your shader to be passed some information that you set up as meaning thickness of the surface for your shader to do Subsurface scattering calculations, then make it a surface attribute.

You can create color attributes on your surface (using the Point SOP or the Paint SOP, etc.) and then copy them to a “SurfThickness” Attribute created with an Attribute SOP.

Then make sure your surface shader uses the “SurfThickness” attribute at render time.

Does this help?

-Craig
User Avatar
Member
15 posts
Joined: July 2005
Offline
Hi,

thanks for your answer. It did not help me, but I found help in the 3dbuzz forum. Here is a screenshot of the effect I was searching for: http://sv1.3dbuzz.com/vbforum/onlc_attachment.php?s=&postid=277530 [sv1.3dbuzz.com]
User Avatar
Member
136 posts
Joined: July 2005
Offline
I am not sure but try this:

surface
thickness( vector surfcol = 1;
float maxthickness = 10;
float bias = 0.01;
)
{
vector opac = 0;
float thickness = 0;
if (dot(I,N)<0){
thickness = rayhittest(P,normalize(I)*maxthickness,bias,
“scope”, getobjectname());
if (thickness < 0) thickness = maxthickness;
opac = smooth(0,maxthickness,thickness);
}
Of = opac;
Cf = surfcol * Of;
}
  • Quick Links