Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - andy.dys

Pages: [1]
I have just ported my old 2017 project to use the plugin version (2.5.4) in 2020.3 LTS.
Everything works as expected on PC, however I recently tried it out on iOS and discovered that every time I instantiate a substance and set its unique parameters it is cached. This is fine in the sense that I do occasionally need to re-use/modify the substance during the session. However what is not fine is that every time I load a new scene with a new set of parameters the old substances remain cached. Even when I reload the same scene a second time it creates completely new instances rather than using the ones from initial creation. Of course this eventually leads the system to run out of memory and crashes the App.
In lieu of there being any comprehensive instructions or documentation for the Unity Substance API, could someone let me know the best way to clear the substance cache every time I load a new scene? I did read in another thread that you can use asset bundles but this would appear to be a very ad-hoc approach. Surely there is a better way?
I hope you can help,
Thanks, Andy

Substance Integrations - Unity - Unity 2.5.2 plugin issues
 on: August 12, 2020, 07:59:22 am 
Hi there,

I'm having several issues with 2.5.2.
Unfortunately I can't tell you at what point these issues occurred only that they are in 2.5.2 while running Unity 2020.1.1 f1

The first problem is that none of my output textures get assigned to the material / shader input slots. I have 2 outputs from my substance, diffuse and normal. I can assign the correct output textures to the correct shader input slots in the editor, but the moment I click away from the material it resets to no texture assignments. This used to work when I first tried the plugin implementation in Unity 2018 a few months back.

Next issue, all procedural material instances no longer allow me to see the material properties at runtime. It just says 'No Shader Selected".

Finally 2.5.2's release notes mention the inclusion of the "IsProcessing" function. I cannot find said function anywhere in the  documentation or the visual studio autocomplete fields. So I'm not actually sure if it's really there, or if it is, where it has been moved to. Presumably it should still be a bool that return true until the substance has finished running changes?

Any help most welcome.

Hi there,

As the title suggests I'm getting a nasty crash exclusively on iOS since upgrading to 5.6.0p3 that's not producing any error messages in xcode.

I can only assume that it's an issue with substance integration since it crashes at the point where I'm either about to or during rebuilding of my procedural materials. I'll probably need to put together a repro project.

But in the meantime any advice on getting an error message in xcode or any news of others suffering similar issues would be greatly appreciated.

Many Thanks,


I'm having some frustration with isProcessing always returning true.
I think the issue occurred after the Unity 5.3.3p3 updates.

Is anyone else experiencing similar issues?
I read a similar thread from October last year but apparently this bug was resolved?
Has there been a relapse or is my project special :).

Really appreciate any help. Currently using some dodgy code to patch the leak.

Got a couple of issues, questions regarding substances in Unity 4.2, hopefully someone here can help.

The first one relates to the way substance texture outputs get assigned to the material texture slots when using a custom shader. I know this has been answered to some extent before, but I still get some unsatisfactory behaviour in 4.2. The project I'm working on is very substance intensive and I do a lot of real time modifications to substances, so my ideal scenario is to use the substance materials directly rather than having a separate custom material that inherits it’s textures from the substance. As I understand it, when you import a substance into Unity for the first time, it only generates the first textures labelled diffuse and normal (Presumably based on the order they were created?). Incidentally is there any reason why only these 2 textures are created and non-of the others are? Wouldn’t it be easier to have a system where you flag which textures should be generated and exposed on the substance designer end, rather than having a default ‘diffuse and normal output’ or a ‘check box that forces the generation of everything’, there appears to be no middle ground? Moving on, if you set the ‘generate all‘ checkbox and assign the output textures to their relevant shader slots within the substance everything now works in 4.2 i.e. the textures remain in their slots after you click off the substance. However if you run your game and try making real time changes to the substance upon exiting and returning to the editor the substance you tweaked decides to reset back to its default state losing all your custom texture assignments:(. Which really is quite frustrating, as you effectively have to re-assign your textures every time you want to run the game, is this a bug?
So with this in mind is there any way of getting a substance to automatically assign the generated textures to any other slots than diffuse and normal? There is very little/no documentation on this behaviour. So any light that can be shed would be extremely helpful. For example is it possible to automatically assign a texture to a specular slot? How does a substance interpret the shader and know where to put the output textures?

My other question relates to the way source textures within the substance are handled. Say for instance you have a 2048 source texture in your substance and you set its inheritance to ‘relative to parent’ rather than ‘Absolute’ (I’ve found that according to the performance info in substance designer, substances generate more quickly at lower resolutions with ‘relative to parent’, presumably because it’s not having to downsize a 2048 every time you make an adjustment such as with ‘absolute’?). However the main problem I’ve found with setting textures to ‘relative to parent’ is when the parent output size is set to 0x0, substance designer exports your sbsar file with all the source textures at 256x256. Which in turn in Unity defaults at 512x512 but all the source textures have been downsized to 256x256 and the detail has been permanently lost (BTW this is really confusing as to why the defaults sizes are different between various applications, any reason why this is the case?).
To work around this issue and to try and claim the apparent performance benefit of using ‘relative to parent’ I have exported my substance at 3x3 instead of 0x0. However when this is imported into Unity the default 512x512 become 4096x4096. I appreciate these are really arbitrary numbers and changing the interface size makes no real difference to the final output. It just seems annoying that I can’t export a file from substance designer and have it interpreted by Unity such that they are equal 1 to 1.
I guess the most important question here is, is the performance info in substance designer accurate in the case of having 2048 source textures and using ‘relative to parent’ to ensure that they automatically scale appropriately with the rest of the graph? Or should I just stick with 'absolute' for source textures?

Sorry for the long questions, appreciate this might take a while to answer. Happy to try and clarify any of the above should it not make sense :).

Thanks and love your work.

Pages: [1]