The means and functions of inputs for rtrace

Hi everyone,

I am new to Radiance and I have been learning the rtrace command recently. Based on the introduction of radiance_tutorial.pdf and manual pages, for the input of rtrace, the first 3 inputs are the coordinates of the measurement points. But I am confused about the last 3 inputs. What’s the function of the direction vector? Can someone please help to explain?

> xorg yorg zorg xdir ydir zdir

Cheers,

Hao

The first 3 coordinates are the origin of the sample ray, and the second three define the direction of the ray as a vector. The length of this vector, i.e., sqrt(xdir^2 + ydir^2 + zdir^2), is ignored by rtrace unless the -ld+ option is specified.

For example, a ray starting from the point (1,3,9) and directed at the zenith (+Z direction) would be given as:

1 3 9 0 0 1

Giving this to rtrace, it follows the ray to see what part of the scene it intersects, then (by default) computes the color of that point and returns it as an RGB triplet.

I hope this helps!
-Greg

1 Like

Hi Greg,

Wow~ Your reply is so clear. Now I thought I understood the means and functions of inputs of rtrace. Thanks so much for your assistance. I appreciate it.

Best regards,

Hao

Hi Greg,

Sorry to bother you again. As I get to know Radiance, I have a few more questions about the direction setting as the input for rtrace( the second three defining the direction of the ray as a vector) when option -I is used, as follows:

1)Can the value of direction only be set to 0, 1 or -1?
2) If the direction value of all rays for the working plane is set to 0 0 1, does it mean that only the lighting source above the working plane is considered? Besides, in this case, does it still consider the reflection from other surfaces (if -ab of retrace is more than 1)?
3) If the direction value of all rays for the working plane is set to 0 0 -1, does it mean that only the lighting source below the working plane is considered?
4) If my theory is correct, if the direction of all rays is set to -1 0 0, does it mean that only the lighting source on the surface (x 0 z) is considered?
5) No matter the setting of the direction of all rays, if the -ab of `retrace is set as more than 1, it still will consider the reflection of different surfaces within a room. Am I getting this right?

Thanks in advance for your time and effort!

Warm regards,

Hao

When run with the -I option, you instruct rtrace to behave like an illuminance meter (also known as a lux meter)

The first triplet (x, y, z) of numbers you feed into rtrace are the 3d location of the sensor, and the second triplet (dx, dy, dz) are the direction of the sensor, which is a vector.

A lux meter will pick up light within a +/- 90 degree cone of the direction, i.e. within a hemisphere. However, light sources (incl. reflected light) closer to the vector (low angle of incidence) have a higher weighting factor than objects further away from the vector (high angle of incidence).

This is known as the ‘cosine correction’ of a light meter.

The number of sampling points for reflected light within the hemisphere is determined by the rtrace -ad option. Actual light sources (sun and artificial luminaires) are traced directly, since Radiance knows exactly where and how bright they are, as long as
a) they are not behind the sensor
b) they are not hidden by an object.

The direction vector does not need to be axis-aligned. It can point in any direction you like, depending on what you want to measure.

The science of measuring light is called Photometry. There are plenty of resources on the Internet.

A

2 Likes

Hi Hao,

I think you will find the Daylight Simulation chapter from the Radiance book useful. It is included in this PhD thesis as chapter 2 – Daylight simulation: validation, sky models and daylight coefficients. Although part of the book Rendering with Radiance, it should make sense as a standalone chapter. I’d also recommend much of the rest of the book also (if someone hasn’t already done so).

John

2 Likes

Hi Axle,

Thank you so much for your reply!

Your reply is consistent with my previous understanding of lighting-related knowledge. I will keep learning and trying different exercises to understand the flexible and diverse functions of Radiance.

Best regards,

Hao

Hi John,

Thanks a lot for your reply. I will follow your suggetion to read these reference.

Cheers,

Hao