Digital asset shading

   207   1   1
User Avatar
6 posts
Joined: Sept. 2017
I've imported a simple geometry as a digital asset in Unity. In Unity I change the material to a Unity one, not the Houdini/SpecularVertexColor that is the default. If I change a parameter of the geometry (in this case the radius of a cylinder) the material changes back to the Houdini default again. Can this be avoided?
User Avatar
70 posts
Joined: May 2017
The reason the material assignment is lost is because the plugin is regenerating the output but isn't aware of how to handle overrides.

One way to “keep” the material is to have its file path be set as a string-based primitive attribute in the HDA. Give the attribute the name of “unity_material”. The path should be relative to the Assets/ folder. (e.g. unity_material attribute with value “Assets/Materials/testmat.mat”).

Another way would be to specify a “unity_script” detail attribute which calls an existing script in your Unity project to re-assign the material. This allows to do more general post-cook setup as well.
  • Quick Links