Material Assignment Breaks When Trying to Render Materials Within Published HDA

Rocky Linux

V-Ray for Houdini hash:82c1b12 from 19 Feb 2024 13:10
V-Ray Core 6.20.05 [31923cf8] from 17 Feb 2024

Houdini 19.5.605​

V-Ray materials in a HDA do not work properly when assigned to material node.

Steps to reproduce:

  1. Create a subnet in /mat
  2. Add three V-Ray material builder nodes
  3. Modify the V-Ray BRDFVRayMtl node in each material builder node and set the Color field to a unique color (ex. red, green, blue)
  4. Name the V-Ray material builder nodes accordingly
  5. From the subnet, create an HDA (default options are fine)
  6. Create a geo node in /obj and create a testcrag node
  7. Create a material node and set its input to testcrag
  8. In the Group field of the material node use the dropdown to select a primitive name
  9. In the Material field of the material node, browse to the created HDA and select a material builder node
  10. Repeat steps 8-9 for the remaining two material builder nodes in the HDA
  11. Create a camera and a V-Ray dome light
  12. Create a V-Ray render node
  13. Use the VFB to render crag

Expected:

The V-Ray materials in the hda are assigned to test crags selected groups. A unique color for each assigned geometry.

Result:

A single material is assigned to each group. If “/vrayOutput” is added to the Material path of the material node, things render as we would expect.

Is it possible to share the hip file to make sure we are fixing the exact setup you have?

Hey @john_morch ,

Could you please send over your scene with the HDA so we can investigate? I followed your setup and the result seems to match the expectations:

I’ve embedded the HDA in my file, attached below.

It would also help to give us the exact V-Ray build that you’re using - you can find it under the Houdini Top Menu → V-Ray → About V-Ray → Copy to Clipboard.

Best regards!
forum_hda.zip (63.5 KB)

@bdancer @Gosho.Genchev Thanks for taking a look.

V-Ray for Houdini hash:82c1b12 from 19 Feb 2024 13:10
V-Ray Core 6.20.05 [31923cf8] from 17 Feb 2024​

Houdini 19.5.605​

Rocky Linux

Attached is my setup.
I’ll take a look at your file. Thank you!
chaos.zip (62 KB)


@Gosho.Genchev I checked your scene and unfortunately, I’m still getting only one shader assigned to all the geo.

​

​

Hey @john_morch ,

Unless you’re locked to this particular V-Ray for Houdini build version, may I suggest grabbing a recent stable builds from the nightlies section? I double-checked to make sure this works as expected there.
You can find the stable builds here: Chaos

If you don’t have access, the support team will be able to quickly provide you with it: https://support.chaos.com/hc/en-us/requests/new

Best regards!

@Gosho.Genchev I tried 6.20.23 and I’m still getting the same issue.

V-Ray for Houdini number:22761 hash:954828e from 22 Sep 2024 01:17
V-Ray Core 6.20.23 from 12 Sep 2024​

I’ve attached my test file for 6.20.23.
Are there any V-Ray environment variables, V-Ray render settings or VFB settings that could cause this to happen?
chaos.zip (62 KB)

Hey @john_morch ,

Here’s 20.5 with the stable build you’re using, and your scene:

Here’s 19.5 with the same setup:

I see in your scene that the Renderer ROP is set to “Export” so I assume you’re generating VRScenes and sending them to a render farm - what is the V-Ray version deployed on the render farm? Ideally, it should be the same stable build that you’re working with on your workstation.

Best regards!

We do export out scenes on the farm and then have a separate vray standalone render job. But the tests I was running were all local. I changed the “Export Mode” to “No Export” and that didn’t make a difference either- again running locally. Must be some other setting or environment somewhere causing this issue on our end. Either way, we’ve updated our tooling to just add “/vrayOutput” to the material path. Thanks for the help!