danylyon Posted May 12, 2013 Share Posted May 12, 2013 Hi. Thanks for the links. I've triied brdflab some time ago and couldn't get it to work (or didn't try hard enough). I found it more convenient to have the BRDF directly inside Houdini, so I could compare to the BSDF's that were built into Houdini. BSDF's are often quite implementation dependent. (I've seen so many different cooks :-) fityk looks really interesting.. I've been doing a lot of "Curve" fitting manually recently. Will have to try it! Quote Link to comment Share on other sites More sharing options...
ndeboar Posted September 30, 2014 Share Posted September 30, 2014 Hey Peon, Thanks for this. How do I view the BSDF from a Mantra PBR shader to compare to the meassured merl data? Is there a way to plot F comeing out of the shader? Quote Link to comment Share on other sites More sharing options...
danylyon Posted October 1, 2014 Share Posted October 1, 2014 Hi Nick Yes, you can do that with "eval_bsdf": http://www.sidefx.com/docs/houdini13.0/vex/functions/eval_bsdf This also works in geometry (SOP) context. So prepare your bsdf, go through eval_bsdf to get a specific value. Quote Link to comment Share on other sites More sharing options...
ndeboar Posted October 2, 2014 Share Posted October 2, 2014 Ah, I love Houdini. Thanks. Quote Link to comment Share on other sites More sharing options...
ndeboar Posted October 10, 2014 Share Posted October 10, 2014 What does eval_bsdf return? It says a vector in the docs, what does that represent? Quote Link to comment Share on other sites More sharing options...
danylyon Posted October 11, 2014 Share Posted October 11, 2014 Create a VEX surface node. Copy paste this code: Feed in a (poly) sphere. #pragma range ex_nu 0 1000 #pragma range ex_nv 0 1000 #pragma choice BSDFfunc 0 "Phonglobe" #pragma choice BSDFfunc 1 "Ashikhmin" #pragma choice BSDFfunc 2 "Blinn" #pragma choice BSDFfunc 3 "Diffuse" #include "voplib.h" #include "voptype.h" sop prebuilt_BSDFs(float lightangle = 0, ex_nu = 100, ex_nv = 100, SpecScale = 1, BSDFfunc = 0;) { float lr = radians(lightangle); vector L = {0,0,0}; L.x = -sin(lr); L.y = cos(lr); L = normalize(L); // vector to light vector sP = {0,0,0}; // Point to be shaded vector Nn = {0,1,0}; // Surface Normal vector V = normalize(P); // vector to eye / view vector float NdotV = dot(V,Nn); vector R = 2 * NdotV * Nn - V; // reflection Vector bsdf SpecBSDF; vector X = {1,0,0}; vector Y = {0,0,1}; // tangents if (BSDFfunc == 0) SpecBSDF = phonglobe(Nn, R, ex_nu, ex_nv, X, Y); if (BSDFfunc == 1) SpecBSDF = ashikhmin(Nn, ex_nu, ex_nv, X, Y); if (BSDFfunc == 2) SpecBSDF = blinn(Nn, ex_nu); if (BSDFfunc == 3) SpecBSDF = diffuse(Nn,1, "label", ""); vector S = eval_bsdf(SpecBSDF, V, L); P = P * length(S) * SpecScale; } Quote Link to comment Share on other sites More sharing options...
ndeboar Posted October 31, 2014 Share Posted October 31, 2014 I never use tacky internet speak, but OMG, that's awesome. 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.