[Radiance-general] mirror and mixfunc

Greg Ward gregoryjward at gmail.com
Tue Dec 1 09:11:27 PST 2015


Thanks, Giulio, great stuff!  Do we have a link to your blog from radiance-online?  We should add one if we don't.  Is there an index of any kind?

Cheers,
-Greg

> From: giulioandrea antonutto foi <geotrupes at me.com>
> Subject: Re: [Radiance-general] mirror and mixfunc
> Date: December 1, 2015 8:57:52 AM PST
> 
> From my old blog….
> 
> The idea is to create a simple mirror, a ‘caustic’ effect and apply a pattern to it, to create holes without having to modify the geometry.
> The geometry is a classic:
> cap.rad - the cap for the ring
> mix ring top
> 0
> 0
> 8
> 0 0 25
> 0 0 1
> 57.29432507 60
> scene.rad - a spot light and a plane
> void spotlight spot
> 0
> 0
> 7 50000 50000 50000 35 0 -1 -1
> spot sphere source
> 0
> 0
> 4 0 200 200 2.5
> void plastic white
> 0
> 0
> 5 .5 .5 .5 0 0
> white polygon plan
> 0
> 0
> 12
> -500 -500 0
> -500 500 0
> 500 500 0
> 500 -500 0
> single.rad - a single sector of the ring, to array
> mix polygon int
> 0
> 0
> 12
> -.5 -57.29432507 0
> -.5 -57.29432507 25
> .5 -57.29432507 25
> .5 -57.29432507 0
> mix polygon ext
> 0
> 0
> 12
> -.5237120674 -60 0
> .5237120674 -60 0
> .5237120674 -60 25
> -.5237120674 -60 25
> And now the interesting stuff:
> To activate secondary sources use -dr N  (N>0).
> We will use mirror.
> Unfortunately when mirror is nested into a mixfunc material is invisible to the secondary source tracer... but there is a workaround...
> model.mat
> #alterate the reflectance of the metal - optional
> void brightfunc stripes
> 2  'sin(A1*Pz)' . 
> 0
> 1 .8
> #metal
> stripes metal metal
> 0
> 0
> 5 .8 .8 .8 0.001 0
> #mix the metal with void to create holes
> void mixfunc strip
> 4  metal void 'if(sin(A1*Py),0,1)' .
> 0
> 1 .2
> #alterate the reflectance of mirror, reflectance is 0% for holes
> void brightfunc band
> 2 'if(sin(A1*Py),0,1)' .
> 0
> 1 .2
> #mirror attached to the metal surface, with holes
> band mirror mix
> 1 strip
> 0
> 3 1 1 1
> 
> 
> Now, array the single.rad file:
> xform -a 360 -rz 1 -i 1 single.rad  > ring.rad
> 
> ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20151201/3ccf873d/attachment.html>


More information about the Radiance-general mailing list