Displaements with ambient occlusion

   6743   6   1
User Avatar
Member
27 posts
Joined: July 2005
Offline
hello,

i am having a problem when rendering my displacement shader with an ambient occlussion surface shader i get big black areas in my mush. iAlso i am rendering with renderman. Any help would be much apreciated.

Thanks
Bazazi
User Avatar
Member
31 posts
Joined: July 2005
Offline
have you set your displacement bounds in the render tab?
User Avatar
Member
27 posts
Joined: July 2005
Offline
yes.
User Avatar
Member
31 posts
Joined: July 2005
Offline
Can you post the .sl you're using?
and/or a link to a rendered image?
User Avatar
Member
27 posts
Joined: July 2005
Offline
surface occlusion(float samples = 64)
{
normal Nn = normalize(N);

float hits = 0;
gather (“illuminance”, P, Nn, PI/2, samples, “distribution”, “cosine”) {
hits += 1;
}
float occ = hits / samples;

Ci = (1 - occ) * Cs * Os;
Oi = Os;
}

This is the shader. I can get it to work by editing the .RIB manually by including the lines:
Attribute “trace” “bias” 0.03
Attribute “trace” “displacements” 1
But i dont know where to find those options in houdini.
User Avatar
Member
31 posts
Joined: July 2005
Offline
try adding the line to the camera's pre-include field. You
can find it under the camera's render tab.
User Avatar
Member
27 posts
Joined: July 2005
Offline
Thanks. That worked like a baby!
  • Quick Links