Author Topic: Substance in Unreal Plug-In for UE4 4.25.3  (Read 1121 times)

Unable to open project builds due to recent plug-in update for Unreal Engine. Only able to open builds when plug-in is disabled or uninstalled, but by doing so I no longer have access to the substance graphs or instances in my material library.

Unable to open project builds due to recent plug-in update for Unreal Engine. Only able to open builds when plug-in is disabled or uninstalled, but by doing so I no longer have access to the substance graphs or instances in my material library.

@SFrench ,

What version of UE4+Substance plugin? How does this crash occur? Did you update your project recently? I have seen this crash before, I think it is because of corrupted data after an update (i.e. if it crashed midway through the Substance texture update process).

Currently using 4.25.3 and 4.24.3 but for the sake of the comment I am primarily in the former. I am also using the same version for the plug-in as well. The crash seems to occur during loading portion of my project. So for instance if the plug-in is already installed and I go to open my project build it will load, get to 99%, then crash giving me the error in the attachment I provided. The other way it will crash is if I reinstall the plug-in before opening a build, the build will open, prompt me to manage my plug-ins, I'll activate the plug-in, restart the build, and then it crashes right before launching. I am still able to use the shader that had bitmaps previously created for it but my builds no longer recognize the substance graphs or instances. The only updates I did as of last Friday were the systems update for UE4 which crashed the launcher (that has been fixed) and when I was trying to reinstall the plug-in that was a download that occurred that I believe I updated but I have not updated my version of UE4 that has stayed consistent.

Currently using 4.25.3 and 4.24.3 but for the sake of the comment I am primarily in the former. I am also using the same version for the plug-in as well. The crash seems to occur during loading portion of my project. So for instance if the plug-in is already installed and I go to open my project build it will load, get to 99%, then crash giving me the error in the attachment I provided. The other way it will crash is if I reinstall the plug-in before opening a build, the build will open, prompt me to manage my plug-ins, I'll activate the plug-in, restart the build, and then it crashes right before launching. I am still able to use the shader that had bitmaps previously created for it but my builds no longer recognize the substance graphs or instances. The only updates I did as of last Friday were the systems update for UE4 which crashed the launcher (that has been fixed) and when I was trying to reinstall the plug-in that was a download that occurred that I believe I updated but I have not updated my version of UE4 that has stayed consistent.

At some point did you upgrade a UE4 project from 4.23 - 4.24/4.25? From 4.24+ we started using the UE4 standard of UTexture2Ds being generated by our Substance graphs. Previously, they generated USubstanceTexture2Ds. The plugin in 4.24+ will attempt to 'update' these textures when it detects them in a project that is being updated. If at some point in the update process it crashed (sometimes due to running out of memory), this could have caused some texture data to become corrupted which could also lead to crashes. I can't be sure without a project to reproduce the issue with.

A 'fix' would be to delete the Substance textures out of the project entirely and then right click on the Substance Graph Factories and generate new graphs (and textures) with the 4.24/4.25 plugin enabled to allow for the plugin to generate these textures correctly.

Most of the projects that I've been in as of late started in 4.24 or 4.25 my department began in 4.20 but immediately moved to 4.24 so we've never updated to 4.23. There's only been 1-2 projects that may have started in 4.24 and then was converted to 4.25 but that occurred months before the issue occurred. I will try to give your idea of deleting the substance textures out so that the graphs can generate new maps, its just going to be an extremely tedious task since our material library is quite big.

Most of the projects that I've been in as of late started in 4.24 or 4.25 my department began in 4.20 but immediately moved to 4.24 so we've never updated to 4.23. There's only been 1-2 projects that may have started in 4.24 and then was converted to 4.25 but that occurred months before the issue occurred. I will try to give your idea of deleting the substance textures out so that the graphs can generate new maps, its just going to be an extremely tedious task since our material library is quite big.

@SFrench ,

Moving from any UE4 version before 4.23 to a newer version (4.24/4.25) would have the same issue since every version prior to 4.24 used USubstanceTexture2Ds. So any Substance sbsars imported prior to 4.24 would have generated those versions of the textures and would need to be upgraded to the new standard of UTexture2Ds. Unfortunately, depending on the size of the Substance textures/graphs it may cause you to run out of VRAM and then a crash occurs mid-conversion which can cause corrupted data which can then lead to crashes. I have seen this error before from a project that crash mid-Substance texture update. It leaves some textures correctly converted to UTexture2Ds and some are still USubstanceTexture2Ds and then some are just corrupted data. It sounds like there is old data or even corrupted data that is causing the serial mismatch.

Are you able to open the project with the plugin disabled and see the Substance textures? If there are some that are blank and are 0 bytes then those are corrupted. If some are still labeled as USubstanceTexture2Ds then that is still old data.

If you wanted to try and re-update from a previous UE4 version (prior to 4.24), you can also try what I mentioned in another post as an alternative:

Alternatively, if you are using a C++ project, you can try changing the amount of Substance sbsars the plugin converts at a time. There is a line in: Substance\Source\SubstanceCore\Public\SubstanceCoreHelpers.h that is "#define MAX_SUBSTANCES_TO_UPDATE 100

If you change the 100 to a 1 it will reduce the memory usage on updating as it will only be limited to converting one Substance sbsar at a time. The caveat is that it will take longer to convert everything.

I did have a couple of textures that were still in the USubstanceTexture2D format so they may have been the textures that were either too big and corrupted during the update. I will take some time when I get back from Holiday break to dig deeper into this and remove them from the material library and see if the plug-in works. Then those deleted bitmaps I'll have the substance graph recreate them again in the new file format.