[Radiance-general] diffuse transmission of BRTDfunc

Greg Ward gregoryjward at gmail.com
Wed Aug 5 09:47:07 PDT 2015


Hello Jan,

I suppose this behavior is rather confusing.  Firstly, the reason that "0.1" does not complain whereas ".1" does is because the program stops looking past "0", which it assumes means exactly zero.  This is a special case for specifying that you have no directional diffuse component, since these string arguments are usually used to give the name of a function of three or four parameters.

In any case, there is no need to specify constant values for the directional diffuse component (other than zero) because that would turn them into a diffuse component, which is already provided in the first six real arguments for this type.  These things are explained as best I can in the materials section of the Radiance reference manual, which I assume you are using:

	http://radsite.lbl.gov/radiance/refer/ray.html

To get a pattern to modify your BRTDfunc, why not use the standard mechanism in Radiance and give it a pattern modifier?  This will modify the diffuse transmission value as well, but perhaps that's OK in your situation.  If not, then you can define a directional diffuse component that ignores the given scattered direction and uses instead the surface position (or whatever) to modify its value in the function file.

I'm not sure I've explained this well, so please follow up with any questions you have.

Best,
-Greg

> From: Jan Wienold <jan.wienold at epfl.ch>
> Subject: [Radiance-general] diffuse transmission of BRTDfunc
> Date: August 5, 2015 2:11:39 AM PDT
> 
> Hi all,
> 
> I'm a bit stuck by the use of the "old-fashioned" BRTDfunc. Maybe it is a silly question, but I couldn't find anything about this in the discussions so far.
> 
> What I want to do is to modify the diffuse transmitted light by a function and using the material BRTDfunc. For the specular transmission and reflection this works pretty well, a function can be defined in a user specified function in a cal file.
> But if I try to do this for the diffuse component, it immediately fails. In addition (or maybe the same issue) the is a problem in parsing. If I specify for "rbrtd gbrtd bbrtd" and "rtdif gtdif btdif " 0.1 0.1 0.1, the function works properly. But using .1 instead 0.1 it fails as well.
> It always says "undefined function" in both cases.
> Any idea?
> if it is possible to change the diffuse behavior, how would it be possible? And how can I access the angle to the light source? Rdot is giving me only the angle of incidence from the incoming ray to the surface normal, but not between light source and surface normal.
> below a simple example.
> thanks a lot
> 
> Jan
> 
> example of BRTDfunc working properly:
> 
> void BRTDfunc testmat
> 10 0 0 0
> dirtrans dirtrans dirtrans
> 0.1 0.1 0.1
> testfunc.cal
> 0
> 9 0.2 0.2 0.2
> 0.2 0.2 0.2
> 0.1 0.1 0.1
> 
> and testfunc.cal is (for all cases)
> 
> {test functionfile}
> dirtrans=0.25*Rdot*Rdot;
> diftrans=0.3*sqrt(Rdot*Rdot);
> 
> example of BRTDfunc NOT working:
> 
> void BRTDfunc testmat
> 10 0 0 0
> dirtrans dirtrans dirtrans
> .1 .1 .1
> testfunc.cal
> 0
> 9 0.2 0.2 0.2
> 0.2 0.2 0.2
> .1 .1 .1
> 
> or also not working:
> 
> void BRTDfunc testmat
> 10 0 0 0
> dirtrans dirtrans dirtrans
> diftrans diftrans diftrans
> testfunc.cal
> 0
> 9 0.2 0.2 0.2
> 0.2 0.2 0.2
> diftrans diftrans diftrans
> 
> -- 
> Dr.-Ing.  Jan Wienold
> Ecole Polytechnique Fédérale de Lausanne (EPFL)
> EPFL ENAC IA LIPID



More information about the Radiance-general mailing list