# Material Assignment Breaks When Trying to Render Materials Within Published HDA

**URL:** <https://forums.chaos.com/t/material-assignment-breaks-when-trying-to-render-materials-within-published-hda/120734>\
**Category:** Issues\
**Created:** [November 25, 2024, 5:21pm UTC](https://forums.chaos.com/t/material-assignment-breaks-when-trying-to-render-materials-within-published-hda/120734 "2024-11-25T17:21:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![john\_morch](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@john\_morch](https://forums.chaos.com/u/john_morch)\
**Post date:** [November 25, 2024, 5:21pm UTC](https://forums.chaos.com/t/material-assignment-breaks-when-trying-to-render-materials-within-published-hda/120734/1 "2024-11-25T17:21:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bdancer](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bdancer/32/52257_2.png) [@bdancer](https://forums.chaos.com/u/bdancer)\
**Post date:** [November 26, 2024, 6:27am UTC](https://forums.chaos.com/t/material-assignment-breaks-when-trying-to-render-materials-within-published-hda/120734/2 "2024-11-26T06:27:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gosho.Genchev](https://avatars.discourse-cdn.com/v4/letter/g/e495f1/32.png) [@Gosho.Genchev](https://forums.chaos.com/u/Gosho.Genchev)\
**Post date:** [November 26, 2024, 11:58am UTC](https://forums.chaos.com/t/material-assignment-breaks-when-trying-to-render-materials-within-published-hda/120734/3 "2024-11-26T11:58:12Z")

</div>

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:

 ![houdinifx_2024-11-26_13-56-02.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/5/4/5466f5f5744d58a8146bfc1d36a2fe68711ed5a5.jpeg)

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](https://forums.chaos.com/uploads/short-url/lY7ydiAbfZCFIzywUwIBVfJAzSH.zip) (63.5 KB)

---

<div class="post-metadata">

**Author:** ![john\_morch](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@john\_morch](https://forums.chaos.com/u/john_morch)\
**Post date:** [November 26, 2024, 3:13pm UTC](https://forums.chaos.com/t/material-assignment-breaks-when-trying-to-render-materials-within-published-hda/120734/4 "2024-11-26T15:13:03Z")

</div>

@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](https://forums.chaos.com/uploads/short-url/zJ053CE5bcrjomZKAaSDOPOLcpd.zip) (62 KB)

 ![matassign.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/7/7/77fb97ce8ba7fad547184df0d3a49972ebb65cbd.jpeg)  
 ![cragrender.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/e/4/e419a32f95fd41ca2c294bec9dab21e36a7dbff3.jpeg)

---

<div class="post-metadata">

**Author:** ![john\_morch](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@john\_morch](https://forums.chaos.com/u/john_morch)\
**Post date:** [November 26, 2024, 3:22pm UTC](https://forums.chaos.com/t/material-assignment-breaks-when-trying-to-render-materials-within-published-hda/120734/5 "2024-11-26T15:22:01Z")

</div>

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

​

 ![image.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/0/7/074317ea82cb0ca8a48899f3eb56a20bb7fa7d69.jpeg)​

---

<div class="post-metadata">

**Author:** ![Gosho.Genchev](https://avatars.discourse-cdn.com/v4/letter/g/e495f1/32.png) [@Gosho.Genchev](https://forums.chaos.com/u/Gosho.Genchev)\
**Post date:** [November 27, 2024, 9:09am UTC](https://forums.chaos.com/t/material-assignment-breaks-when-trying-to-render-materials-within-published-hda/120734/6 "2024-11-27T09:09:16Z")

</div>

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](https://nightlies.chaos.com/#/vray6houdini/stable/6.2)

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](https://support.chaos.com/hc/en-us/requests/new)

Best regards!

---

<div class="post-metadata">

**Author:** ![john\_morch](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@john\_morch](https://forums.chaos.com/u/john_morch)\
**Post date:** [November 27, 2024, 8:01pm UTC](https://forums.chaos.com/t/material-assignment-breaks-when-trying-to-render-materials-within-published-hda/120734/7 "2024-11-27T20:01:16Z")

</div>

@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](https://forums.chaos.com/uploads/short-url/bEkeK7PwLew8HuUTi7GgV9PFjF8.zip) (62 KB)

---

<div class="post-metadata">

**Author:** ![Gosho.Genchev](https://avatars.discourse-cdn.com/v4/letter/g/e495f1/32.png) [@Gosho.Genchev](https://forums.chaos.com/u/Gosho.Genchev)\
**Post date:** [November 28, 2024, 10:46am UTC](https://forums.chaos.com/t/material-assignment-breaks-when-trying-to-render-materials-within-published-hda/120734/8 "2024-11-28T10:46:42Z")

</div>

Hey @john_morch ,

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

 ![houdinifx_2024-11-28_12-39-14.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/f/1/f1a0df57b62d97021b5d8630f9d7af67e1a3569b.jpeg)

Here’s 19.5 with the same setup:

 ![houdinifx_2024-11-28_12-42-00.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/3/b/3b3faaf3561d17a78731a3f1bf21c5f73666d6ee.jpeg)

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.

 ![explorer_2024-11-28_12-46-11.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/e/a/ea8ce698c3cde782e749794b199f7bf25b294de9.jpeg)

Best regards!

---

<div class="post-metadata">

**Author:** ![john\_morch](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@john\_morch](https://forums.chaos.com/u/john_morch)\
**Post date:** [December 4, 2024, 3:56pm UTC](https://forums.chaos.com/t/material-assignment-breaks-when-trying-to-render-materials-within-published-hda/120734/9 "2024-12-04T15:56:05Z")

</div>

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!
