Jump to content

Occlusion And Displacement Problem


Recommended Posts

hi,

i am trying to render an occlusion pass with displacements using this occlusion shader:

surface occsurf3(float samples = 64, maxdist = 1e30, coneangle = PI/2)
{
      normal Ns = faceforward(normalize(N),I);
      float occ = occlusion(P, Ns, samples, "maxdist", maxdist, "coneangle", coneangle);

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

it seems to work ok without displacement but when i render with displacement it doesnt look good, where am i going wrong?

thanks in advance

amir

post-1033-1143725563_thumb.jpg

post-1033-1143725861_thumb.jpg

Link to comment
Share on other sites

i am trying to render an occlusion pass with displacements using this occlusion shader:

it seems to work ok without displacement but when i render with displacement it doesnt look good, where am i going wrong?

26148[/snapback]

Some initial thoughts:

Does it look any better if you crank up the number of samples? If it's a polygonal mesh, are you using N and Ng in your call to computenormal(), or only P?

Can you post the displacement shader you're using?

Cheers!

Link to comment
Share on other sites

here is what the vop net looks like. I have tried rendering with more samples and is still the same.

26162[/snapback]

Hmm ... not sure what to immediately suggest. Does a diffuse/specular render look "ok"? Can you post your scene for us to play with?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...