Modelling coated surface with refraction

Hi everyone,

I have been using radiance to model textured glass surfaces in order to obtain the corresponding BSDF with success, but I am now tackling a case for which I have not been able to find a suitable solution in Radiance: coated glass surface. In this case, I cannot use the dielectric material anymore, as the material ensures both the refraction and reflection of the rays (which I want), but also the amount of reflection according to Fresnel laws, which is modified in that case. I cannot use BRTDfunc either, as it advised for coated glass in general, as in that case I will indeed be able to specify the reflection coefficients as a function of angle from inside and outside the material, but I will loose the refraction part, which is necessary to retrieve the haze induced by textured glass of course.
My ideal need would be to keep the behaviour proposed by the dielectric material, but be able to inject some other law than the Fresnel one for the reflection as a function of angle, either analytic or with tabulated data. Is there a way to do such a thing with Radiance?
Thanks.

Hello everyone,

I had no luck with my question, so I dropped it for a while, but I now I try looking for solutions again.

It seems that I may be able to encode both the refraction and the reflection and transmission values in a brdf analytical function entered in transfunc. The problem is I don’t know how to do it.
Could someone provide me for example a function coding the standard dielectric interface behavior with a transfunc material, so that I can start from there?

Thanks for your help.

Transfunc doesn’t do refraction, but BRTDfunc can implement any reflection + specular transmission you like. The “haze” portion would need to go into the general BSDF function portion, and would look right for light sources but be approximated as diffuse for the rest of the scene seen through the glazing. You can check out what the “glaze” script produces in terms of BRTDfunc descriptions and .cal files.

Another option is to define everything in a .cal file and use bsdf2ttree to convert it to a tensor tree BSDF, although you would never get the pure reflected component if that’s important for your application.

Thank you very much Greg for your answer.
Regarding your first option, I don’t understand how BRTDfunc can be used, because as you mentioned you can set the specular transmission, but I need a way of steering the transmission based on refraction law to make a it no quite specular. I understand there is the directional diffuse part, but that is not what I need. It would be more a way of analytically defining the exit direction, as done in the dielectric.c code.
Regarding the second option, indeed, I am afraid using a BSDF file just to setup a refraction shift will lead to inaccurate results, even with tensor tree, as it would be in fact an extremely peaky BSDF.
I guess the only option would be to rewrite a version of dielectric.c but with a possibility to parameterize the value for reflection and transmission coefficients, but that is beyond my skills…

Regards,
Emmanuel

Well, if you just want to perturb the transmitted directions according to some waviness of the surface, you can always apply a texture modifier to your BRTDfunc. It will also affect reflected rays, however. If you want the reflection to be smooth and the transmission to be wavey, then I suppose you will need to resort to an exotic mix of a modulated plastic without texture and a glass or trans material with texture. The mixfunc primitive allows you to mix materials in this way.

Thanks.
It is exactly what I need, and the fact that reflected rays are also scattered is what I want so no problem. The problem is I don’t understand why applying a texture modifier to BRTDfunc would cause to perturb the transmission (the reflection I get), unless BRTDfunc handles refraction, but in this case, how do you specify the optical index?
Regards,
Emmanuel

The perturbation on the refracted rays is admittedly a hack. I just add the computed texture to the transmitted ray direction and renormalize. When you think about it, different waviness on either side combines with the index of refraction in difficult to predict ways, especially when the texture period (mean correlation distance) is on the order of the thickness of the glass. So, I just punted. If you want an exact simulation and you have profilometry of your surface front and back, then you could go back to your original plan of modifying the dielectric material type in C to get the desired reflection behavior.