Rfluxmtx -x and -y input options

Hi all,

I was trying to run simulations for multiple test points but only the results for one test point was outputted from rfluxmtx. I then figured that setting the input value to -y as the number of test point worked.

So my questions are:

  • is it true that -y must be set as the same number of test points? I read the documentation from rtrace but still was not sure
  • I did not set value to -x. What’s the default value? And how -x is useful?

I don’t know too much about the fundamentals of ray tracing. So some simple explanation can be useful. Thanks everyone!

Hi Zha,

It’s difficult to answer your questions without more information about your problem. The -x and -y options serve multiple purposes in rcontrib, which is called by the pass-through mode of rfluxmtx. If you share your command, input file, and output, this would be helpful.

If you do not specify the -y option, then rfluxmtx should read until the end-of-file on input, and produce results appropriate to its other parameters and inputs. If you use rfluxmtx in sampling rather than pass-through mode, then the -x and -y options are ignored and have no effect.

Dear @Greg_Ward

Thank you very much for your reply.

Here is the command:

rfluxmtx -n 8 -y 5 -aa 0.25 -ab 3 -ad 5000 -ar 16 -as 128 -dc 0.25 -dj 0.0 -dp 64 -ds 0.5 -dr 0 -dt 0.5 -I -lr 4 -lw 2e-06 -c 1 -ss 0.0 -st 0.85 - rfluxsky.rad glz.mat glz.rad opq.mat opq.rad < testpts.pts > normal.dc

The file testpts.pts contains:

4 0.01 1.35 0 1 0
4 3 1.35 0 1 0
4 3 1.35 0 -1 0
4 3 1.35 1 0 0
4 3 1.35 -1 0 0 

I used to set y =1, then the normal.dc only output NROWS=1. The problem would only be solved if I set y = 5, which normal.dc contains NROWS=5.

Any comments, please?


Not related to the question above, I am wondering for gendaymtx module, why setting the option −c does not change the results?
For example:

gendaymtx -O0 -r 0.0 -m 1 -v -c 0.2 0.2 0.2  CAN_AB_Calgary.Intl.AP.718770
_CWEC2016.wea > total.smx

and

gendaymtx -O0 -r 0.0 -m 1 -v -c 1 1 1  CAN_AB_Calgary.Intl.AP.718770
_CWEC2016.wea > total.smx

both will produce the same results. So I am wondering if this is expected behavior? Only by changing the ground color option -g will be able to change the results.

Thank you for your help and for developing the software!

S

If you set -y N, then rfluxmtx will stop reading its input after N sample points. If you don’t set -y at all, then it will read to the end of the sample points. Also, your -aa, -as, -dt, and -dc settings are ignored, as they are not compatible with rcontrib.

Regarding the gendaymtx -c option, this should affect your sky patch colors, so the only possibility I can think of is that something is wrong with your other matrix. If normal.dc has zero coefficients for the sky, then the color of the sky would make no difference.

Dear @Greg_Ward,

Thank you for your reply.

The immediate output from gendaymtx (i.e. total.smx) remained identical even when I change the color option. I don’t think it is affected by normal.dc.

Thanks,

S

Oh, that does seem like an error. Can you share the WEA file you gave it? My quick test shows that the -c option is doing what it should do.

Dear @Greg_Ward:

Ahh, sorry I did not check them thoroughly. It appeared that the first few sets of values are identical but not all of them are identical… Anyway, here is the file: https://github.com/zha/public/blob/main/CAN_AB_Calgary.Intl.AP.718770_CWEC2016.wea

Another question about this is: If I use the default luminous efficacy of 179, should I just use the default color option (−c 0.960 1.004 1.118)?

Thank you very much.

S

Yes, I would generally leave the -c option alone, and it’s not a good idea to set it so the sum of RGB components is very different from 1.0 unless you have some specific thing you are testing. (Technically, 0.265R + 0.670G + 0.065*B should be 1.0)

The first several sets of value in the gendaymtx output will be the same, as you are looking at the first row, which is the ground.

Dear @Greg_Ward

May I please ask why the default is not 1 1 1? Because this will make 0.265 R + 0.670 G + 0.065*B perfectly equal to unity?

Also, when the RGB color options are identical (or near-identical), the RGB irradiance output from gendaymtx will also be identical, so in this case, can I just take either one of the three values and carry on with the rest of my calculations?

Thank you very much,

S
,

The only reason the default is not 1 1 1 is to give the sky a slight blue tint, which is more accurate if you are performing a color calculation. If all your surfaces are gray, then you can set -c 1 1 1 and just use any channel for the result as you suggest.

I see! Thank you very much @Greg_Ward

Happy holidays!