Author Topic: [SOLVED] Random Seed Glitch?  (Read 225 times)

Hello,

Please check out this situation where I'm trying to expose a random seed as a floating point value. I'm multiplying the floating value by 250, then converting to int for the seed. But for some reason, once the floating point rises above 0.28, all random results are identical. Does anyone know why?

Note that I am using the new value processors to show the problem and display the results, but this has nothing to do with the issue, as this same issue has been causing me distress since before the update. It appears that any random seed over (around) 77 generates identical results. But only when a variable is used to process the math. If I switch the math to rely on constants only, it works fine.

Please let me know if this is a bug or just something I am doing wrong.
Thanks!
Last Edit: May 14, 2019, 01:39:37 pm

Doing multiplication operation is not advised in the Random Seed function. You should stick to additions.
Product Manager - Allegorithmic

Ok, but do we know why? If I remove the multiply and add 60.0 instead, it still ends up having the same issue, so I don't think it has anything to do with multiplication..?

Does anyone know the reason this is happening?

Random seed doesn't seem to have any numerical limits in int form, so I don't think it's because the value is reaching a threshold. And any type of math I try works fine using constants, so it appears it might be related to the runtime conversion from float to int?

Hello CodeRunner,

After investigating further and consulting with our developers, we have additional details to provide. It appears the issue is also connected to the stage of converting (or casting) a float value to an integer.

While casting a Float to an Integer floors the value and allows it to be connected as an Integer to other operators and functions, it is still being processed as a Float, which are not meant to be used in the processing of Random Seeds.

For similar reasons, as Nicolas Wirrmann said, multiplications should be avoided in Random Seeds functions.

Therefore, please only use Integers from the outset in Random Seeds functions.

Best regards,
Luca Giarrizzo
QA Analyst
Substance Designer Team

Thank you very much for the information. Its a bummer we can't use fractional values to drive random seeds. Perhaps it is something that can be corrected in the future?

I wish Designer had some type of high level warning system for stuff like this. Your users will spend a lot of time creating graphs a certain way, then find out later that something is broken or errant, for no logical reason. Then they have to spend even more time tracking down what they think is their own bug, only to realize that its not a bug at all - just a situation that wasn't handled correctly by the system. I'm stubborn, and I love these programs, so you won't lose me as a customer. But its probably enough frustration to drive some people away.


Hello CodeRunner,

Thank you for your feedback. Yours is a valid concern and the topic will be discussed internally.

You can follow up on fixes and features implemented in the future releases of Substance Designer by taking a look at the release notes, available here.

I will go ahead and mark your request as 'solved'.

Best regards,
Luca Giarrizzo
QA Analyst
Substance Designer Team