[Bf-funboard] A needed node.

Knapp magick.crow at gmail.com
Mon Jul 1 20:29:25 CEST 2013

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);

Douglas E Knapp

Creative Commons Film Group, Helping people make open source movies
with open source software!

Massage in Gelsenkirchen-Buer:
Please link to me and trade links with me!

Open Source Sci-Fi mmoRPG Game project.

More information about the Bf-funboard mailing list