meerkat Posted March 30, 2006 Share Posted March 30, 2006 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 Quote Link to comment Share on other sites More sharing options...
rjpieke Posted March 30, 2006 Share Posted March 30, 2006 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! Quote Link to comment Share on other sites More sharing options...
AdamJ Posted March 30, 2006 Share Posted March 30, 2006 also check your shading rate.. it looks like it's set really low to somthing like 0.1... if not disregard Quote Link to comment Share on other sites More sharing options...
Jason Posted March 30, 2006 Share Posted March 30, 2006 Good point - how many occlusion samples are you asking for? It's not uncommon to have 1024 for some scenes (!). Try 256. edit: Ah, I see you're asking for 64. Yeah. crank it. Quote Link to comment Share on other sites More sharing options...
meerkat Posted March 30, 2006 Author Share Posted March 30, 2006 here is what the vop net looks like. I have tried rendering with more samples and is still the same. Quote Link to comment Share on other sites More sharing options...
rjpieke Posted March 30, 2006 Share Posted March 30, 2006 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? Quote Link to comment Share on other sites More sharing options...
meerkat Posted March 30, 2006 Author Share Posted March 30, 2006 here is the file: environment.hip Quote Link to comment Share on other sites More sharing options...
rjpieke Posted March 30, 2006 Share Posted March 30, 2006 here is the file: 26165[/snapback] Try modifying your occlusion() call to include "maxerror" 0.01 float occ = occlusion(P, Ns, samples, "maxdist", maxdist, "coneangle", coneangle, "maxerror", 0.01); Cheers! Quote Link to comment Share on other sites More sharing options...
meerkat Posted March 30, 2006 Author Share Posted March 30, 2006 thanks for the help. 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.