[Bf-funboard] A needed node.

Knapp magick.crow at gmail.com
Tue Jul 2 08:44:21 CEST 2013

On Tue, Jul 2, 2013 at 7:52 AM, Patrik Andersson
<patrik.andersson.se at gmail.com> wrote:
> Well, just export my first script to .osl and provide the community with them, I think it does what you are asking for.
> The first shader is a OSL shader/Node for random color depending on object.
> Link it with object-info->random, the rate make it possible to give a better spread for your randomness.
> shader RandomColor(
>     float objInd = 1.0,
>     float rate = 1000.0,
>     output color RColor = 0.8)
> {
>     RColor = noise("cell",objInd*rate);
> }
> Eg. of a random number node, with a seed input, gives u a perlin-noise. Well I don't suggest to use this one, it is highly dependent on the seed value.
> shader RandomNumber(
>         float seed,
>         output float rn = 1.0)
> {
>         rn = noise("perlin",seed);
> }
> Best regards
> Patrik

Very good and useful but not what I want (for this thread anyway.
Really awesome as far as helping me understand OSL!). I don't want a
OSL node because the average artist will run screaming from anything
to do with programming.
The other problem is that it will not render on my nice new FAST
graphics card. OSL is currently CPU only.

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