hi, is there a way to pack substance files into the HDA and then have them extract into the Unity project and can be assigned properly when the asset loads?
because that would be cool.
.
.
.
also, if anybody knows how to do that in Unreal, but i will ask over there, too, when i need it.
substance files packed into an HDA
3201 2 1- twelveplusplus
- Member
- 194 posts
- Joined: 8月 2011
- Offline
- seelan
- Member
- 571 posts
- Joined: 5月 2017
- Offline
Apologies for the delay.
There isn't a way to pack substance files into an HDA to be extracted into Unity. Rather what you can do instead is to set attributes on your primitives with the substance path. Then place the substance files in your Unity project at that path. This way when you bring in the HDA, it will pick up the substance files using that path.
First create a primitive attribute called ‘unity_material’ and set it as String type, and with value of the path to your substance .sbsar file in Unity relative to your Resources folder or Assets folder.
Then create another primitive attribute called ‘unity_sub_material_name’ with String type, and with value of the name of your actual substance material.
OR
You can specify the substance material index by creating a primitive attribute called ‘unity_sub_material_index’ with Integer type, and value of the index of your material.
I attached an OTL which was one of our examples. It has a drop down to choose different types of materials, including the last option which has the substance materials (via name and index). I also attached the substance file as well for you to place in Unity. Check it out to see how it was done.
There isn't a way to pack substance files into an HDA to be extracted into Unity. Rather what you can do instead is to set attributes on your primitives with the substance path. Then place the substance files in your Unity project at that path. This way when you bring in the HDA, it will pick up the substance files using that path.
First create a primitive attribute called ‘unity_material’ and set it as String type, and with value of the path to your substance .sbsar file in Unity relative to your Resources folder or Assets folder.
Then create another primitive attribute called ‘unity_sub_material_name’ with String type, and with value of the name of your actual substance material.
OR
You can specify the substance material index by creating a primitive attribute called ‘unity_sub_material_index’ with Integer type, and value of the index of your material.
I attached an OTL which was one of our examples. It has a drop down to choose different types of materials, including the last option which has the substance materials (via name and index). I also attached the substance file as well for you to place in Unity. Check it out to see how it was done.
- twelveplusplus
- Member
- 194 posts
- Joined: 8月 2011
- Offline
-
- Quick Links