[Radiance-general] RE: Light pipe
Giulio Antonutto
Giulio.Antonutto at arup.com
Thu Jun 2 17:35:45 CEST 2005
the simplest way to proceed is to create an equation that links a
coordinate to the radiance of the surface in form of a multiplier (hence
the equation is between [0,1]).
you may use a cal file or directly express it into the brightfunc
definition.
As an example:
Supposing the relation between light output and distance is this:
(you may use the proper equation here)
y = a*x*x + b
and
y= 0 when x = 1000m
y = 1 when x = 0
it would be:
y = -0.000001*x*x+1
that becomes an 'if' sentence to avoid negative values...
y = if(-0.000001*x*x+1, -0.000001*x*x+1,0)
Putting all together I would define a light material this way:
void light max
0
0
3 100 100 100
max brightfunc light
2 'if(-0.000001*Px*Px+1,-0.000001*Px*Px+1,0)' .
0
0
light cylinder pipe
0
0
7
0 0 0
2000 0 0
.125
void plastic white
0
0
5 1 1 1 0 0
white polygon base
0
0
12
0 -10 -3
0 10 -3
2000 10 -3
2000 -10 -3
if it is ok you should see half cylinder black and the other half with a
gradient. Remember to use really low -ds 0.01.
Ciao,
Giulio
NOTE: Unfortunately the uv trick doesn't work here, since you need light
and you cannot nest it into instances (and meshes).
Hopefully your light pipe follows a simple direction like Px, Py or
Pz... otherwise you need to change the equation a little (you may also
find another equation...).
More information about the Radiance-general
mailing list