# The issue regarding the pabopto2bsdf

I calculated the BDTF values by sweeping the incident angles (phi, theta), where phi = [0,10,20,30,40,50,60,70,80] and theta = [0,30,60,75,90]. I used pabopto2bsdf with quadrilateral symmetry to produce a Scattering Interpolant Representation. Finally, I used bsdf2klems to derive the Klems BSDF. However, I found that the Klems BSDF did not maintain quadrilateral symmetry. For example, the transmittance for incident path 145 is 20.8%, while that for incident patch 141 is 51.1%.

Are these measurements you are using, or some other simulation you are feeding to pabopto2bsdf?

You should have a phi=90 measurement, but a theta=90 (polar angle) is not measurable and should probably not be included. The phi=0 and phi=90 measurements help with the creation of a quadrilateral Delaunay mesh. In general, you don’t really want a grid of incident directions, but something that conforms more naturally to a triangle mesh.

What does “getinfo my_interpolant.sir” give you?

Cheers,
-Greg

Hi Greg,
I am sorry I provided the incorrect description regarding the incident angles, actually, theta = [0,10,20,30,40,50,60,70,80] and phi = [0,30,60,75,90]. I used FDTD to derived the values and feed it to pabopto2bsdf.

The oucomes of “getinfo my_interpolant.sir” are:
pabopto2bsdf -n 16 -s quadrilateral combine/btdf2/btdf0_0.txt combine/btdf2/btdf10_0.txt combine/btdf2/btdf10_30.txt combine/btdf2/btdf10_60.txt combine/btdf2/btdf10_90.txt combine/btdf2/btdf20_0.txt combine/btdf2/btdf20_30.txt combine/btdf2/btdf20_60.txt combine/btdf2/btdf20_75.txt combine/btdf2/btdf20_90.txt combine/btdf2/btdf30_0.txt combine/btdf2/btdf30_30.txt combine/btdf2/btdf30_60.txt combine/btdf2/btdf30_75.txt combine/btdf2/btdf30_90.txt combine/btdf2/btdf40_0.txt combine/btdf2/btdf40_30.txt combine/btdf2/btdf40_60.txt combine/btdf2/btdf40_75.txt combine/btdf2/btdf40_90.txt combine/btdf2/btdf50_0.txt combine/btdf2/btdf50_30.txt combine/btdf2/btdf50_60.txt combine/btdf2/btdf50_75.txt combine/btdf2/btdf50_90.txt combine/btdf2/btdf60_0.txt combine/btdf2/btdf60_30.txt combine/btdf2/btdf60_45.txt combine/btdf2/btdf60_60.txt combine/btdf2/btdf60_75.txt combine/btdf2/btdf60_90.txt combine/btdf2/btdf70_0.txt combine/btdf2/btdf70_30.txt combine/btdf2/btdf70_60.txt combine/btdf2/btdf70_75.txt combine/btdf2/btdf70_90.txt combine/btdf2/btdf80_0.txt combine/btdf2/btdf80_30.txt combine/btdf2/btdf80_45.txt combine/btdf2/btdf80_60.txt combine/btdf2/btdf80_75.txt combine/btdf2/btdf80_90.txt
CAPDATE= 2024:09:02 10:00:18
GMT= 2024:09:02 02:00:18
SYMMETRY=1
IO_SIDES= 1 -1
COLORIMETRY=Unknown
GRIDRES=256
BSDFMIN=2.01468e-07
BSDFSPEC= 0.600120 0.201514
FORMAT=BSDF_RBFmesh

OK, the header is about what I would expect. Can you share your *.sir file(s), somehow? Perhaps e-mail it to me? It would also be helpful to have at least a few of your pabopto files, so I can check the headers. Finally, send me the Klems XML file, so I can try to figure out what is happening. It could be as simple as not setting the bsdf2klems -n option high enough.

Cheers,
-Greg

Hi Greg,

I have sent the files to your email ([email protected]). If you don’t receive them, please let me know.

Thanks, Yongqing.

I was able to unpack your files and have a look. The only potential issue is that you used “#format: theta phi DSF” in the pabopto headers, which implies that your scattered directions include a cosine factor based on their polar angle. If this is what the FDTD software gives you, that is fine, but if it provides BTDF values directly, you should use “#format: theta phi BSDF” instead, as indicated in the pabopto2bsdf man page.

Regarding quadrilateral symmetry, your SIR and XML files both exhibit quad symmetry on their incident angles. If you swap quad-mirrored incident directions, you should get appropriately mirrored output distributions. There is no guarantee that your material actually has quadrilateral symmetry, however, so it may not (and in your case does not) exhibit quad symmetry in the output distributions themselves.

I hope this is clear. It may be that you need to bump up your FDTD parameters, or drop the quad symmetry assumption from your processing pipeline. I don’t believe this is Radiance’s fault this time… The output you are getting makes sense for the input.

Cheers,
-Greg

Thank you, Greg!

Actually, the FDTD doesn’t output the BTDF directly. I wrote a post-processing script to derive the values, and I believe the DSF is correct because I didn’t divide by the cosine factor.

Additionally, the quadrilateral symmetry I understand is that it exhibits quad symmetry in their incident angles. For example, the output distribution corresponding to the incident direction (80,45) is symmetric with that corresponding to the incident direction (80,135) about the Y axis (up direction), and it is also symmetric with that corresponding to the incident direction (80,315) about the X axis. I’m not sure if my understanding is correct for the pabopto2bsdf.

I have also used FDTD simulation to confirm that the material I simulated exhibits quad symmetry in its incident angles.

Hi Yongqing,

You may be correct – at least your understanding of symmetry is. I didn’t read your initial plots carefully enough. I will investigate bsdf2klems further to see if I can spot something going wrong with the sampling. It is not an easy program to debug…

Cheers,
-Greg