Author Topic: Input default value parameter  (Read 978 times)

On this doc page: https://docs.substance3d.com/sddoc/input-172825359.html
the following sentence:
"Lets you use another value than black as default input, if nothing is connected to this slot. Since SD 2020.2"
hints at a functionality present in 2020.2.
are the doc ahead of the release schedule ? because I don't think 2020.2 is a thing yet.

Hello Thibaud,

Thank you for letting us know about this!

An update to this page was published as part of our continued effort to keep the documentation up to date. Some edits are ahead of time to allow us to have relevant content on release day.

Best regards,
Luca
QA Analyst
Substance Designer Team

Thanks for the quick reply Luca.
I can't wait for the next release.. I could really use that feature now.

I'm building a substance that provides various switchable input slots.
the switch is made with a simple Switch greyscale.
Uniform white in 'false' and the input image in 'yes'.
Obviously this results in significant changes down the flow as soon as the inputs are switched on.

Would you be aware of any workaround with the current release to avoid this ?
thanks

Hello Thibaud,

I am not sure I understand the issue. What you describe appears to be the normal behaviour when data upstream of a node changes. Please kindly provide more details regarding the changes down the flow you mentioned, and what you wish to prevent.

Best regards,
Luca
QA Analyst
Substance Designer Team

I'd like to have inputs into a substance that output white instead of black when nothing is feeded into them.

The solution I used was to rely on a switch that the user has to turn on to display the input.
When the switch is turned off everything is fine because I'm outputting white.
As soon as the switch is turned on and before the user enters a map to feed the input it outputs blacks.
I'd like to avoid that.
is there perhaps a way to know if an input path is empty or something ?

Hello Thibaud,

There are some tricks you can use to output a color as a fallback when no input is connected, but they are not  reliable because of how the Substance Engine manages empty input nodes and the data they output.

For instance, you may use a Pixel Processor node to do a simple test of the lowest mipmap of the input node against 0 (black) to check if the entire image is black, and fallback on a color if this is the case.



Here is the Pixel Processor function, the is_black variable is defined as True by default in the Output Size function of the Pixel Processor node, so it is initialised before being used in the function.



This is the result:



Again, this is not 100% reliable because we are using mipmaps to perform the check, and also because the data output by an empty input node is not the same as a black image. For instance, while playing with the Random Seed we can get the artefacts shown below.



You may use this trick at your own risk!

Best regards,
Luca
Last Edit: September 30, 2020, 12:01:04 pm
QA Analyst
Substance Designer Team

Thanks a lot for the detailed answer.
I must say Artifacts related to the random seed feature do scare me off...
would they still occur if the random seed option is turned off in the publishing ?

My other option obviously is to wait for SD2020.2...
would you be able to provide any (even very approximative) release date estimate ?

Hello Thibaud,

To be clear: the artifacts I described are not a consequence of the Random Seed. They will show up regardless of the Random Seed because the approach I suggested is merely a crude workaround.

The Random Seed was just a way to easily demonstrate the limitations of this solution. The Transformation 2D node can be duplicated and chained to mipmap these artifacts out, but it will still be an unreliable workaroud.

No ETA for a new release for the time being, unfortunately. I appreciate your patience!

Best regards,
Luca
QA Analyst
Substance Designer Team