Hi,
I ran into a problem with the random node, I’m hoping I can find an answer too.
Does any body know if it is possible to have the “object info> random” node not effect stacks of objects? so it would only give a random value to objects with different X & Y positions, but not randomize the value objects stacked in Z?
Or maybe I could group the object stacks and is there some way the random node could effect objects by group rather then mesh?
I’m including a image of a simplified version of the problem I’m having.
I would like the Random node to give each tower a random value, but I want the value to be the same for all the vertical objects up the tower. so ideally I want this to be 3 towers, of 3 blocks, and each tower should be the same value for all 3 of its blocks, but each tower would have a different value from the other.
Here is the hard part, I need the random value to come from the random node, not the Position or Location node (although its fine if either of those are used to help limit the random node), and I can’t combine all the blocks of a tower, as the center blocks have array modifiers giving them their height.
Any help I can get would be greatly appreciated.
Thanks
I think your best bet is to use the x and y coordinates of objects instead of random and mix it up so that it does not become a gradient in space. Separate xyz, force z coordinate to 0 and do something interesting with x and y (modulo, sine/cosine ect) to mix them up a bit. Then combine, desaturate and use the result as color.
EDIT: forum played tricks on me, forget the multiple answers.
I think your best bet is to use the x and y coordinates of objects instead of random and mix it up so that it does not become a gradient in space. Separate xyz, force z coordinate to 0 and do something interesting with x and y (modulo, sine/cosine ect) to mix them up a bit. Then combine, desaturate and use the result as color.
I think your best bet is to use the x and y coordinates of objects instead of random and mix it up so that it does not become a gradient in space. Separate xyz, force z coordinate to 0 and do something interesting with x and y (modulo, sine/cosine ect) to mix them up a bit. Then combine, desaturate and use the result as color.
random output will always give randomness on a per-object basis, so my advice would be to use the object index output (set the index in the object properties) like so : http://pasteall.org/blend/index.php?id=44736
(borrowed from the cycles shaders thread)
Forget it, kesonmis’s solution is better as it allows you to give actual randomness.
Pretty much exactly what kesonmis says here, in this case I add x and y, multiply by a big number, modulus 10 , divide by ten and you get a random number between 0-1 which is z independent. The big number (12973) is in effect a random seed, changing it will change the randomness. Looks like this:
Those suggestions wouldn’t work if animated or if origins are slightly different. I haven’t tried yet, but I would approach it like this (only if the above doesn’t work):
Unwrap UV for all stacks. So if you had four stacks of objects you would position stack 1 in the upper left part of the UV grid, stack 2 in the upper right part of the UV grid, and so on. Even as a single line of UV spaces would work (4 columns instead of 2 columns and 2 rows). UV doesn’t have to look good unless you plan to use it for something else as well. Better off creating new UVs for other purposes. Could probably be condensed to a separate point as long as they are inside designated UV area.
On the material side, the designated UV area would instead lookup some random value or color (UV texture coords, separation, multiply, modulo, and noise would be key nodes - note that noise must be “beefed up” to produce more random looking colors).
I won’t have time to look more into this, but maybe others can help using this idea if you need animation support. I’ve done the opposite before, using object random to pick some texture square inside a UV map to pick out a random domino texture.