I am using Starter Kit HDA's in my project and materials with Houdini shader settings are in pink (error) in Unity Universal Render Pipeline version. How can I fix the materials? When converting the HDA material to URP material I am losing the colors defined in Houdini.
Unity Version 2019.4.18f1 LTS.
HDA materials and Universal Render Pipeline
2524 3 0- wrashidd
- Member
- 6 posts
- Joined: July 2019
- Offline
- xra
- Member
- 9 posts
- Joined: Feb. 2018
- Offline
Been wondering the same thing, technically Houdini Engine has these hard-coded within HUE_Defines.cs for example:
Note for SideFX:
It would be a usability improvement if instead these defines were in a ScriptableObject asset, with references to the shader assets (or material assets too), that way depending on the project's render pipeline the bare-bones default shader can be swapped easily without changing code. (That is one of the main uses of ScriptableObjects in Unity, users can just wire up references to assets within the project, the references will also hold when creating a unitypackage)
*edit* so the easiest thing is to just swap out the shader files (though the scriptable object is still a cleaner approach but requires refactoring some code), check the next post.
public const string DEFAULT_STANDARD_SHADER = "SpecularVertexColor";
Note for SideFX:
It would be a usability improvement if instead these defines were in a ScriptableObject asset, with references to the shader assets (or material assets too), that way depending on the project's render pipeline the bare-bones default shader can be swapped easily without changing code. (That is one of the main uses of ScriptableObjects in Unity, users can just wire up references to assets within the project, the references will also hold when creating a unitypackage)
*edit* so the easiest thing is to just swap out the shader files (though the scriptable object is still a cleaner approach but requires refactoring some code), check the next post.
Edited by xra - March 2, 2021 19:09:31
- xra
- Member
- 9 posts
- Joined: Feb. 2018
- Offline
here are 2 ShaderGraph assets for URP (and HDRP if using 10.x) that can replace the 2 default shaders provided with Houdini Engine for Unity.
These were created in 2019.4.17f1 and URP 7.3.1 but they will work for any version after that, Unity/Shader Graph will upgrade them.
In the latest version of SG (10.x) the PBR Master node has been replaced with a Master Stack output, which should auto upgrade, but if not refer to this documentation: https://docs.unity3d.com/Packages/com.unity.shadergraph@10.3/manual/Upgrade-Guide-10-0-x.html
Just delete HoudiniSpecularVertexColor and HoudiniAlphaSpecularVertexColor from Assets\Plugins\HoudiniEngineUnity\Shaders\ then put the 2 shadergraphs in the folder.
The shadergraph files are named differently because the filename is the shader name, and inside the shadergraph window, on the Properties sub window, there is a path string field which is already set to 'Houdini' (so the name ends up being 'Houdini/SpecularVertexColor' which is what the C# code is looking for when it loads the shaders.
These same shaders also work for HDRP when using ShaderGraph 10.x because the Master Stack output is unified and works with any SRP.
These were created in 2019.4.17f1 and URP 7.3.1 but they will work for any version after that, Unity/Shader Graph will upgrade them.
In the latest version of SG (10.x) the PBR Master node has been replaced with a Master Stack output, which should auto upgrade, but if not refer to this documentation: https://docs.unity3d.com/Packages/com.unity.shadergraph@10.3/manual/Upgrade-Guide-10-0-x.html
Just delete HoudiniSpecularVertexColor and HoudiniAlphaSpecularVertexColor from Assets\Plugins\HoudiniEngineUnity\Shaders\ then put the 2 shadergraphs in the folder.
The shadergraph files are named differently because the filename is the shader name, and inside the shadergraph window, on the Properties sub window, there is a path string field which is already set to 'Houdini' (so the name ends up being 'Houdini/SpecularVertexColor' which is what the C# code is looking for when it loads the shaders.
These same shaders also work for HDRP when using ShaderGraph 10.x because the Master Stack output is unified and works with any SRP.
Edited by xra - March 2, 2021 18:56:20
- wrashidd
- Member
- 6 posts
- Joined: July 2019
- Offline
-
- Quick Links