[Bf-funboard] A needed node.

Jason van Gumster jason at handturkeystudios.com
Mon Jul 1 20:52:14 CEST 2013

Perhaps this is a dumb question, but random color/number on what event? Screen
refresh? Frame change?

If it's the latter, why not simply keyframe the color on an RGB node (or the
number on a Value node) and add a Noise modifier to the desired channels in the
Graph Editor? I've done this before in the compositor nodes and BI's material
nodes. I haven't tried with the Cycles' nodes, but I can't image it wouldn't


Knapp <magick.crow at gmail.com> wrote:

> A lot of people would like a random number input. The only thing I can find
> is the random on the object
> You see a lot of hacked things on the net like this or other hacks but they
> are not nicely done or clean. A simple node that gives out a random number
> would be great to have, with a seed input? . Perhaps other ideas might be
> perlin noise etc and a time node so that we can feed that into the seed.
> Using the Object Random is OK but if you feed it into a combine RGB you
> just get shades of grey, not what is needed in many cases. We need 3
> different numbers.
> Here is on OSL node that is trying to get past the problem. Don't know but
> would bet this is slower than a built in node.
> #include "stdosl.h"
> shader RandomColor(
>     output color RandomColor=0)
> {
>     float Random=0;
>     float R=0;
>     float G=0;
>     float B=0;
>     getattribute("object:random", Random);
>     R=trunc(Random*100.0)/100.0;
>     G=trunc((Random*100.0-trunc(Random*100.0))*100.0)/100.0;
>     B=trunc((Random*10000.0-trunc(Random*10000.0))*100.0)/100.0;
>     RandomColor=color(R,G,B);
> }

More information about the Bf-funboard mailing list