Author Topic: Dynamic Baking and Runtime Overhead  (Read 1163 times)

Is it possible to have a Substance be dynamic and changeable in 1 map (ie a character customization screen) but then be baked to plain textures so the next map doesn't need to have the Substance runtime overhead? Based on other forum posts describing the baking options it seems like this can't be done. (https://forum.allegorithmic.com/index.php/topic,9996.msg47948/highlight,sync+and+cache.html#msg47948)

I've done some test builds and discovered that the Substance runtime adds about 1GB of memory overhead for dynamic Substances and 100MB of memory overhead for baked Substances. Is it possible to eliminate that overhead? If we bake the material shouldn't the result be just as expensive as old-fashioned textures?

Thanks in advanced!

Hi @DevinFC,
Currently, this is not possible. The baking takes place when the game content is cooked through the editor. We are currently looking into ways to optimize the plugin both with performance and memory usage.

Being able to drop the Substance functionality when no longer used would be a great feature and something we will look into adding support for.

As for the memory usage you are seeing, just to get a better understanding, how many Substances were used in this test scene? Are you using the GPU or CPU Substance Engine?

"If you bake the material, shouldn't the result be just as expensive as old-fashioned textures?" You are very correct but the default Texture2D objects stream texture data. This is something we are also working to bring support for.

I am sorry that we do not have a solution today but we will in the near future. I can post an update here when this is the case.  :D

Cheers!
Software Engineer, Integrations
daniel.stover@allegorithmic.com

Ah ok that makes sense now thanks!

As for the memory usage you are seeing, just to get a better understanding, how many Substances were used in this test scene? Are you using the GPU or CPU Substance Engine?

There is only 1 Substance in this test scene and I'm using the CPU engine. The graph itself is quite complex though and has 13 texture inputs and 6 output textures. Graph complexity shouldn't affect memory too much but the texture inputs/outputs would right? I could run another test with a simple Substance if that info would be helpful.