[Bf-funboard] A needed node.
patrik.andersson.se at gmail.com
Mon Jul 1 21:14:37 CEST 2013
Well can't you just use the OSL standard function for noise? (see https://github.com/imageworks/OpenShadingLanguage/raw/master/src/doc/osl-languagespec.pdf)
It says that "noise" is able to return a random colour/point/normal-vector. If you would like an object depending noise, combine it object:random number with e.g. cellnoise.
An example is shown in built-in the "noise" template for osl-shaders.
On Jul 1, 2013, at 8:29 PM, Knapp 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);
> 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.
> Bf-funboard mailing list
> Bf-funboard at blender.org
More information about the Bf-funboard