Using substance archive texture make the export fail
In method: private ImageId ExportImage(Texture texture, TextureMapType texturMapType)
texture = texture as Texture2D, returns null when using sbsar file.
Could you share an example sbsar file?
Sorry, I use file found at https://share.allegorithmic.com (material section). I'm not sure I can publish it here but you can download one by creating a free account.
I'll try to fix it and provide a pull request when I'll find some time to do it if you want but it will not be this week I guess.
@ultrasuperpingu any update on a PR to fix this issue?
Ok, I just took a look at this. The problem is more general. sbsar material are ProceduralTexture in Unity. The case of sbsar material is probably not a big problem since its support was removed in Unity 2018 but the problem still remains for other ProceduralTexture. I guess the quick fix would be to ignore them and log an error. That means in method :
private MaterialId ExportMaterial(Material materialObj)`
for each texture (emissive, normal, basecolor, etc), if texture is a ProceduralTexture, don't export it and log an error.
A more general fix would be to extract a regular texture from the procedural to export it but it's a bit complicated and I'm not sure it make sense in most cases.
Do you want me to implement the ignore and log behaviour and to submit a PR with it?
I made PR #336 for this. Hope this helps :)
Deprecated