MENOZ Posted June 20, 2008 Share Posted June 20, 2008 hello. i'm trying to create a translucency effect in VOP. i tried the translucency shader that comes with houdini, but it doesn't work. the maple leaf shader works i looked in the network and the way the translucency effect is built seems to be the same. i don't understand why one works and the other doesn't. anyway, i'm not shure about using the frontFace vop, instead of the isFrontFace, because this should give me a varying translucency effect, is this correct? if i use isFrontFace to control the bias of the mixLambertColor it works. but how can i blur the shadow of the objects behind?. thank you! Quote Link to comment Share on other sites More sharing options...
MENOZ Posted June 24, 2008 Author Share Posted June 24, 2008 hello. i'm trying to create a translucency effect in VOP. i tried the translucency shader that comes with houdini, but it doesn't work. the maple leaf shader works i looked in the network and the way the translucency effect is built seems to be the same. i don't understand why one works and the other doesn't. anyway, i'm not shure about using the frontFace vop, instead of the isFrontFace, because this should give me a varying translucency effect, is this correct? if i use isFrontFace to control the bias of the mixLambertColor it works. but how can i blur the shadow of the objects behind?. thank you! is there a node that can blur or filter a color? in VOP. Quote Link to comment Share on other sites More sharing options...
symek Posted June 24, 2008 Share Posted June 24, 2008 (edited) is there a node that can blur or filter a color? in VOP. Definitely a job for point cloud... unless you don't want to multi-sample shadows. EDIT: sorry, just reread previous post... doesn't blurry depth maps work for you? Edited June 24, 2008 by SYmek Quote Link to comment Share on other sites More sharing options...
MENOZ Posted June 25, 2008 Author Share Posted June 25, 2008 Definitely a job for point cloud... unless you don't want to multi-sample shadows.EDIT: sorry, just reread previous post... doesn't blurry depth maps work for you? yes, if i use blurred shadow it works, but i have blurred shadow on the other side too. could you make me an example with point clouds please? thanks! Quote Link to comment Share on other sites More sharing options...
symek Posted June 30, 2008 Share Posted June 30, 2008 (edited) yes, if i use blurred shadow it works, but i have blurred shadow on the other side too.could you make me an example with point clouds please? thanks! Hi MENOZ, sorry for late answer. I hadn't time to play with it. This is just a quick example of what I meant. By no means this is accurate or correct. Some corrections in vectors are needed but I really had a moment... This is translucency opacity test via standard shadow() call This is translucency with surface color: These are both: Point cloud was generated in SOPs, because I'm lazy (BTW it need to carry point normals). Perhaps pcwrite() with pre-pass computation would be better way. There are also some artifacts and no eta for refraction. Corrections highly recommended! cheers, sy. #include <math.h> surface milk_glass(vector trans = 0.5; vector diff = 0.7; string pcmap = ""; float maxdist = 1; int maxpoints = 50;) { vector pcP = 0; vector pcN = 0; vector tlight = 0; vector nN; vector cf, of; float af; vector pp = ptransform("space:object", P); vector Nf = frontface(normalize(N), normalize(I)); int handle = pcopen(pcmap, "P", pp, maxdist, maxpoints); while(pcunshaded(handle, "tlight")) { pcimport(handle, "P", pcP); pcimport(handle, "N", pcN); pcN = ntransform("space:object", "space:camera", pcN); nN = -frontface(normalize(pcN),I); pcP = ptransform("space:object", "space:camera", pcP); illuminance(pcP, nN, M_PI/2) { vector nL = normalize(L+(P-pcP)); shadow(Cl); tlight += Cl * dot(nL, nN); } refractlight(cf, of, af, pcP, I, 0.005, max(trans)); int success = pcexport(handle, "tlight", cf+clamp(tlight, {0,0,0},{1,1,1})); } tlight = pcfilter(handle, "tlight"); Cf = tlight*trans + diffuse(Nf)*diff; Of = 1; } Edited June 30, 2008 by SYmek 1 Quote Link to comment Share on other sites More sharing options...
TheUsualAlex Posted July 9, 2008 Share Posted July 9, 2008 cool simon. I'll have to play with this. Quote Link to comment Share on other sites More sharing options...
Jason Posted July 10, 2008 Share Posted July 10, 2008 cool simon. I'll have to play with this. Very nice! :-D 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.