PDA

View Full Version : "Random" node?

alexos
11-04-2008, 10:58 AM
Now this is probably already there in some sort, but bear with me: I could use a way to randomize a surface attribute. Imagine a fairly typical wall: it's covered in stone slabs, but each one of the slabs has a different Y dimension - basically let's say each vertical section is made of six different slabs, ranging in Y size from .3 to .9 and randomly placed to fill the section.

To keep it simple while I experiment, I'm just using two instances of the planks node - one for the vertical (which is constant) and one for the horizontal. I messed a little with functions and while I did end up with a pretty useful and bizarre design linking noise to position on the horizontal planks, it is not what I need right now.

It does seem simple though: all I'd need is a node that varies my Y planks' posish (or, perhaps better, scale?) within a certain range - it doesn't necessarily have to be precise, as long as it actually varies it. Except, I can't find it anywhere and my knowledge of nodes is somewhat limited.

Any ideas? :)

dpont
11-04-2008, 11:11 AM
Don't know if it can do what you want,
but there's one node named "Random" in DP Kit,
could output a random number in user' range,
per object or surface.

Denis.

alexos
11-05-2008, 02:17 AM
Don't know if it can do what you want,
but there's one node named "Random" in DP Kit
Denis.

Hello Denis,

hmm, doesn't seem to be working. I attached two scalars to the random node (0.1 to 1.0) but what happens is, if I plug it into the "scale" input of Planks2d it only seems to take the min value, whereas if I plug it into the "position" it only seems to take the max. Strange! Unless I'm doing something wrong of course... could it be because scale and position have vector inputs and your node's output is scalar?

To further simplify the original question, let's say I just need a lot of parallel lines that aren't at the same distance from each other. I know I could just draw the bloody thing in PS and use an imagemap, but I'd like more flexibility -surely there has to be a way to do it with nodes?

dpont
11-05-2008, 02:56 AM
I can get different scaling, position or else with one
nodal setting applied to a surface of an object, if I clone it,
simply connecting the Random node to a procedural
with "Object" selected.
So each plank should be one plank/object which is cloned
or one object with a plank per layer.

If you want output a full vector (not only its x component)
fill a Vector Tool node with the Random node.

Denis.

alexos
11-05-2008, 07:12 AM
I can get different scaling, position or else with one
nodal setting applied to a surface of an object, if I clone it,
simply connecting the Random node to a procedural
with "Object" selected.
So each plank should be one plank/object which is cloned
or one object with a plank per layer.
Denis.

Ah, yes - except in this particular case I'd end up with 196 layers. Eek! Image map it is then. Damn, my faith in the Power of Nodes has been shaken. :)

Thank you though!

dpont
11-05-2008, 08:18 AM
Yes and having a different Surface for each plank?
if you select this option in Random node
output it to Scale or Position in an Image Map node,
then copy this setting to other plank surface,
you will need to save the object first,
then when it will be reloaded, you will get
random setting for each surface.
But yes you should have a different surface
for each plank...

Denis.

dpont
11-05-2008, 08:36 AM
A sample with seven balls, same object, same layer,
simple random number input as hue color,
colors appear identical until you save/reload
the object,

65584

Denis.

dpont
11-05-2008, 08:59 AM
I forgot this also,
speaking of planks procedural you have this one,
in RmanCollect, allowing some variance per plank,
http://pagesperso-orange.fr/dpont/plugins/textures/Planks.html

Denis.

alexos
11-06-2008, 01:37 AM
I forgot this also,
speaking of planks procedural you have this one,
in RmanCollect, allowing some variance per plank,
http://pagesperso-orange.fr/dpont/plugins/textures/Planks.html

Yes, I have that one - there's also some IFW2 (panels for instance) that has the same capabilities, but they're all basically variations of hue/luminosity if I'm not mistaken... I'm beginning to believe that what I want (variations on size/position) just can't be achieved. Or can it?

Size: take your own planks procedural for instance. Would it be possible somehow to have each row of planks to have a different (random) height? Or position - take IFW2 gradient, which you can set to linear and clip so that it draws a line: could we, somehow, introduce a variation in the spacing between the lines?

My knowledge of procedurals is zero, so I just don't know. Anyway, you've been tremendously helpful as usual and I can see how your multiple surfaces technique would work - but I can't really use it in this case, I'd have to set hundreds of different surfaces and the job is simply not worth it :)

dpont
11-06-2008, 01:50 AM
There are some other tricks to vary surface settings,
but I don't think that this can be done in the procedural
itself but rather in a node tree and depends of your geometry
Since procedural always vary, you could simply
alternate one, two or three surfaces with different
settings to break the continuity on your planks,
or use mask to blend them into one surface,
think also you can have different instances
of your procedural, the value which can vary
tone or color of planks can also be used to
input an offset in position.

Denis.