Questions about rcontrib compared to rtrace, and few more things

Hello,

I’m seeking advice from experts on using rcontrib for my tasks, as I’m encountering lower illuminance values compared to rtrace. Here’s what I’m doing: I’m rendering scenes with different solar positions for different timesteps and calculating luminance and illuminance at the sensor, of reflected sunlight on the facades outdoors. I’m only considering reflecting surfaces and the sun disk without diffused light from the sky dome and the ground.
I’m currently using the following parameter settings:
-dj 1 -ds 0.02 -dt 0 -dc 1 -dr 6 -dp 0 -st 0 -ab 5 -aa 0 -ar 0 -ad 4096 -as 1024 -lr 16 -lw 0
as recommended for accuracy in a study (Redirecting).

Pictures in falsecolor are below for the same time step, and specularly reflected sun disk in yellow color can be found as well as the maximum luminance and illuminance right above each picture.


Images made by rtrace.


Images made by rcontrib.

Here are the questions:

  1. When comparing results from rcontrib and rtrace, I notice that while the maximum luminance values are similar, rcontrib yields about 2/3 the illuminance intensity compared to rtrace. Based on the rendered images, it seems that it was because rcontrib may not fully perceive the solid angle of the reflected sun disk, but just part of it. How can I adjust rcontrib’s parameters to provide similar values to rtrace? In a similar question posed previously, someone suggested increasing the -ad parameter and decreasing the -lw parameter. However, my current parameter settings already have both of them set to their maximum values of 4096 and 0, respectively. (I assumed these were the technical maximum values, but if I’m mistaken, please correct me.)

  2. I need to simulate both specular and non-specular surfaces with BRDF. I’m currently adding the -ss 8 option for specular and -ss 0.7 for non-specular surfaces to the parameters mentioned above arbitrarily. Can someone provide advice on optimizing these parameters for both specular and non-specular cases?

Thank you for considering my questions!

Inwoo

If you are using BRDFs for your reflective surfaces, both specular and non-specular, the “specular” calculation is still the one that matters unless your BRDFs truly have a large, constant component over the full hemisphere. Also, are you modeling your solar source using a “light” material, or something else, like “glow”? Is it a single solar source, or many? We need more details about your model in other words.

Regarding your questions, you can set -ad to anything, but -as is forced to 0 in rcontrib (not rtrace). The -lw setting should be less than 1/ad with rcontrib and rtrace -aa 0. Setting -lw 0 just means all your ray trees will be 16-levels deep, which won’t matter in your case as you are looking at a single reflection from what I understand. More important is the -ss setting, which should probably be increased to -ss 64 or more in all cases. You can also try sending many rays and averaging them using rtrace, or similarly setting the -c option to some large number in rcontrib, which averages the results for you.

Hope this helps – you haven’t really provided enough detail in your question, and I don’t understand what the images are showing.

Best,
-Greg

1 Like

Thank you very much for your detailed explanation, Greg.

I’m currently utilizing a specular reflection model with the material file provided below.
The reflectance curve is defined as 0.09266+0.9312*exp(-5.3*Rdot) with 8% of reflectance for vertical incident angle.

void brightfunc glass_angular_effect
2 0.09266+0.9312*exp(-5.3*Rdot) .
0
1 0.08

glass_angular_effect mirror glass_mat
0
0
3 1 1 1

The earlier image was obtained under the condition of specular solar reflection. Now, with the BRDF material file I’m currently employing, the image resembles the one below. This BRDF is based on a tensor tree model.


BRDF-applied case

I’m generating suns at different time steps using gensky , making all suns act as light sources. I’m not utilizing any ground or sky rad files, hence the sky model only accounts for direct solar irradiance. And I was combining different timesteps with all corresponding suns in one octree file with different modifier names for different suns to utilize rcontrib.

In the meantime, I just conducted a test with non-zero -aa and -ar settings for rcontrib : -dj 1 -ds 0.02 -dt 0 -dc 1 -dr 6 -dp 0 -st 0 -ab 5 -aa 0.15 -ar 128 -ad 4096 -as 1024 -lr 16 -lw 0 -ss 8 . I noticed a significant improvement in the results, closely matching those obtained from ‘rtrace’ with zero -aa and -ar options (-dj 1 -ds 0.02 -dt 0 -dc 1 -dr 6 -dp 0 -st 0 -ab 5 -aa 0.15 -ar 128 -ad 4096 -as 1024 -lr 16 -lw 0 -ss 8) . This improvement seems to be directly linked to the fully rendered solid angle of the sun disk. You can compare it with the image rendered by rcontrib with -aa 0 -ar 0 in the first question above and observe the recovered solid angle of the sun.
Below is the image rendered by rtrace (zero -aa and -ar) and rcontrib (non-zero -aa and -ar) for the same timestep (sun position). And the illuminance value and sun disk shapes both look very similar, unlike the case in first question on the top of the page:


image rendered by rtrace.


The image with rcontrib and non -aa and -ar options.

And I’d like to ask if using non-zero -aa and -ar is the right direction in using rcontrib and would also appreciate detailed explanation how and why aa and ar make desirable result in this case.

And can I ask for further explain about the function of -ss here and why it should be the same or above 64?

Thank you for your help.

Inwoo

Hi Inwoo,

In your earlier calculation using the “mirror” type, Radiance knows exactly where to look for each light source and how big it is, so can produce an accurate estimate of the reflected flux. However, the 0.08 value in your first argument is not used for anything, and the normal reflectance is around 0.09731 by your formula. (To use the 0.08 value, you would have to call arg(1) or A1, which is equivalent.)

In the rcontrib settings you used, some are overridden as rcontrib does not use an ambient cache. If you follow your options by “-defaults,” you will get the following text:

% rcontrib -dj 1 -ds 0.02 -dt 0 -dc 1 -dr 6 -dp 0 -st 0 -ab 5 -aa 0.15 -ar 128 -ad 4096 -as 1024 -lr 16 -lw 0 -ss 8 -defaults
-c 1    			# accumulated rays per record
-V-				# output coefficients
-n 1 				# number of rendering processes
-x 0        			# flush interval
-y 0        			# y resolution
-ld-				# limit distance off
-h+				# output header
-faa				# format input/output = ascii/ascii
-w+				# warning messages on
-i-				# irradiance calculation off
-u+				# uncorrelated Monte Carlo sampling
-bv+				# back face visibility on
-dt 0.000000			# direct threshold
-dc 1.000000			# direct certainty
-dj 1.000000			# direct jitter
-ds 0.020000			# direct sampling
-dr 6        			# direct relays
-dp 0        			# direct pretest density
-dv+				# direct visibility on
-ss 8.000000			# specular sampling
-st 0.000000			# specular threshold
-av 0.000000 0.000000 0.000000	# ambient value
-aw 0        			# ambient value weight
-ab 5        			# ambient bounces
-aa 0.000000			# ambient accuracy
-ar 128      			# ambient resolution
-ad 4096     			# ambient divisions
-as 0        			# ambient super-samples
-me 0.00e+00 0.00e+00 0.00e+00	# mist extinction coefficient
-ma 0.000000 0.000000 0.000000	# mist scattering albedo
-mg 0.000000			# mist scattering eccentricity
-ms 0.000000			# mist sampling distance
-lr 16       			# limit reflection
-lw 0.00e+00			# limit weight
-am 0.0				# max photon search radius

As you can see, the -aa is reset to 0 as is -as (which I mentioned earlier). The -ar value is ignored, but -ab is still honored, so you will get at most 5 bounces from diffuse surfaces.

I am not sure why your results are better-matched this time, as I am not sure if the indirect calculation ever comes into play with your tests. It may be that you are just comparing the specular highlights computed by rcontrib and rtrace, which I would expect to be similar when using the same -ss parameter. The rest of the options should not matter so much as far as I can tell.

I would try increasing the -ss parameter, using the same settings for rtrace and rcontrib to see if your values converge.

Cheers,
-Greg

1 Like