HDR image generation with rad command for glare analysis

Hi all,

I’m trying to generate HDR images for glare analysis with the rad command.

I’ve been playing around with the options, but even with “high” for detail, quality and variability, I still get renders with a strange patchiness in one corner. Any ideas why?

Here a couple of examples:
DETAIL= High
INDIRECT= 4
OCTREE= multilab_${lcg}${mth}.oct
QUALITY= Medium
RESOLUTION= 1000
VARIABILITY= High
ZONE= Interior 0.100388 4.30039 -0.34974 8.00026 1 4
PICTURE= data/rpict/${lcg}
${mth}ab4
materials= obj_multilab_SSF/multilab_SSF_materials.rad
materials= skies/BZ_CIE
${mth}.rad
scene= skies/sky.rad
scene= multilab_SSF_xf.rad
scene= obj_multilab_SSF/window_${lcg}.rad
view= int -vf inside_2.vf" > multilab_${lcg}_${mth}.rif

DETAIL= High
INDIRECT= 3
OCTREE= multilab_${lcg}${mth}.oct
QUALITY= High
RESOLUTION= 1000
VARIABILITY= High
ZONE= Interior 0.100388 4.30039 -0.34974 8.00026 1 4
PICTURE= data/rpict/${lcg}
${mth}ab4
materials= obj_multilab_SSF/multilab_SSF_materials.rad
materials= skies/BZ_CIE
${mth}.rad
scene= skies/sky.rad
scene= multilab_SSF_xf.rad
scene= obj_multilab_SSF/window_${lcg}.rad
view= int -vf inside_2.vf" > multilab_${lcg}_${mth}.rif

Maybe it doesn’t matter, since my ultimate goal is to make a reasonable DGP calculation, not generate a beautiful render. The DGP values for the two examples above are identical up to the second decimal place.

Disclaimer: the window material is a strange BSDF with direct/diffuse transmission and angular dependence… I tried with regular glass and got nicer looking results.

Thanks as always,
Joe

If you use rad with -N > 1 then you should specify an AMBFILE= place to share indirect values between rpiece processes. This looks like different tiles arriving at different average interreflections.

Please give the command(s) you used to produce your pictures.

-Greg

Dear Greg,

Many thanks for the tip; I’ve added AMBFILE= place to my .rif file which has removed the tile effect and also sped up the execution.

But here’s still something strange going on with some edges, as well as within the patch of light hitting the floor beneath the window. I think the latter is due to the BSDF material I used for the window, as with regular glass it doesn’t happen:

void BSDF lcg_on_mat
6 0 bsdf/LCG_ON_triple.xml 0 0 1 .
0
0

Here are the commands I’m using and the output below:

echo "creating octrees"
oconv -f multilab_SSF_xf.rad obj_multilab_SSF/window_${lcg}.rad skies/BZ_CIE_${mth}.rad skies/sky.rad > multilab_${lcg}_${mth}.oct

#create .rif file
echo "
#rad input file
DETAIL= High
INDIRECT= 4
OCTREE= multilab_${lcg}_${mth}.oct
QUALITY= Medium
RESOLUTION= 1000
VARIABILITY= High
ZONE= Interior 0.100388 4.30039 -0.34974 8.00026 1 4
PICTURE= data/rpict/${lcg}_${mth}_ab4
AMBFILE= place
materials= obj_multilab_SSF/multilab_SSF_materials.rad
materials= skies/BZ_CIE_${mth}.rad
scene= skies/sky.rad
scene= multilab_SSF_xf.rad
scene= obj_multilab_SSF/window_${lcg}.rad
view= int -vf inside_2.vf" > multilab_${lcg}_${mth}.rif

#run .rif file
rad -N 4 multilab_${lcg}_${mth}.rif  
		
echo "creating false colour image"
#create false color hdr
falsecolor -i data/rpict/${lcg}_${mth}_ab4_int.hdr -s 10000 -log 3 -n 3 -lh 750 -lw 200 > data/rpict/fc_${lcg}_${mth}_ab4.hdr

echo "converting to jpg"
#convert to jpg
convert data/rpict/fc_${lcg}_${mth}_ab4.hdr data/rpict/fc_${lcg}_${mth}_ab4.jpg

Could you suggest how I could resolve these issues?

Many thanks,
Joe

You can try replacing the BSDF type with “aBSDF”, which takes one fewer string argument. (I.e., no thickness argument.) This will allow a pass-through component that avoids some of the sampling issues you are seeing.

Cheers,
-Greg

Thanks Greg, I tried that, and my DGP values significantly increased.

I did some reading on “aBSDF”, and it seems that in your 2021 Bilbao presentation you advise against using it for translucent materials. I’m modelling liquid crystal glass, which, particularly in its “off” state, is highly diffusive (only ~2% direct transmission), so perhaps the original simple “BSDF” is better suited. What do you think?

Am I right in thinking that:

  • with peak extraction, I risk overestimating DGP for materials with mainly diffusive transmission
  • without peak extraction, I risk underestimating DGP for materials with mainly direct transmission?

If I’m right, then wonder if it’s better to underestimate DGP, since when the circumsolar region is in the field of view, even the lower DGP lower exceeds the 0.45 threshold, which is ultimately what I care about for control strategies etc.

Let me know what you think.
Kind regards,
Joe

If your material has some “vision” component to it, i.e. you can make out writing on the other side at about the same distance you could with nothing in the way, then the “aBSDF” type is appropriate. If the scattering is such that you cannot see writing through the material, the “BSDF” is best.

I cannot speak to the accuracy of DGP values computed in this case. All I can say is that it is very challenging to match results between HDR captures and renderings from my experience.

Best,
-Greg

Hi Joe,
If the “direct transmittance” is around 2%, that would mean the sun-disk area would be around 20 million cd/m2 (assumption: max sun luminance 2e9cd/m2 → actual sun luminance 1e9cd/m2*0.02=2e7cd/m2) and that is definitely in a range that it can cause significant glare (depending on the adaptation level of the eye).
If you are using BSDF rather than aBSDF, then your glare prediction accuracy drops automatically to a similar range as if you use only Ev as a glare predictor (e.g. using the DGPs). For “peaky” systems this is definitely not recommend since you could be far off (see Stephen’s presentation at the last radiance workshop) and was mentioned already when DGPs was introduced.
Using aBSDF, have you applied the blurring of the peak before you calculate DGP? If not, that might be the reason why the values appears to be such high for you.

Jan

Hi Jan,

Many thanks for your input!
I’m not sure what you mean by “peak blurring” or how I would do this… could you elaborate?
Other than adding the following, I didn’t make any other changes to my code:

void aBSDF lcg_on_mat
5 bsdf/LCG_ON_triple.xml 0 0 1 .
0
0

Kind regards,
Joe