[Radiance-general] mirror and mixfunc
Jan Wienold
jan.wienold at epfl.ch
Tue Dec 1 09:18:08 PST 2015
Hi Greg and Giulio,
thanks for your cool (kung foo:-) ) tips! And yes it totally makes
sense! :-)
About the brightfunc I was already aware, but I couldn't find a solution
to integrate a material for the interreflection calculation. I was
already thinking of running two times with different material
definitions, but this is a cool solution!
Jan
Am 12/1/15 um 5:56 PM schrieb Rob Guglielmetti:
> I love when Greg shares these kung foo tips and deep insights to
> Radiance's underbelly, and then closes with "Does this make sense".
> Yes, it makes sense, after reading it like five times. Thanks, Greg,
> as always!
>
> On Tue, Dec 1, 2015 at 9:51 AM, Greg Ward <gregoryjward at gmail.com
> <mailto:gregoryjward at gmail.com>> wrote:
>
> Hi Jan,
>
> As you discovered, the code isn't sophisticated enough to handle
> virtual source materials (mirror, prism, prism2) through the
> mixfunc interface. (BTW, mixfunc also fails for light sources.)
> However, you can use the "alternate material" argument to the
> mirror primitive to specify a different behavior for when the
> mirror is not directly participating in the virtual source relay
> calculation. You could have a chain like this, which would work:
>
> void metal mat1
> [arguments]
>
> void plastic mat2
> [arguments]
>
> void mixfunc mat1+2
> 4 mat1 mat2 mixing_var mixit.cal
> 0
> 0
>
> void mirror mmat1+2
> 1 mat1+2
> 0
> 3 .5 .5 .5
>
> ------
> When the mirror material is participating in the virtual source
> calculation, it reflects everything at 50%. When it's
> participating in the interreflection calculation, or you look at
> it directly, then it switches to the mixfunc mat1+2's behavior.
>
> If one of your goals is to have the mixfunc control the amount of
> reflected light in the virtual calculation, I'm afraid you will
> need to use a brightfunc modifier on the mirror material,
> instead. You can do this in conjunction with an alternate
> material to make the behavior consistent if you like. In the
> example above, let's say that mat1 is mirror-like with 80%
> reflectance and mat2 is diffusing. You could use the same cal
> file for your brightfunc, modifying the mirror primitive like so:
>
> void brightfunc mir_amt
> 2 mixing_var mixit.cal
> 0
> 0
>
> mir_amt mirror mmat1+2
> 1 mat1+2
> 0
> 3 .8 .8 .8
>
> --------
> Does this make sense?
>
> -Greg
>
> > From: Jan Wienold <jan.wienold at epfl.ch <mailto:jan.wienold at epfl.ch>>
> > Subject: [Radiance-general] mirror and mixfunc
> > Date: December 1, 2015 6:44:00 AM PST
> >
> > Hi all,
> >
> > I got stuck a bit applying mixfunc and mirror material. It seems
> that the check for secondary light sources is partly disabled when
> applying (at least I assume so).
> >
> > A simple example:
> >
> > lets assume an ideal mirror
> >
> > void mirror testmat1
> > 0
> > 0
> > 3 1 1 1
> >
> > If I use just this material on a surface and start an rtrace
> sending to the surface, then I get the correct result for both
> options - either rtrace or rtrace -I. So far so good.
> >
> > In case I use a (stupid, but simple) mixfunc:
> >
> > void mixfunc test_mix
> > 4 testmat1 testmat1 0.5 .
> > 0
> > 0
> >
> > I should get the same result, since I'm mixing the same material
> with a fixed value.
> > But: rtrace -I delivers only 0, whereas rtrace delivers the
> correct value. So it seems that mixfunc cannot be applied with
> mirror, when the -I option is used. Or I did something wrong?
> > I used -dr 2 and -dt 0 in both cases.
> >
> > Of course my ultimate goal is not mixing that simple but mixing
> two different material types, also depending on the angle of
> incidence, but this simple example shows the principle problem.
> >
> > Is there any solution using mixfunc and mirror when using rtrace
> -I ?
> >
> > Jan
>
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> <mailto:Radiance-general at radiance-online.org>
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>
>
>
>
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general
--
Dr.-Ing. Jan Wienold
Ecole Polytechnique Fédérale de Lausanne (EPFL)
EPFL ENAC IA LIPID
http://people.epfl.ch/jan.wienold
LE 1 111 (Office)
Phone +41 21 69 30849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20151201/d58f5b2a/attachment-0001.html>
More information about the Radiance-general
mailing list