Should I try adding rand seeds to the material random nodes?

I was just working on a project designing procedural materials and finding myself wishing that nodes like Noise Texture and Voronoi Texture had a field for a randseed. It;s not so easy at the moment to generate multiple different noise images for the same input UV coords. There are work-arounds, but they’re situation specific and it would be much easier to just have a seed to set.

I was thinking of going ahead and trying to hack it in myself to the blender source, but was wondering if this is a good idea. The fact that Blender made it to 4.1 without having this field added makes me wonder if there is possibly some reason it has not been added in? I was also wondering if is something the community would be interested in.

1 Like

They do have them already- switch to 4D and change the W value

6 Likes

Well, it’s always possible to shift the UVs before the noise, or use the W input.
Adding a seed could be convenient in some ways but IMO that doesn’t fit the minimalist design of blender nodes. Since it’s possible to work around that and furthermore what you describe is more an advanced workflow than anything that might not benefit the average user, I think it’s good as it is.
Thanks anyway !

You can also get three variants of the texture with the color output as well (cheaper, simpler, and faster than a setup containing multiple noise nodes). Use the Separate RGB node to utilize it for greyscale.

2 Likes

These suggestions are some of the work arounds I was talking about. And while they can work well in some situations, in others they wont. What if you’re using al three channels of the noise? What if you’re animating the noise? Then the 4D w parameter trick won’t work.

Then there’s also the issue that this obscures what the network is doing. If you increment the noise seed, it’s obvious that you want a different noise texture over the same coordinates. If you use one of these tricks, it’s not so obvious and harder to debug.

Anyhow, I won’t go ahead with it, but I still do think it wold be a useful addition.

The mapping node can also offset the texture coordinates by huge amounts (to the point where you would not see repeating because it is larger than the scene dimensions).

That is a third workaround which I myself have used before.

The W value is not a workaround. It is very literally the random seed, just with a different label

You can create a custom GN attribute corresponding to a random value node as input.
In shader, you can reuse this attribute to mess up settings of procedural texture, using an Attribute Node.
You can change seed of node in UI of Modifier.

You can create a custom prop to shift a driver using a noise modifier on a setting of texture.

You may not want the W setting to randomize texture for you.
There are other ways to randomize texture settings through attributes and drivers.

If you need to animate the texture though (ie. cheap fluid/plasma convection like what happens on the Sun and other environments), then you need to use an alternative for the seed because the W output is the only one that brings about smooth procedural motion. With the W socket already used, you can either use the huge offset workaround or use a different band of W values for different objects (which should still work unless you just have a huge number of objects that need to be distinct, which is rare).

W works like that because it is not a seed in a traditional way (as seen with the socket type which is a float and not an int like the seed sockets in Geo Nodes).

2 Likes

Looking at the Blender source code, the W parameter is handled the same way the X Y and Z of the vector are. It’s just given it’s own parameter slot because in Blender, vectors only have 3 components.

1d white noise can be used as a seed for any input, separating the colour output gives you 3 seeds, with map range it is like the random float in GN.

Some times the problem is not creating the seed but what to drive it with, in this case random per object.

You can use it to drive the scale etc of the noise.

2 Likes