Jump to content

BSDF Bonanza: GGX, Microfacets, Disney BRDF and More


Wolfwood

Recommended Posts

 

It should work without a problem as long as the specific functionality you are using are not changing (which would mean you have to change the code and recompile anyway). As vex is compiled to bytecode and interpreted on runtime it is much more forgiving in that regard.

As for a new version of Houdini/Mantra you probably have separate repositories for your major versions anyway, so I don't see a problem there.

 

You can use the Mix VOP to blend bsdfs (I feel like this answer is too obvious and you might mean something else :huh:  )

 

Thanks, I thought as BSDF isn't color on output there would be a special node of sorts to do a weighted blend, good to hear it being so simple.

Link to comment
Share on other sites

I ended up compiling ggx_eval and ggx_sample into our otl.

If anyone's interested, you can do this in vcc:

 

vcc -L /path/houdini/shader.otl ggx_eval.vlf

vcc -L /path/houdini/shader.otl ggx_sample.vlf

 

And then you can read it back in:

$f = bsdf();

    $f = cvex_bsdf(
                   "opdef:/Shop/ggx_eval?",
                   "opdef:/Shop/ggx_sample?",
                   "label", $label,

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Hey guys,

 

i'm encountering some strange behaviour with the GGX BRDF node from the v1.1 stable release of the otl.

Basicaly when i'm turning on anisotropy, i get strange blocks for polygons.

Here are some screenshots

 

The error is happening in the direct reflection. Indirect reflection looks right

 

Edit:

K, it doesnt seem to be an issue with the GGX nodes, it also happens with a normal PBRSpecular node and anisotropy turned on...

Must be something with the scene setup.

 

Anistropy on (problem):

ggx_anisotropic_problem_1.jpg

Anisotropy off (clean):

ggx_anisotropic_problem_2.jpg

Here's how i wired it up:

ggx_anisotropic_problem_3.jpg

Is this some known problem or am i using it wrong?

Edited by timmwagener
Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

I'm having some trouble with the Disney BSDF in H14. It was all working fine in 13 but now as soon as I try and render anything that has a Metallic setting below 1 I get this error, Can anyone tell me what I'm doing wrong?

-

 

mantra: Unable to find CVEX shader 'oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample'
mantra:   bsdf_utils.h:247:6-14: Error 1015: Cannot override intrinsic function: void makebasis(vector; vector; vector)
 
mantra:   Failed to resolve VEX code oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample
mantra:   Could not find VEX code.
mantra:   Failed to resolve VEX code opdef:/Shop/oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample
mantra:   Could not find VEX code.
mantra:   Failed to resolve VEX code opdef:/Vop/oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample
mantra:   bsdf_utils.h:247:6-14: Error 1015: Cannot override intrinsic function: void makebasis(vector; vector; vector)
 
mantra:   Failed to resolve VEX code oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample
mantra:   Could not find VEX code.
mantra:   Failed to resolve VEX code opdef:/Shop/oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample
mantra:   Could not find VEX code.
mantra:   Failed to resolve VEX code opdef:/Vop/oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample
Link to comment
Share on other sites

  • 2 weeks later...

 

I'm having some trouble with the Disney BSDF in H14. It was all working fine in 13 but now as soon as I try and render anything that has a Metallic setting below 1 I get this error, Can anyone tell me what I'm doing wrong?

-

 

mantra: Unable to find CVEX shader 'oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample'
(...)

 

I get some errors too. And it worked great in 13.

Are there any chances for this awesome VOPs pack to be made compatible with Houdini 14?

Link to comment
Share on other sites

In case some people have missed it.
 

Thursday, August 7, 2014
Houdini 14.0.55: Added the GGX Microfacet model as a Specular Model in the Physically Based Specular VOP. Added Specular Roughness parameter which is used instead of Specular Angle when GGX is chosen.

Also exposed these options in the Surface Model VOP.

GGX is now the default Specular Model in the Mantra Surface shader in both reflection layers. Additionaly, the Coat layer now defaults to perfectly sharp specular reflections.

Link to comment
Share on other sites

Hello Edward.
Yes, I know. However the Disney BSDF shader offers an almost "out-of-the-box" compatibility with metalness PBR workflow of Substance Designer and the newest beta version of 3D-Coat, with little to no tweaking. With the new Mantra Surface shader and surface model in general, I'm still trying to figure out the correct settings to match the output I get in those programs.

Link to comment
Share on other sites

I found while migrating to H14 that the sidefx implementation name clashes with Wolfwood's otl, so they cant both be used at the same time.

To fix that I made a copy of the ggx cvex shaders, appending a W to the name (must also be done on the Node tab in type properties or the cvex_bsdf() wont find it), and changed the cvex_bsdf() path to reflect this.

 

The H14 implementation does not appear to use microfacet Fresnel shadowing as Wolfwood's does. i.e. as roughness goes up the result should darken a lot. That feature enables to shade specular the physical/easy/good looking way, with just roughness map, no need to mess around with reflectivity maps/slider/scaling factors.

 

Presumably it was implemented this way because the correct albedo still cant be computed, and so the mantra surface still has to post multiply the specular bsdf with unrealistic (perfect mirror) Fresnel.

I'm still using the fake ggx albedo hack as per a few pages back to multiply diffuse with, although obviously not `scientific`, it works better than using basic Fresnel complement to mult diffuse with. The Disney shading model uses basic Fresnel for this, which causes dark edges when spec rough is high.

 

IMO it's much more wrong to ignore microfacet Fresnel, for the sake of mathematically perfect energy conservation with unrealistic Fresnel. 

  • Like 2
Link to comment
Share on other sites

I did what Serg suggested, reimported the OTL a couple of times, rebuild my networks and... it worked. I still get some errors when rendering, if metallic is lower than 1:

mantra: Unable to find CVEX shader 'oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample'
mantra:   bsdf_utils.h:247:6-14: Error 1015: Cannot override intrinsic function: void makebasis(vector; vector; vector)

mantra:   Failed to resolve VEX code oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample
mantra:   Could not find VEX code.
mantra:   Failed to resolve VEX code opdef:/Shop/oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample
mantra:   Could not find VEX code.
mantra:   Failed to resolve VEX code opdef:/Vop/oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample
mantra:   bsdf_utils.h:247:6-14: Error 1015: Cannot override intrinsic function: void makebasis(vector; vector; vector)

mantra:   Failed to resolve VEX code oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample
mantra:   Could not find VEX code.
mantra:   Failed to resolve VEX code opdef:/Shop/oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample
mantra:   Could not find VEX code.
mantra:   Failed to resolve VEX code opdef:/Vop/oplib:/Shop/disney_diffuse_sample?Shop/disney_diffuse_sample

But surprisingly the results are identical to those from Houdini 13.

 

What is with this makebasis function, and why does this error only occur in Houdini 14?

Edited by ajz
Link to comment
Share on other sites

  • 1 month later...

Hi All

 

These shaders are fantastic, I have been using the disney plausible shader on all my work for a few months now with substance designer - truly a revelation

 

I am currently wrapping it up into an ubershader and have the same errors in my shell as Ajz

 

is there any chance someone could point me in the right direction with how to resolve this?

 

many thanks

 

:)

Link to comment
Share on other sites

  • 2 months later...

These shaders are great, thank you for sharing Jim!

I've ran into an issue with the disney shader.

Indirect diffuse is too bright when using an indirect light (with PBR).

I assume this might be related to the albedo issue that Serg mentioned?

Has anyone managed to make this work?

Or any ideas how to make it work?

thanks

Link to comment
Share on other sites

oh and for anyone who is trying to make this work in H14.

Looks like sidefx have added their own version of makebasis()

So just replace all instances of makebasis with a different name in the various _sample and _eval ops and it should work fine.

Hope that helps

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...