IES2Rad questions

Hello,

I am trying to simulate a window optical daylighting system (LightLouver) in Radiance and am seeing some weird behaviour.

The IES file I am modeling is completely asymmetric and it appears as if Radiance treats the horizontal angles in a clockwise fashion whereas the IESNA standard is to treat the horizontal angles in a counter-clockwise fashion. A photometric representation of the file can be seen here:

http://home.comcast.net/~z.rogers/LiLo_photometric1.jpg

and here:

http://home.comcast.net/~z.rogers/LiLo_photometric2.jpg

This is an IES file that I made for a daylighting system that sits vertically in a window using a forward ray-tracing program (TracePro). I defined it with Type C photometry; the 0 vertical angle is perpendicular to the window pointing into the room and the 0 horizontal angle is up (+Z). The window is roughly 5' wide by 2' high and can be seen in these images as the blue rectangle. It is apparent that the main daylight distribution is entering the room, above the horizontal and angled to the left as it enters the space. This is as expected as this is for a south-west facade at noon. This illustrates that the IES file was defined with the horizontal angles proceeding in a counter-clockwise fashion according to a right-hand rule. And the the 0 horizontal angle is defined as up or in the direction of the smaller window dimension.

I then attempted to place this IES file into the room I am modeling, seen here:

http://home.comcast.net/~z.rogers/Lilo_room.jpg

which gives me this rendering (low quality but the distribution of light is apparent):

http://home.comcast.net/~z.rogers/lilo_e12pm_bad.gif

So my first question is relative to the 0 horizontal angle and which axis IES2RAD assumes for this. It reads in the source.cal file that +x axis is the 0 horizontal angle and the -y is the 90 deg angle. However, to get the rendering shown above I had to have my replmarks marker with +y up which seems to disagree with the header of the source.cal file. I also have to define the longer dimension as x and the shorter dimension as y, similarly in disagreement with the source.cal file header. When I try rendering it with +x as up I get a strange and obviously incorrect rendering. Is this a bug or am I mis-interpreting this?

My second question is relative the progression of horizontal angles. The rendering obviously disagrees with the photometric illustration as the light is entering the room to the right rather than to the left as it was in the photometric view and as it should be given my daylight conditions. Does Radiance treat the horizontal angles in a clockwise (left-hand rule) fashion or am I mis-interpretting this? IESNA does define the other way.

The fix I figured out for this second issue is in the source.cal file. Instead of this:

src_phi = mod( Atan2(Dy, -Dx) / DEGREE, 360 ); { 0-360 }

I made the -Dx a positive like this:

src_phi = mod( Atan2(Dy, Dx) / DEGREE, 360 ); { 0-360 }

and this gave me a rendering with the light going in the direction I was expecting.

One final question; anybody have a way to get Type B photometry into Radiance? It seems like IES2Rad does not like this type.

I hope all that made sense. Any help is much appreciated! I hope to see some of you at the upcoming conference!

Regards,
Zack

Hi Zack.

I haven't looked at IES files in a while so my memory is a bit mushy
and I can't go into the details of the standard as I don't have a copy.

But:

[...] However, to get the rendering shown above I had to have my replmarks
marker with +y up which seems to disagree with the header of the source.cal
file. I also have to define the longer dimension as x and the shorter dimension
as y, similarly in disagreement with the source.cal file header. When I try
rendering it with +x as up I get a strange and obviously incorrect rendering.
Is this a bug or am I mis-interpreting this?

I think it's ies2rad that creates the confusion here. In the man page it says:

"The light source geometry will always be centered at the origin aimed
in the negative z direction, with the 0 degree plane along the x axis."

This is fine for luminaires as they usually have their highest output in
negative z direction ('down') but define this in the IES file as 0 degree
vertical angle (the vertical angles start pointing down and then go up).
In your case ies2rad might simply have turned the z-axis around so that your
+z is now pointing down.

If you use replmarks to place your windows you have to define the longer
axis as x and the sorter will be y. This is just how replmarks works and
is independent of source.cal.

I used to check the Radiance renderings of luminaire files against a rendering
of another application like Dialux or Relux just to check if I did the placement
and rotation of the IES file right.

Regards,
Thomas

···

On 22 Sep 2007, at 04:39, Zack Rogers wrote:

I am away from my desk at the moment and will deal with this e-mail on my
return.

This message has been scanned by MailController - www.MailController.altohiway.com

I am away from my desk at the moment and will deal with this e-mail on my
return.

This message has been scanned by MailController - www.MailController.altohiway.com

Thanks for your response Thomas. I still think IES2rad is reading files differently than the standard (clockwise and with 0 as +y).

I did figure out the Type B photometry issue, seems this is only a problem within Rayfront. Using IES2rad outside of Rayfront does not have a problem, my apologies. Everything else shown was also done outside of Rayfront as I was wanting to eliminate this from the equation.

Regards,
Zack

Zack Rogers, P.E., IESNA, LEED AP
Daylighting Analysis Group Leader
Architectural Energy Corporation
2540 Frontier Avenue, Suite 201
Boulder, CO 80301 USA

tel (303)444-4149 ext. 435
fax (303)444-4304

···

-----Original Message-----
From: Thomas Bleicher [mailto:[email protected]]
Sent: Tuesday, September 25, 2007 2:56 PM
To: Radiance general discussion
Subject: Re: [Radiance-general] IES2Rad questions

Hi Zack.

I haven't looked at IES files in a while so my memory is a bit mushy
and I can't go into the details of the standard as I don't have a copy.

But:

On 22 Sep 2007, at 04:39, Zack Rogers wrote:

[...] However, to get the rendering shown above I had to have my
replmarks
marker with +y up which seems to disagree with the header of the
source.cal
file. I also have to define the longer dimension as x and the
shorter dimension
as y, similarly in disagreement with the source.cal file header.
When I try
rendering it with +x as up I get a strange and obviously incorrect
rendering.
Is this a bug or am I mis-interpreting this?

I think it's ies2rad that creates the confusion here. In the man page
it says:

"The light source geometry will always be centered at the origin
aimed
in the negative z direction, with the 0 degree plane along the x axis."

This is fine for luminaires as they usually have their highest output in
negative z direction ('down') but define this in the IES file as 0
degree
vertical angle (the vertical angles start pointing down and then go up).
In your case ies2rad might simply have turned the z-axis around so
that your
+z is now pointing down.

If you use replmarks to place your windows you have to define the longer
axis as x and the sorter will be y. This is just how replmarks works and
is independent of source.cal.

I used to check the Radiance renderings of luminaire files against a
rendering
of another application like Dialux or Relux just to check if I did
the placement
and rotation of the IES file right.

Regards,
Thomas

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Not IES2Rad - I think it's actually source.cal that reads the angles differently. My apologies.

Zack Rogers, P.E., IESNA, LEED AP
Daylighting Analysis Group Leader
Architectural Energy Corporation
2540 Frontier Avenue, Suite 201
Boulder, CO 80301 USA

tel (303)444-4149 ext. 435
fax (303)444-4304

···

-----Original Message-----
From: Zack Rogers
Sent: Wednesday, September 26, 2007 10:41 AM
To: radiance-general
Subject: RE: [Radiance-general] IES2Rad questions

Thanks for your response Thomas. I still think IES2rad is reading files differently than the standard (clockwise and with 0 as +y).

I did figure out the Type B photometry issue, seems this is only a problem within Rayfront. Using IES2rad outside of Rayfront does not have a problem, my apologies. Everything else shown was also done outside of Rayfront as I was wanting to eliminate this from the equation.

Regards,
Zack

Zack Rogers, P.E., IESNA, LEED AP
Daylighting Analysis Group Leader
Architectural Energy Corporation
2540 Frontier Avenue, Suite 201
Boulder, CO 80301 USA

tel (303)444-4149 ext. 435
fax (303)444-4304

-----Original Message-----
From: Thomas Bleicher [mailto:[email protected]]
Sent: Tuesday, September 25, 2007 2:56 PM
To: Radiance general discussion
Subject: Re: [Radiance-general] IES2Rad questions

Hi Zack.

I haven't looked at IES files in a while so my memory is a bit mushy
and I can't go into the details of the standard as I don't have a copy.

But:

On 22 Sep 2007, at 04:39, Zack Rogers wrote:

[...] However, to get the rendering shown above I had to have my
replmarks
marker with +y up which seems to disagree with the header of the
source.cal
file. I also have to define the longer dimension as x and the
shorter dimension
as y, similarly in disagreement with the source.cal file header.
When I try
rendering it with +x as up I get a strange and obviously incorrect
rendering.
Is this a bug or am I mis-interpreting this?

I think it's ies2rad that creates the confusion here. In the man page
it says:

"The light source geometry will always be centered at the origin
aimed
in the negative z direction, with the 0 degree plane along the x axis."

This is fine for luminaires as they usually have their highest output in
negative z direction ('down') but define this in the IES file as 0
degree
vertical angle (the vertical angles start pointing down and then go up).
In your case ies2rad might simply have turned the z-axis around so
that your
+z is now pointing down.

If you use replmarks to place your windows you have to define the longer
axis as x and the sorter will be y. This is just how replmarks works and
is independent of source.cal.

I used to check the Radiance renderings of luminaire files against a
rendering
of another application like Dialux or Relux just to check if I did
the placement
and rotation of the IES file right.

Regards,
Thomas

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Zack,

Sorry for the late response, but as I mentioned at the workshop, I was out of the country.

Have a look at the following change, made back in 4/93:

  http://www.radiance-online.org/cgi-bin/viewcvs.cgi/ray/src/cv/source.cal.diff?r1=2.5&r2=2.6

When you say that Type C photometry is measured in the counter-clockwise direction, do you mean as seen from below (looking in the positive-Z direction)? If so, then the comment at the top of source.cal is correct, but it looks like I messed up on the actual definition of phi, which should be:

  src_phi = mod( atan2(-Dy, Dx) / DEGREE, 360 ); { 0-360 }

rather than what it is, now. I'm really confused, because this is effectively what I had before I made the "correction," since I also had a -my transform prior to 4/93. I don't know where my copy of LM-63 is, if I even still have it, so if the above line works for you, perhaps I should just change source.cal to agree with its comment...

-Greg

···

From: Zack Rogers <[email protected]>
Date: September 21, 2007 8:39:34 PM PDT

Hello,

I am trying to simulate a window optical daylighting system (LightLouver) in Radiance and am seeing some weird behaviour.

The IES file I am modeling is completely asymmetric and it appears as if Radiance treats the horizontal angles in a clockwise fashion whereas the IESNA standard is to treat the horizontal angles in a counter-clockwise fashion. A photometric representation of the file can be seen here:

http://home.comcast.net/~z.rogers/LiLo_photometric1.jpg

and here:

http://home.comcast.net/~z.rogers/LiLo_photometric2.jpg

This is an IES file that I made for a daylighting system that sits vertically in a window using a forward ray-tracing program (TracePro). I defined it with Type C photometry; the 0 vertical angle is perpendicular to the window pointing into the room and the 0 horizontal angle is up (+Z). The window is roughly 5' wide by 2' high and can be seen in these images as the blue rectangle. It is apparent that the main daylight distribution is entering the room, above the horizontal and angled to the left as it enters the space. This is as expected as this is for a south-west facade at noon. This illustrates that the IES file was defined with the horizontal angles proceeding in a counter-clockwise fashion according to a right-hand rule. And the the 0 horizontal angle is defined as up or in the direction of the smaller window dimension.

I then attempted to place this IES file into the room I am modeling, seen here:

http://home.comcast.net/~z.rogers/Lilo_room.jpg

which gives me this rendering (low quality but the distribution of light is apparent):

http://home.comcast.net/~z.rogers/lilo_e12pm_bad.gif

So my first question is relative to the 0 horizontal angle and which axis IES2RAD assumes for this. It reads in the source.cal file that +x axis is the 0 horizontal angle and the -y is the 90 deg angle. However, to get the rendering shown above I had to have my replmarks marker with +y up which seems to disagree with the header of the source.cal file. I also have to define the longer dimension as x and the shorter dimension as y, similarly in disagreement with the source.cal file header. When I try rendering it with +x as up I get a strange and obviously incorrect rendering. Is this a bug or am I mis-interpreting this?

My second question is relative the progression of horizontal angles. The rendering obviously disagrees with the photometric illustration as the light is entering the room to the right rather than to the left as it was in the photometric view and as it should be given my daylight conditions. Does Radiance treat the horizontal angles in a clockwise (left-hand rule) fashion or am I mis-interpretting this? IESNA does define the other way.

The fix I figured out for this second issue is in the source.cal file. Instead of this:

src_phi = mod( Atan2(Dy, -Dx) / DEGREE, 360 ); { 0-360 }

I made the -Dx a positive like this:

src_phi = mod( Atan2(Dy, Dx) / DEGREE, 360 ); { 0-360 }

and this gave me a rendering with the light going in the direction I was expecting.

One final question; anybody have a way to get Type B photometry into Radiance? It seems like IES2Rad does not like this type.

I hope all that made sense. Any help is much appreciated! I hope to see some of you at the upcoming conference!

Regards,
Zack