[Radiance-general] diffuse transmission of BRTDfunc

Jan Wienold jan.wienold at epfl.ch
Wed Aug 5 10:41:42 PDT 2015


Hi Greg,

hmm, I have to admit I'm still not clear...

In general I think a pattern does not work in my case, since I want to 
apply a different behavior of the direct-direct and the direct-diffuse 
transmission, both depending on the angle of incidence of the incoming 
ray(from the light source). E.g. I want to decrease the direct-direct 
transmission for a more flat angle of incidence whereas I want to 
increase at the same time the direct-diffuse transmission. In other 
words: I want to  control the direct and the diffuse transmission 
separately  via a function file depended of the light incidence (if 
possible).
I thought to control the direct-diffuse transmission is possible by 
using functions for "rbrtd gbrtd bbrtd" and/or "rtdif gtdif btdif " .

Also, honestly, the difference between those two parameters are not 
completely clear to me:
"The functions rbrtd, gbrtd and bbrtd take the direction to the incident 
light (and its solid angle) and compute the color coefficients for the 
directional diffuse part of reflection and transmission."
and " The diffuse transmittance (must be the same for both sides by 
physical law) is given by rtdif, gtdif and btdif. "

Which one of them I have to use if I wanna change the diffuse behavior? 
And how? Any function name I used to replace rtdif or rbrtd seem to be 
impossible, regardless if this function is in the cal-file or even a 
standard function or name.

So to reduce it to two simple questions:
-In case I have defined a function for the direct-diffuse transmission 
in a functionfile, how can I apply it in BRTDfunc?
-How can I access in that function file (called by BRTDfunc) to the 
direction to the incident light? According to rayinit.cal, Dx,Dy,Dz is 
only available for the prism materials, or?

Thank you very  much!

best,

Jan




Am 8/5/15 um 6:47 PM schrieb Greg Ward:
> 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
> _______________________________________________
> 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/20150805/110d83e9/attachment.html>


More information about the Radiance-general mailing list