[Bf-cycles] Factor input for Add shader

Lukas Tönne lukas.toenne at gmail.com
Fri Oct 26 22:20:14 CEST 2012


Just be aware that the resulting lighting will not be physically
correct, more like a weird emission shader. For physically correct
lighting the sum of all weights needs to be 1, i.e. what the mix node
does:

C1 * (1-t) + C2 * t -> weights (1-t) + t == 1

You can of course make any node you like if it suits the artistic
purpose, just sayin' ;)

Cheers,
Lukas

On Fri, Oct 26, 2012 at 10:01 PM, Montage Studio
<jonathan at montagestudio.org> wrote:
> Huge plus one!
>
> --
> Jonathan Williamson
>
> Instructor - http://www.blendercookie.com
> Personal Trainer - http://www.mavenseed.com
> Portfolio - http://www.jw3d.com
>
> On Friday, October 26, 2012 at 3:00 PM, Gottfried Hofmann wrote:
>
> Hey there,
>
> one thing I was hoping for since the dawn of Cycles is a factor input
> for the Add-Shader (just like the mix shader has). I think that's way
> more intuitive than making the shader you want to add darker/brighter if
> you want to change the strength of the effect.
>
> Here is a simple OSL script that creates such an Add-Shader:
>
> #include "stdosl.h"
>
> shader node_advancedadd_closure(
> float Fac = 1.0,
> closure color Closure1 = 0,
> closure color Closure2 = 0,
> output closure color Closure = 0)
> {
> float t = clamp(Fac, 0.0, 1.0);
> Closure = Closure1 + t * Closure2;
> }
>
> To avoid breaking things the factor could be set to 1 by default so the
> Node would normally work just like the current Add-Shader.
>
> Cheers,
> Gottfried
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
>
>
>
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
>


More information about the Bf-cycles mailing list