Rtrace -I vs -i

Hello;

Could someone explain me the difference between -i and -I in rtrace command?

I want to sample irradiance on a few points at the center of polygons.

  • With -i option, I placed the “sensor” slightly on top of the polygon and the normal is pointing down to the polygon.
  • With -I option, I placed the sensor on the polygon plane and the normal pointing upward.

I was expecting to get the same but it’s not the case. Is it because when I use -i the ray energy is affected by the polygon material when with -I option it’s not the case?

Then what is the best to do in my case? Basically I just want to get the irradiance value arriving to those “sensors”.

Many thanks for your help!

They should return the same result, as you expected. Were the rays you sent with the -i option in the correct direction to intersect the same surface points as those placed manually with the -I option? If so, then you may see random sampling differences, which are always present at some level.

Hum… I use matplotlib to plot the output. Results bellow (unit is W/m²)

image1
image2

The normals are identical except that I reverse normal for the -i option (assuming I want to get a front irrradiance value of a plane facing sun)

The difference seems too big to be a random sampling issue,

I’m sure I’m doing something wrong. But what?

How far above do you move the starting point with the -i rays? A distance of at least 1e-4 is recommended, since Radiance refuses to accept an intersection within 10^-6 of the ray origin. Also, why does your plot say “Upward with i”?

Just to check – what material is your polygon made of? The -i option will bypass “void” polygons or any surface made with a transparent (e.g., glass, trans) material.

  • The distance is 0.02.
  • For the plot it’s incorrect as the normal is pointing down indeed
  • For the material I put a plastic (1 1 1 0 0) and I also test with 0.1 0.1 0.1 0 0 without any difference.

If needed I can share the scene files (where?)

Thanks for you help!

If you can just put your polygon and rays used with -I and -i in your next post, that might be enough to sort out what’s going on.

-G

The geometry is affected by a transformation

!xform -t -7.2 -6.5 0 -rz -20

Here the polygon:

panneau polygon f_351_0
0
0
12
    0.189048  0.047821  4.233926
    2.143093  0.047552  4.234523
    2.142938  0.920014  4.310843
    0.188893  0.920283  4.310246

Here the sensor

-7.727733250579564839e+00 -3.589516392321150828e+00 4.272484500000000907e+00 3.163542923021915392e-04 8.714385717174903678e-02 -9.961956876423384566e-01

here the material

void plastic panneau
0
0
5 0.1 0.1 0.1 0.000 0.000

I just realized that I compute the normal of the polygon without affecting the transformation. Argh…

Here is the problem. Let me recompute the normals correctly and everything should be ok.

I will post the differences.

Sorry it was a stupid question then!

No worries – glad you found the problem. Mystery solved!

Time to have rest!

As a conclusion, here the result with the correct normal and result are identical as expected.

image
image

Many thanks stupid bugs are sometimes hard to find!

2 Likes