Skip to main content
Inspiring
April 28, 2022
Question

How do you get the global seed inside a pixel processor?

  • April 28, 2022
  • 2 replies
  • 1425 views

Is there a global variable like $seed or something? I'd like the "Seed" input of the "Global Random" node to be driven by the same global random seed integer as every other node so I don't need to add another integer param just for my pixel processor.

Is there a way to do this?

Thanks in advance.

This topic has been closed for replies.

2 replies

Participant
November 29, 2022

Hey.. I'm new to the whole Designer-Painter thing. So ... but i think i found a cleaner solution than the two presented here. I tried finding a list of standart parameters but if you "Get" a float, float 2 int, whatever it shows you the available ones anyways... No $randomseed exposed. But we still want the random settings from the painter (single, per stroke, per stamp).

so I used a Value Processor to make a random Float 0-1 (that uses these settings)

I made an input in the Pixel Processor (#random) and set it with the Value Processor Output

and then.. whatever you need, essentially ^^   
here are some conversions in the Pixel Processor

Inspiring
December 19, 2022

This is the right approach in my opinion, basically you use the Random function node to generate a base random seed that you pass on to other nodes, each of them will add up to this seed using + or * operations so will have a seed specific to them, while still remaining linked to the graph's global seed. Then use GlobalRandom function node with this supplemented seed.

davescm
Community Expert
Community Expert
April 28, 2022

Does leaving the pixel processor random seed value at 0 and setting 'relative to parent' not achieve this? That way the same global value (from graph level) appears to be used.  Setting the pixel processor random seed to any other value  appears to add that value to the global random seed value when set to relative to parent.

 

Dave

Inspiring
April 28, 2022

Thanks for your response. This is the issue I'm having:

How can I connect that specific seed value into this input without having to create a second seed integer parameter?

davescm
Community Expert
Community Expert
April 28, 2022

Got you. Sorry, I'd misread your post and was thinking of the Random node in the function graph rather than the global random node.

The only way I know of to make that input common to other random seeds is to create an integer paramater at graph level and have that drive all the random seeds in the other graph nodes (i.e. put an empty function in each and get the same integer). As far as I know you cannot just grab the random seed graph value. It would be nice if you could though so I'd love to be proved wrong.

 

Dave