Maya Materials

   3641   5   0
User Avatar
Member
7 posts
Joined: May 2018
Offline
Hey Houdini Humans,

Starting here: https://www.sidefx.com/docs/maya/_maya__material.html [www.sidefx.com] I have spent way too many hours pulling my hair over some thing that seems so straightforward. I also went through several threads in this forum already.
I figured out how to make Houdini engine do the following in Maya:

  • Create a new material with user-picked texture - shop_materialpath
  • Assign any in-maya-existing material to HDA geo - maya_shading_group

These things work ok when running isolated once. But I fail with the following:
  • After creating a new material, assigning another existing Material does not work
  • After creating a new material, Maya/Houdini creates that again with every cook. It takes a long time and is not necessary. I could not figure out how to tell Maya to only do that once.

A switch works but for learning reasons I don't want that. Also, a user would expect a button, not a toggle or dropdown. I tried a button with python callback that force cooks the material branch. I even tried a callback that flips the switch, runs the material, then flips the switch back. However Maya only "syncs" afterwards.
I guess I am doing a few things wrong. Here is my example file. How do you guys create/assign Materials with textures within Maya? I also recorded a video to explain things better.

Video on youtube: https://youtu.be/YTtwBLNhyEU [youtu.be]
Image Not Found


Maya 2018.6
Houdini 18.5.408
Houdini Engine 3.5 (API: 1)

Attachments:
TA_cmarzy.maya.material_example.1.0.hda (45.1 KB)

User Avatar
Member
1 posts
Joined: Jan. 2021
Offline
Hi, Great job. i have a question,Have you tried RS shader to Houdini engine for maya? I have tried but it seems not to be working correctly,Do you have any good idea? Looking forward to your reply ,Thank you.
User Avatar
Staff
464 posts
Joined: Aug. 2019
Offline
Hi Christian, thank you for the detailed explanation - this does indeed look like a bug. I will take a look and see what I can do about it. Out of curiosity, does "Reload Asset" work properly?
User Avatar
Member
7 posts
Joined: May 2018
Offline
johnmather
Out of curiosity, does "Reload Asset" work properly?

Hi John,
Thanks for looking into it. The Reload Asset Button does not help. Even with the toggle turned off, Maya still generates the same material over and over each sync/attribute change.

connectAttr -f houdini_shader.outColor houdini_shaderSG.surfaceShader;
// Result: Connected houdini_shader.outColor to houdini_shaderSG.surfaceShader. //
connectAttr -f houdini_shader.outColor houdini_shaderSG.surfaceShader;
// Result: Connected houdini_shader.outColor to houdini_shaderSG.surfaceShader. //
connectAttr -f houdini_shader.outColor houdini_shaderSG.surfaceShader;
// Result: Connected houdini_shader.outColor to houdini_shaderSG.surfaceShader. //
... and so on

Let me know how it goes or if there is anything you need from me
User Avatar
Member
7 posts
Joined: May 2018
Offline
Howdy guys,

Did anyone find out if that's really a bug? Is there any workaround for it? How do you usually deal with Materials? I can't be the first guy trying to create and assign Materials in Maya, right?

  • After creating a new material, assigning another existing Material does not work
  • After creating a new material, Maya/Houdini creates that again with every cook. It takes a long time and is not necessary. I could not figure out how to tell Maya to only do that once.
User Avatar
Staff
464 posts
Joined: Aug. 2019
Offline
Hi Christian, sorry about this - it fell through the cracks. In the future, please also send an email to support so that it gets entered into our bug database, where it is much less likely to be forgotten.

I have still been unable to find out why this is happening, as when I use a debugger, it seems to run a different path each time, so clearly something has gone wrong. I'll continue looking.
  • Quick Links