How is the vex function cvex_bsdf implemented?

   Views 120   Replies 0   Subscribers 0
User Avatar
Member
4 posts
Joined: Oct. 2015
Offline
Hello! I'm trying to write a custom bsdf for shading, which I believe is possible as described in these two docs pages:

https://www.sidefx.com/docs/houdini/vex/pbr.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/vex/functions/cvex_bsdf.html [www.sidefx.com]



The example section on the cvex_bsdf docs page describes three separate vex functions;
a creation function
an evaluation shader
and a sample shader

I don't currently see how or where in houdini that those would be implemented. I'm sure there's some core information I'm missing.

For this post, all I'm trying to do is get the example cvex_bsdf diffuse rendering on a object in Mantra.

---
Here's what I've tried:

I've tried to set it up in a materialBuilder in the /mat context. I've placed all those scripts into snippets together and separately, but the snippet claims that the return type (cvex) is not valid. That combined with the way the cvex_bsdf function calls for "diffuse_eval" as a string leads me to believe there's something else to it.

I've tried setting it up through a cvex builder. This looks promising, but the documentation on it is too sparse.
Your text to link here... [www.sidefx.com]

The cvexBuilder makes a cvex output, but I've not seen any examples on how to use it. I'm not sure if any snippet is creating usable information, or checking what is created by the output.

I have been able to use snippets for the built-in bsdfs, such as diffuse. I've included an image of that simple setup.

I'm not seeing what other nodes may help.

---

This has all been part of a whole research endeavor that lead me to write a whole raytracer from scratch in cops. I found out a lot from that process, but I'm hoping to upgrade to using houdini's renderers which should be a whole lot more efficient. Would appreciate all your help, or if you could lead me in the right direction.
Edited by KaleWeaver - March 25, 2025 02:25:21

Attachments:
SimpleDiffuse.png (58.6 KB)

  • Quick Links