Author Topic: Unity freezes when at formatting Substance textures while building for Android  (Read 4498 times)

Hey @keston ,

I have removed most of the custom shaders in the "always included shaders" list in the graphic settings, and that made the shadowcaster problem go away. I was able to build the game and test it.

After that, I tried putting the Substance plugin and Substance files back into my project, but then when I tried to build, unity froze again when formatting the Substance textures. We're back to my original problem again...

If you still need any project, please tell me what you need and I'll try to make it.

@Robbin12392 ,

Can you try uploading the Substance files you are using somewhere so I can try using them in my project? Are these Substance files made by you or from Substance Source? If possible, the .sbs files as well as the .sbsar files would be useful as well.

Hey @keston ,

The substance files came with the Unity asset pack I downloaded. I actually have no clue if it's from Substance Source. There are no .sbs files, only .sbsar and .sbsprs files.

I got an error when I tried to upload the files with this forum (don't know why), so I had to use something else. You can download the .zip here: https://mega.nz/file/SDxBlSDL#pAMe61WHMvdpgBZBoLBS-UAeWh6LKsCAeeVaatE0ey4

Hey @keston ,

Do you have any news?

Hey @keston ,

Do you have any news?

Hey @Robbin12392 ,

I deployed a project to Android using the Substance files you provided with no issues. It may be the project itself. I think the only way I can maybe reproduce it at this point is by getting the project.

Hey @keston ,

No problem, here is the full project:
https://mega.nz/file/3XB2nS6T#upJA8hBj1ZPlPPg_L-bLnGbWps-inyF9fZNX2hWCrlg
By the way, do you think that trying to build it on a different operating system could do anything, or is that not how Unity works?

Hey @keston ,

No problem, here is the full project:
https://mega.nz/file/3XB2nS6T#upJA8hBj1ZPlPPg_L-bLnGbWps-inyF9fZNX2hWCrlg
By the way, do you think that trying to build it on a different operating system could do anything, or is that not how Unity works?

@Robbin12392 ,

For the Substance side of things at least (I can't speak to Unity because I don't know for sure) the Substance texture formats are converted to the correct format when building for the platform...in this case Android.

I downloaded your project and ran it and just got loads of errors related to a Tesselation shader. But every time I always make it past the ShadowCaster / Substance texture format problems and it never froze or anything.

Just out of complete curiousity to get it to build, I deleted the Tesselation shader it was complaining about and it finally succeeded and deployed, but always crashes on start on Android after deploying it on Windows and Mac.

I'm not an expert on Unity and know next to nothing about Vulkan. Maybe it's the Mac or Android tablet having issues? I'm honestly not sure.

Hey @keston ,

Just to be clear, did you open and build the project on MacOS or Windows? I can try on both.
I also can try to build on another version of Unity.

I have no errors of the tesselation shader in the console, but I removed it anyway. Upon building the game again, nothing changed, it still froze at the Substance texture formatting.

I think the crashing happens because the game is made for VR, and you probably didn't run it on the specific headset. The Unity project has the XR plugins for Oculus installed, so I guess running it on a normal phone or tablet makes it crash.

Also, could the freezing be related to hardware? My iMac is from 2011, so maybe that creates any problem?

Hey @keston ,

Just to be clear, did you open and build the project on MacOS or Windows? I can try on both.
I also can try to build on another version of Unity.

I have no errors of the tesselation shader in the console, but I removed it anyway. Upon building the game again, nothing changed, it still froze at the Substance texture formatting.

I think the crashing happens because the game is made for VR, and you probably didn't run it on the specific headset. The Unity project has the XR plugins for Oculus installed, so I guess running it on a normal phone or tablet makes it crash.

Also, could the freezing be related to hardware? My iMac is from 2011, so maybe that creates any problem?

@Robbin12392 ,

I built on both Mac and Windows to Android (same result). I figured that was the case, I unfortunately don't have the hardware to build for VR. The freezing could be related to hardware. What are the specs of your iMac?

Hey @keston ,

Here are the specs of my iMac:
- OS: 10.13.6 (High Sierra)
- Type: 21.5-inch, mid 2011
- Processor: 2,5 GHz Intel Core i5
- Memory: 4 GB 1333 MHz DDR3
- Video card: AMD Radeon HD 6750M 512 MB

I can't upgrade anything because I can't open the computer itself. The only thing I can upgrade is memory, but that will cost me around €50 so I would first try all the different options there are.
If my hardware is the problem, do you think there is a way to fix it any other way with software? Is it possible to convert the substance textures to normal textures so I don't have to use the plugin at all (I don't know how to do that, though)?

Let me know!

Hey @keston ,

Here are the specs of my iMac:
- OS: 10.13.6 (High Sierra)
- Type: 21.5-inch, mid 2011
- Processor: 2,5 GHz Intel Core i5
- Memory: 4 GB 1333 MHz DDR3
- Video card: AMD Radeon HD 6750M 512 MB

I can't upgrade anything because I can't open the computer itself. The only thing I can upgrade is memory, but that will cost me around €50 so I would first try all the different options there are.
If my hardware is the problem, do you think there is a way to fix it any other way with software? Is it possible to convert the substance textures to normal textures so I don't have to use the plugin at all (I don't know how to do that, though)?

Let me know!

@Robbin12392 ,

It may be hardware related, I'm not sure as I don't have the hardware you have to reproduce it. If you didn't want to use the plugin, or test without the plugin, you can export all of the textures as they are in the plugin by going to each Substance graph in Unity and clicking 'Bake Textures to Folder'. This will bake them out so that you don't have to use the plugin (they will function as normal textures). You will then have to place these textures in Unity materials manually.

If you wanted to then delete the plugin from the project cleanly, you would have to close the project and delete the Allegorithmic folder and any associated files (.sbsar files as well as they will no longer be able to be used in Unity without the plugin).

Hey @keston ,

It worked, thank you!
My game built and launched as if should, so I'm happy. I still don't know what the problem was with Substance, but I guess it doesn't matter anymore.

Thanks for helping with my problem!

(I don't know how to mark this thread as solved, could you help me with that?)

Hey @keston ,

It worked, thank you!
My game built and launched as if should, so I'm happy. I still don't know what the problem was with Substance, but I guess it doesn't matter anymore.

Thanks for helping with my problem!

(I don't know how to mark this thread as solved, could you help me with that?)

@Robbin12392 ,

Good to hear! Not sure why the plugin was giving you problems either to be honest, I suspect it was a combination of the plugin+hardware but I'll need to investigate further into that.

If you have any other questions feel free to ask! :)