# perfect specular reflection in rtrace

**URL:** <https://discourse.radiance-online.org/t/perfect-specular-reflection-in-rtrace/3874>\
**Category:** radiance-general\
**Created:** [October 12, 2017, 5:22pm UTC](https://discourse.radiance-online.org/t/perfect-specular-reflection-in-rtrace/3874 "2017-10-12T17:22:28Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antoine\_Bugeat](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/a/f17d59/32.png) [@Antoine\_Bugeat](https://discourse.radiance-online.org/u/Antoine_Bugeat)\
**Post date:** [October 12, 2017, 5:22pm UTC](https://discourse.radiance-online.org/t/perfect-specular-reflection-in-rtrace/3874/1 "2017-10-12T17:22:28Z")

</div>

Hello all,

I'm a civil engineering student and I'm trying to compute the impact of  
specular reflections in a street "canyon".  
My problem is:  
I use rtrace function with the basic parameters, the same as DAYSIM uses  
(-I -aa 0.1 -ab 5 -ad 1000 -ar 300 -as 20 -dj 0 -dr 5 -ds 0.2 -dp 512 -lr 6  
-lw 0.004 -st 0.1 -oov)  
My sky and sun description come from gendaylit.  
My wall is defined by a perfect specular plastic and the ground is defined  
by a diffuse material.

When I do the simulation, I get illogical results as if the specular  
reflection of the walls had no impact.

So, I tried to simulate a really simple scene with only one \*specular  
surface\*:

void plastic M\_Spec  
0  
0  
5 0 0 0 1 0

M\_Spec polygon 1  
0  
0  
12 -5.0 0.0 -5.0  
-5.0 0.0 5.0  
5.0 0.0 5.0  
5.0 0.0 -5.0

My \*source\* is described as a sun perfectly perpendicular to the surface:

void light solar  
0  
0  
3 1000 1000 1000

solar source sun  
0  
0  
4 0.0 -1.0 0.0 0.5

And the \*sensor\* is between the surface and the source and is regarding  
right to the surface:

0.0 -5.0 0.0 0.0 1.0 0.0

And in this case, I get 0 after my rtrace simulation.  
I tried to vary some parameters of rtrace (direct and specular parameters)  
but it change nothing I still get 0.

Thank you for your help.

Antoine Bugeat

---

<div class="post-metadata">

**Author:** ![Nathaniel\_Jones](https://discourse.radiance-online.org/user_avatar/discourse.radiance-online.org/nathaniel_jones/32/603_2.png) [@Nathaniel\_Jones](https://discourse.radiance-online.org/u/Nathaniel_Jones)\
**Post date:** [October 12, 2017, 6:02pm UTC](https://discourse.radiance-online.org/t/perfect-specular-reflection-in-rtrace/3874/2 "2017-10-12T18:02:20Z")

</div>

Hi Antoine,

Your plastic is completely black, so it won't reflect any light. You need  
to set the red, green, and blue values to be positive numbers. For  
instance, if you want a 50% reflective wall:

void plastic M\_Spec  
0  
0  
5 0.5 0.5 0.5 1 0

But is there a reason you're using plastic? Plastic that is 100% specular  
isn't realistic, and more to the point for your use, it won't give you very  
good reflections of small sources like the sun; for this, you will need to  
use a mirror material.

Nathaniel

> **···**
>
> On Thu, Oct 12, 2017 at 10:22 AM, Antoine Bugeat \<bugeatantoine@gmail.com\> wrote:
> 
> > Hello all,
> > 
> > I'm a civil engineering student and I'm trying to compute the impact of  
> > specular reflections in a street "canyon".  
> > My problem is:  
> > I use rtrace function with the basic parameters, the same as DAYSIM uses  
> > (-I -aa 0.1 -ab 5 -ad 1000 -ar 300 -as 20 -dj 0 -dr 5 -ds 0.2 -dp 512 -lr  
> > 6 -lw 0.004 -st 0.1 -oov)  
> > My sky and sun description come from gendaylit.  
> > My wall is defined by a perfect specular plastic and the ground is defined  
> > by a diffuse material.
> > 
> > When I do the simulation, I get illogical results as if the specular  
> > reflection of the walls had no impact.
> > 
> > So, I tried to simulate a really simple scene with only one \*specular  
> > surface\*:
> > 
> > void plastic M\_Spec  
> > 0  
> > 0  
> > 5 0 0 0 1 0
> > 
> > M\_Spec polygon 1  
> > 0  
> > 0  
> > 12 -5.0 0.0 -5.0  
> > -5.0 0.0 5.0  
> > 5.0 0.0 5.0  
> > 5.0 0.0 -5.0
> > 
> > My \*source\* is described as a sun perfectly perpendicular to the surface:
> > 
> > void light solar  
> > 0  
> > 0  
> > 3 1000 1000 1000
> > 
> > solar source sun  
> > 0  
> > 0  
> > 4 0.0 -1.0 0.0 0.5
> > 
> > And the \*sensor\* is between the surface and the source and is regarding  
> > right to the surface:
> > 
> > 0.0 -5.0 0.0 0.0 1.0 0.0
> > 
> > And in this case, I get 0 after my rtrace simulation.  
> > I tried to vary some parameters of rtrace (direct and specular parameters)  
> > but it change nothing I still get 0.
> > 
> > Thank you for your help.
> > 
> > Antoine Bugeat
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Radiance-general mailing list  
> > Radiance-general@radiance-online.org  
> > [https://www.radiance-online.org/mailman/listinfo/radiance-general](https://www.radiance-online.org/mailman/listinfo/radiance-general)

---

<div class="post-metadata">

**Author:** ![Thomas\_Bleicher2](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/t/7bcc69/32.png) [@Thomas\_Bleicher2](https://discourse.radiance-online.org/u/Thomas_Bleicher2)\
**Post date:** [October 12, 2017, 6:08pm UTC](https://discourse.radiance-online.org/t/perfect-specular-reflection-in-rtrace/3874/3 "2017-10-12T18:08:31Z")

</div>

Antoine

If you want to have the specular component considered in your numerical  
calculations you have to use a different material type, perhaps even  
'mirror'. IIRC the specular part in plastic is purely aesthetic but is not  
taken into account for numeric calculations.

Regards,  
Thomas

> **···**
>
> On Thu, Oct 12, 2017 at 12:22 PM, Antoine Bugeat \<bugeatantoine@gmail.com\> wrote:
> 
> > Hello all,
> > 
> > I'm a civil engineering student and I'm trying to compute the impact of  
> > specular reflections in a street "canyon".  
> > My problem is:  
> > I use rtrace function with the basic parameters, the same as DAYSIM uses  
> > (-I -aa 0.1 -ab 5 -ad 1000 -ar 300 -as 20 -dj 0 -dr 5 -ds 0.2 -dp 512 -lr  
> > 6 -lw 0.004 -st 0.1 -oov)  
> > My sky and sun description come from gendaylit.  
> > My wall is defined by a perfect specular plastic and the ground is defined  
> > by a diffuse material.
> > 
> > When I do the simulation, I get illogical results as if the specular  
> > reflection of the walls had no impact.
> > 
> > So, I tried to simulate a really simple scene with only one \*specular  
> > surface\*:
> > 
> > void plastic M\_Spec  
> > 0  
> > 0  
> > 5 0 0 0 1 0
> > 
> > M\_Spec polygon 1  
> > 0  
> > 0  
> > 12 -5.0 0.0 -5.0  
> > -5.0 0.0 5.0  
> > 5.0 0.0 5.0  
> > 5.0 0.0 -5.0
> > 
> > My \*source\* is described as a sun perfectly perpendicular to the surface:
> > 
> > void light solar  
> > 0  
> > 0  
> > 3 1000 1000 1000
> > 
> > solar source sun  
> > 0  
> > 0  
> > 4 0.0 -1.0 0.0 0.5
> > 
> > And the \*sensor\* is between the surface and the source and is regarding  
> > right to the surface:
> > 
> > 0.0 -5.0 0.0 0.0 1.0 0.0
> > 
> > And in this case, I get 0 after my rtrace simulation.  
> > I tried to vary some parameters of rtrace (direct and specular parameters)  
> > but it change nothing I still get 0.
> > 
> > Thank you for your help.
> > 
> > Antoine Bugeat
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Radiance-general mailing list  
> > Radiance-general@radiance-online.org  
> > [https://www.radiance-online.org/mailman/listinfo/radiance-general](https://www.radiance-online.org/mailman/listinfo/radiance-general)

---

<div class="post-metadata">

**Author:** ![Greg\_Ward](https://discourse.radiance-online.org/user_avatar/discourse.radiance-online.org/greg_ward/32/471_2.png) [@Greg\_Ward](https://discourse.radiance-online.org/u/Greg_Ward)\
**Post date:** [October 12, 2017, 6:10pm UTC](https://discourse.radiance-online.org/t/perfect-specular-reflection-in-rtrace/3874/4 "2017-10-12T18:10:34Z")

</div>

Hi Antoine,

It seems you are running up against the limitation of ray-tracing to find small sources such as the sun in specular surfaces.

There is a specific fix for this problem for flat surface in Radiance, which is the "virtual source" calculation. However, you need to use a special "mirror" type rather than "plastic" to enable this:

void mirror M\_Spec  
0  
0  
3 1 1 1

If you use this as your material, I think you will get the results you expect.

I should point out that a 100% specular material is not realistic. Polished metallic surfaces may reflect as much as 99% of light, but 100% is difficult to achieve without resorting to a prismatic dielectric film or similar.

Best,  
-Greg

> **···**
>
> > From: Antoine Bugeat \<bugeatantoine@gmail.com\>  
> > Date: October 12, 2017 10:22:28 AM PDT
> > 
> > Hello all,
> > 
> > I'm a civil engineering student and I'm trying to compute the impact of specular reflections in a street "canyon".  
> > My problem is:  
> > I use rtrace function with the basic parameters, the same as DAYSIM uses  
> > (-I -aa 0.1 -ab 5 -ad 1000 -ar 300 -as 20 -dj 0 -dr 5 -ds 0.2 -dp 512 -lr 6 -lw 0.004 -st 0.1 -oov)  
> > My sky and sun description come from gendaylit.  
> > My wall is defined by a perfect specular plastic and the ground is defined by a diffuse material.
> > 
> > When I do the simulation, I get illogical results as if the specular reflection of the walls had no impact.
> > 
> > So, I tried to simulate a really simple scene with only one specular surface:
> > 
> > void plastic M\_Spec  
> > 0  
> > 0  
> > 5 0 0 0 1 0
> > 
> > M\_Spec polygon 1  
> > 0  
> > 0  
> > 12 -5.0 0.0 -5.0  
> > &nbsp;&nbsp;-5.0 0.0 5.0  
> > &nbsp;&nbsp;5.0 0.0 5.0  
> > &nbsp;&nbsp;5.0 0.0 -5.0
> > 
> > My source is described as a sun perfectly perpendicular to the surface:
> > 
> > void light solar  
> > 0  
> > 0  
> > 3 1000 1000 1000
> > 
> > solar source sun  
> > 0  
> > 0  
> > 4 0.0 -1.0 0.0 0.5
> > 
> > And the sensor is between the surface and the source and is regarding right to the surface:
> > 
> > 0.0 -5.0 0.0 0.0 1.0 0.0
> > 
> > And in this case, I get 0 after my rtrace simulation.  
> > I tried to vary some parameters of rtrace (direct and specular parameters) but it change nothing I still get 0.
> > 
> > Thank you for your help.
> > 
> > Antoine Bugeat  
> > [https://www.radiance-online.org/mailman/listinfo/radiance-general](https://www.radiance-online.org/mailman/listinfo/radiance-general)

---

<div class="post-metadata">

**Author:** ![Jan\_Wienold](https://discourse.radiance-online.org/user_avatar/discourse.radiance-online.org/jan_wienold/32/472_2.png) [@Jan\_Wienold](https://discourse.radiance-online.org/u/Jan_Wienold)\
**Post date:** [October 12, 2017, 8:45pm UTC](https://discourse.radiance-online.org/t/perfect-specular-reflection-in-rtrace/3874/5 "2017-10-12T20:45:46Z")

</div>

Hi Antoine,  
specular reflections are not traced at all to light sources in the ambient calculation (which you invoke by -I). Only to glow material. Thats why also the reflections of the sun on glass-material is not captured by rtrace -I.  
So either you use mirror material and a -dr \>2 or you calculate a 180degree fisheye on you point and calculate the illuminace from the image. The view rays for the image are traced via specular surfaces towards light sources.  
Jan

> **···**
>
> On 12 October 2017 19:22:28 CEST, Antoine Bugeat \<bugeatantoine@gmail.com\> wrote:
> 
> > Hello all,
> > 
> > I'm a civil engineering student and I'm trying to compute the impact of  
> > specular reflections in a street "canyon".  
> > My problem is:  
> > I use rtrace function with the basic parameters, the same as DAYSIM  
> > uses  
> > (-I -aa 0.1 -ab 5 -ad 1000 -ar 300 -as 20 -dj 0 -dr 5 -ds 0.2 -dp 512  
> > -lr 6  
> > -lw 0.004 -st 0.1 -oov)  
> > My sky and sun description come from gendaylit.  
> > My wall is defined by a perfect specular plastic and the ground is  
> > defined  
> > by a diffuse material.
> > 
> > When I do the simulation, I get illogical results as if the specular  
> > reflection of the walls had no impact.
> > 
> > So, I tried to simulate a really simple scene with only one \*specular  
> > surface\*:
> > 
> > void plastic M\_Spec  
> > 0  
> > 0  
> > 5 0 0 0 1 0
> > 
> > M\_Spec polygon 1  
> > 0  
> > 0  
> > 12 -5.0 0.0 -5.0  
> > -5.0 0.0 5.0  
> > 5.0 0.0 5.0  
> > 5.0 0.0 -5.0
> > 
> > My \*source\* is described as a sun perfectly perpendicular to the  
> > surface:
> > 
> > void light solar  
> > 0  
> > 0  
> > 3 1000 1000 1000
> > 
> > solar source sun  
> > 0  
> > 0  
> > 4 0.0 -1.0 0.0 0.5
> > 
> > And the \*sensor\* is between the surface and the source and is regarding  
> > right to the surface:
> > 
> > 0.0 -5.0 0.0 0.0 1.0 0.0
> > 
> > And in this case, I get 0 after my rtrace simulation.  
> > I tried to vary some parameters of rtrace (direct and specular  
> > parameters)  
> > but it change nothing I still get 0.
> > 
> > Thank you for your help.
> > 
> > Antoine Bugeat
> 
> --  
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

---

<div class="post-metadata">

**Author:** ![Antoine\_Bugeat](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/a/f17d59/32.png) [@Antoine\_Bugeat](https://discourse.radiance-online.org/u/Antoine_Bugeat)\
**Post date:** [October 13, 2017, 3:02pm UTC](https://discourse.radiance-online.org/t/perfect-specular-reflection-in-rtrace/3874/6 "2017-10-13T15:02:20Z")

</div>

Hello all,

First, thank you very much for your quick answers.

If I understand correctly, among the possible options for solving my  
problem, the simplest is to replace the perfect specular "plastic" by a  
"mirror" material to have a "virtual source" calculation (I agree that 100%  
of reflection is totally not real but it's just for this case to understand  
the calculation).

void mirror M\_Spec  
0  
0  
3 1 1 1

But I still get 0...

As a reminder, I use these radiance parameters (the same as DAYSIM except  
that I increase the -dr):  
-I -aa 0.1 -ab 5 -ad 1000 -ar 300 -as 20 -dj 0 -dr 5 -ds 0.2 -dp 512 -lr 6  
-lw 0.004 -st 0.1 -oov

In parallel, I found a paper written by Roland Schregle (Lucerne University  
2015) with an extension of Radiance about photon mapping for caustics  
reflection. It looks pretty complex and I think (and I hope) that I can  
solve my problem without using this.

Best Regards,

Antoine

> **···**
>
> 2017-10-12 22:45 GMT+02:00 Jan Wienold \<jan.wienold@epfl.ch\>:
> 
> > Hi Antoine,  
> > specular reflections are not traced at all to light sources in the ambient  
> > calculation (which you invoke by -I). Only to glow material. Thats why also  
> > the reflections of the sun on glass-material is not captured by rtrace -I.  
> > So either you use mirror material and a -dr \>2 or you calculate a  
> > 180degree fisheye on you point and calculate the illuminace from the image.  
> > The view rays for the image are traced via specular surfaces towards light  
> > sources.  
> > Jan
> > 
> > On 12 October 2017 19:22:28 CEST, Antoine Bugeat \<bugeatantoine@gmail.com\> \> wrote:
> > 
> > > Hello all,
> > > 
> > > I'm a civil engineering student and I'm trying to compute the impact of  
> > > specular reflections in a street "canyon".  
> > > My problem is:  
> > > I use rtrace function with the basic parameters, the same as DAYSIM uses  
> > > (-I -aa 0.1 -ab 5 -ad 1000 -ar 300 -as 20 -dj 0 -dr 5 -ds 0.2 -dp 512  
> > > -lr 6 -lw 0.004 -st 0.1 -oov)  
> > > My sky and sun description come from gendaylit.  
> > > My wall is defined by a perfect specular plastic and the ground is  
> > > defined by a diffuse material.
> > > 
> > > When I do the simulation, I get illogical results as if the specular  
> > > reflection of the walls had no impact.
> > > 
> > > So, I tried to simulate a really simple scene with only one \*specular  
> > > surface\*:
> > > 
> > > void plastic M\_Spec  
> > > 0  
> > > 0  
> > > 5 0 0 0 1 0
> > > 
> > > M\_Spec polygon 1  
> > > 0  
> > > 0  
> > > 12 -5.0 0.0 -5.0  
> > > -5.0 0.0 5.0  
> > > 5.0 0.0 5.0  
> > > 5.0 0.0 -5.0
> > > 
> > > My \*source\* is described as a sun perfectly perpendicular to the surface:
> > > 
> > > void light solar  
> > > 0  
> > > 0  
> > > 3 1000 1000 1000
> > > 
> > > solar source sun  
> > > 0  
> > > 0  
> > > 4 0.0 -1.0 0.0 0.5
> > > 
> > > And the \*sensor\* is between the surface and the source and is regarding  
> > > right to the surface:
> > > 
> > > 0.0 -5.0 0.0 0.0 1.0 0.0
> > > 
> > > And in this case, I get 0 after my rtrace simulation.  
> > > I tried to vary some parameters of rtrace (direct and specular  
> > > parameters) but it change nothing I still get 0.
> > > 
> > > Thank you for your help.
> > > 
> > > Antoine Bugeat
> > 
> > --  
> > Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail  
> > gesendet.
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Radiance-general mailing list  
> > Radiance-general@radiance-online.org  
> > [https://www.radiance-online.org/mailman/listinfo/radiance-general](https://www.radiance-online.org/mailman/listinfo/radiance-general)

---

<div class="post-metadata">

**Author:** ![Greg\_Ward](https://discourse.radiance-online.org/user_avatar/discourse.radiance-online.org/greg_ward/32/471_2.png) [@Greg\_Ward](https://discourse.radiance-online.org/u/Greg_Ward)\
**Post date:** [October 13, 2017, 5:04pm UTC](https://discourse.radiance-online.org/t/perfect-specular-reflection-in-rtrace/3874/7 "2017-10-13T17:04:50Z")

</div>

Hi Antoine,

Using the mirror material should work, but I forgot to mention that it's a one-sided effect. You need to be looking at the front of your surface rather than the backside, which means the vertices need to be ordered counter-clockwise from the side you're looking at.

I didn't check initially, but the surface is the wrong way around from your selected evaluation point. Your sun is also on the wrong side. If you reverse the order of your polygon vertices, then it should work as expected.

The photon-mapping approach, which is now built into Radiance, should also work. It is a more complex solution, but necessary when the reflecting surfaces are curved.

Cheers,  
-Greg

> **···**
>
> > From: Antoine Bugeat \<bugeatantoine@gmail.com\>  
> > Date: October 13, 2017 8:02:20 AM PDT
> > 
> > Hello all,
> > 
> > First, thank you very much for your quick answers.
> > 
> > If I understand correctly, among the possible options for solving my problem, the simplest is to replace the perfect specular "plastic" by a "mirror" material to have a "virtual source" calculation (I agree that 100% of reflection is totally not real but it's just for this case to understand the calculation).
> > 
> > void mirror M\_Spec  
> > 0  
> > 0  
> > 3 1 1 1
> > 
> > But I still get 0...
> > 
> > As a reminder, I use these radiance parameters (the same as DAYSIM except that I increase the -dr):  
> > -I -aa 0.1 -ab 5 -ad 1000 -ar 300 -as 20 -dj 0 -dr 5 -ds 0.2 -dp 512 -lr 6 -lw 0.004 -st 0.1 -oov
> > 
> > In parallel, I found a paper written by Roland Schregle (Lucerne University 2015) with an extension of Radiance about photon mapping for caustics reflection. It looks pretty complex and I think (and I hope) that I can solve my problem without using this.
> > 
> > Best Regards,
> > 
> > Antoine
> > 
> > 2017-10-12 22:45 GMT+02:00 Jan Wienold \<jan.wienold@epfl.ch\>:  
> > Hi Antoine,  
> > specular reflections are not traced at all to light sources in the ambient calculation (which you invoke by -I). Only to glow material. Thats why also the reflections of the sun on glass-material is not captured by rtrace -I.  
> > So either you use mirror material and a -dr \>2 or you calculate a 180degree fisheye on you point and calculate the illuminace from the image. The view rays for the image are traced via specular surfaces towards light sources.  
> > Jan
> > 
> > On 12 October 2017 19:22:28 CEST, Antoine Bugeat \<bugeatantoine@gmail.com\> wrote:  
> > Hello all,
> > 
> > I'm a civil engineering student and I'm trying to compute the impact of specular reflections in a street "canyon".  
> > My problem is:  
> > I use rtrace function with the basic parameters, the same as DAYSIM uses  
> > (-I -aa 0.1 -ab 5 -ad 1000 -ar 300 -as 20 -dj 0 -dr 5 -ds 0.2 -dp 512 -lr 6 -lw 0.004 -st 0.1 -oov)  
> > My sky and sun description come from gendaylit.  
> > My wall is defined by a perfect specular plastic and the ground is defined by a diffuse material.
> > 
> > When I do the simulation, I get illogical results as if the specular reflection of the walls had no impact.
> > 
> > So, I tried to simulate a really simple scene with only one specular surface:
> > 
> > void plastic M\_Spec  
> > 0  
> > 0  
> > 5 0 0 0 1 0
> > 
> > M\_Spec polygon 1  
> > 0  
> > 0  
> > 12 -5.0 0.0 -5.0  
> > -5.0 0.0 5.0  
> > 5.0 0.0 5.0  
> > 5.0 0.0 -5.0
> > 
> > My source is described as a sun perfectly perpendicular to the surface:
> > 
> > void light solar  
> > 0  
> > 0  
> > 3 1000 1000 1000
> > 
> > solar source sun  
> > 0  
> > 0  
> > 4 0.0 -1.0 0.0 0.5
> > 
> > And the sensor is between the surface and the source and is regarding right to the surface:
> > 
> > 0.0 -5.0 0.0 0.0 1.0 0.0
> > 
> > And in this case, I get 0 after my rtrace simulation.  
> > I tried to vary some parameters of rtrace (direct and specular parameters) but it change nothing I still get 0.
> > 
> > Thank you for your help.
> > 
> > Antoine Bugeat

---

<div class="post-metadata">

**Author:** ![Antoine\_Bugeat](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/a/f17d59/32.png) [@Antoine\_Bugeat](https://discourse.radiance-online.org/u/Antoine_Bugeat)\
**Post date:** [October 24, 2017, 5:38pm UTC](https://discourse.radiance-online.org/t/perfect-specular-reflection-in-rtrace/3874/8 "2017-10-24T17:38:57Z")

</div>

Hello all,

Thanks again for your quick reply. Now I can model my street walls as a  
perfect specular materials ("mirror" materials) and obtain the results I  
expected.

I come back with an other problem:

The main purpose of my work is to compute the impact of the specular  
reflections in a street canyon.  
So, I would like to separate the light that comes from the reflections of  
the walls (only specular) and the light that comes directly from the sky  
(defined by "glow" material and "skyfunc"). I wanted to do a simulation  
with 0 reflection and an other simulation with 5 (or more) reflections. The  
results obtain with 0 reflection is directly the direct sky component and  
the substraction of 5 reflections - 0 reflections is the "environment" part.

I did the same process with a diffuse environment and it worked well. I  
changed the -ab parameter:  
-ab 1 to have the direct sky component (1 because of "glow" material);  
and -ab 5 to have the entire reflections in the environment.

\*But in the specular environment (with "mirror" wall) there is no  
difference between my "0 reflection" case and my "5 reflections" case\*  
I tried to change the parameters -ab -dr and -lr and it seems that all the  
reflections is computed whatever the parameters.

> From what I know, -ab is for "diffuse inter-reflections", -dr is for

"direct reflections", and -lr I don't know...

Obviously, I can replace the "0 reflection specular" case with the "0  
refelction diffuse" case because it should be exactly the same, but I would  
like to understand where this problem comes from.

I do not know if I was clear and precise in my explanation. I am available  
if you have questions.

Regards,

Antoine

> **···**
>
> 2017-10-13 19:04 GMT+02:00 Greg Ward \<gregoryjward@gmail.com\>:
> 
> > Hi Antoine,
> > 
> > Using the mirror material should work, but I forgot to mention that it's a  
> > one-sided effect. You need to be looking at the front of your surface  
> > rather than the backside, which means the vertices need to be ordered  
> > counter-clockwise from the side you're looking at.
> > 
> > I didn't check initially, but the surface is the wrong way around from  
> > your selected evaluation point. Your sun is also on the wrong side. If  
> > you reverse the order of your polygon vertices, then it should work as  
> > expected.
> > 
> > The photon-mapping approach, which is now built into Radiance, should also  
> > work. It is a more complex solution, but necessary when the reflecting  
> > surfaces are curved.
> > 
> > Cheers,  
> > -Greg
> > 
> > \*From: \*Antoine Bugeat \<bugeatantoine@gmail.com\>
> > 
> > \*Date: \*October 13, 2017 8:02:20 AM PDT
> > 
> > Hello all,
> > 
> > First, thank you very much for your quick answers.
> > 
> > If I understand correctly, among the possible options for solving my  
> > problem, the simplest is to replace the perfect specular "plastic" by a  
> > "mirror" material to have a "virtual source" calculation (I agree that 100%  
> > of reflection is totally not real but it's just for this case to understand  
> > the calculation).
> > 
> > void mirror M\_Spec  
> > 0  
> > 0  
> > 3 1 1 1
> > 
> > But I still get 0...
> > 
> > As a reminder, I use these radiance parameters (the same as DAYSIM except  
> > that I increase the -dr):  
> > -I -aa 0.1 -ab 5 -ad 1000 -ar 300 -as 20 -dj 0 -dr 5 -ds 0.2 -dp 512 -lr 6  
> > -lw 0.004 -st 0.1 -oov
> > 
> > In parallel, I found a paper written by Roland Schregle (Lucerne  
> > University 2015) with an extension of Radiance about photon mapping for  
> > caustics reflection. It looks pretty complex and I think (and I hope) that  
> > I can solve my problem without using this.
> > 
> > Best Regards,
> > 
> > Antoine
> > 
> > 2017-10-12 22:45 GMT+02:00 Jan Wienold \<jan.wienold@epfl.ch\>:
> > 
> > > Hi Antoine,  
> > > specular reflections are not traced at all to light sources in the  
> > > ambient calculation (which you invoke by -I). Only to glow material. Thats  
> > > why also the reflections of the sun on glass-material is not captured by  
> > > rtrace -I.  
> > > So either you use mirror material and a -dr \>2 or you calculate a  
> > > 180degree fisheye on you point and calculate the illuminace from the image.  
> > > The view rays for the image are traced via specular surfaces towards light  
> > > sources.  
> > > Jan
> > > 
> > > On 12 October 2017 19:22:28 CEST, Antoine Bugeat \<bugeatantoine@gmail.com\> \>\> wrote:
> > > 
> > > > Hello all,
> > > > 
> > > > I'm a civil engineering student and I'm trying to compute the impact of  
> > > > specular reflections in a street "canyon".  
> > > > My problem is:  
> > > > I use rtrace function with the basic parameters, the same as DAYSIM uses  
> > > > (-I -aa 0.1 -ab 5 -ad 1000 -ar 300 -as 20 -dj 0 -dr 5 -ds 0.2 -dp 512  
> > > > -lr 6 -lw 0.004 -st 0.1 -oov)  
> > > > My sky and sun description come from gendaylit.  
> > > > My wall is defined by a perfect specular plastic and the ground is  
> > > > defined by a diffuse material.
> > > > 
> > > > When I do the simulation, I get illogical results as if the specular  
> > > > reflection of the walls had no impact.
> > > > 
> > > > So, I tried to simulate a really simple scene with only one \*specular  
> > > > surface\*:
> > > > 
> > > > void plastic M\_Spec  
> > > > 0  
> > > > 0  
> > > > 5 0 0 0 1 0
> > > > 
> > > > M\_Spec polygon 1  
> > > > 0  
> > > > 0  
> > > > 12 -5.0 0.0 -5.0  
> > > > -5.0 0.0 5.0  
> > > > 5.0 0.0 5.0  
> > > > 5.0 0.0 -5.0
> > > > 
> > > > My \*source\* is described as a sun perfectly perpendicular to the  
> > > > surface:
> > > > 
> > > > void light solar  
> > > > 0  
> > > > 0  
> > > > 3 1000 1000 1000
> > > > 
> > > > solar source sun  
> > > > 0  
> > > > 0  
> > > > 4 0.0 -1.0 0.0 0.5
> > > > 
> > > > And the \*sensor\* is between the surface and the source and is regarding  
> > > > right to the surface:
> > > > 
> > > > 0.0 -5.0 0.0 0.0 1.0 0.0
> > > > 
> > > > And in this case, I get 0 after my rtrace simulation.  
> > > > I tried to vary some parameters of rtrace (direct and specular  
> > > > parameters) but it change nothing I still get 0.
> > > > 
> > > > Thank you for your help.
> > > > 
> > > > Antoine Bugeat
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Radiance-general mailing list  
> > Radiance-general@radiance-online.org  
> > [https://www.radiance-online.org/mailman/listinfo/radiance-general](https://www.radiance-online.org/mailman/listinfo/radiance-general)

---

<div class="post-metadata">

**Author:** ![Greg\_Ward](https://discourse.radiance-online.org/user_avatar/discourse.radiance-online.org/greg_ward/32/471_2.png) [@Greg\_Ward](https://discourse.radiance-online.org/u/Greg_Ward)\
**Post date:** [October 24, 2017, 6:46pm UTC](https://discourse.radiance-online.org/t/perfect-specular-reflection-in-rtrace/3874/9 "2017-10-24T18:46:48Z")

</div>

Hi Antoine,

Glad you got the basic mirror type working.

One thing you should take into consideration for your model is the Fresnel factor that affects how light reflects off glazing materials (building facades). The "mirror" type does not change its reflectance with angle, but coated and uncoated glazing materials do. There are exact calculations and approximations you can use, which you can apply as a "brightfunc" modifier to the "mirror" type.

To answer your question, though, the number of reflections or redirections from virtual source materials is controlled by the -dr rendering option. Set this to "-dr 0" if you do not wish to include any specular source redirections. You will still get reflections (even multiple reflections) of the sky, even if you set -ab 0. That's because the specular reflections don't count in the diffuse interreflection (ambient) calculation. To fully eliminate sky reflections, you'll need to set -lr 0.

Cheers,  
-Greg

> **···**
>
> > From: Antoine Bugeat \<bugeatantoine@gmail.com\>  
> > Date: October 24, 2017 10:38:57 AM PDT
> > 
> > Hello all,
> > 
> > Thanks again for your quick reply. Now I can model my street walls as a perfect specular materials ("mirror" materials) and obtain the results I expected.
> > 
> > I come back with an other problem:
> > 
> > The main purpose of my work is to compute the impact of the specular reflections in a street canyon.  
> > So, I would like to separate the light that comes from the reflections of the walls (only specular) and the light that comes directly from the sky (defined by "glow" material and "skyfunc"). I wanted to do a simulation with 0 reflection and an other simulation with 5 (or more) reflections. The results obtain with 0 reflection is directly the direct sky component and the substraction of 5 reflections - 0 reflections is the "environment" part.
> > 
> > I did the same process with a diffuse environment and it worked well. I changed the -ab parameter:  
> > -ab 1 to have the direct sky component (1 because of "glow" material);  
> > and -ab 5 to have the entire reflections in the environment.
> > 
> > But in the specular environment (with "mirror" wall) there is no difference between my "0 reflection" case and my "5 reflections" case  
> > I tried to change the parameters -ab -dr and -lr and it seems that all the reflections is computed whatever the parameters.  
> > From what I know, -ab is for "diffuse inter-reflections", -dr is for "direct reflections", and -lr I don't know...
> > 
> > Obviously, I can replace the "0 reflection specular" case with the "0 refelction diffuse" case because it should be exactly the same, but I would like to understand where this problem comes from.
> > 
> > I do not know if I was clear and precise in my explanation. I am available if you have questions.
> > 
> > Regards,
> > 
> > Antoine

---

<div class="post-metadata">

**Author:** ![Antoine\_Bugeat](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/a/f17d59/32.png) [@Antoine\_Bugeat](https://discourse.radiance-online.org/u/Antoine_Bugeat)\
**Post date:** [November 27, 2017, 4:58pm UTC](https://discourse.radiance-online.org/t/perfect-specular-reflection-in-rtrace/3874/10 "2017-11-27T16:58:19Z")

</div>

Hello

Thanks again for your help Greg

I still have not been able to solve my problem ...

To summarize my case, I have an environment composed only of surface  
"mirror" and a light source "glow" (the sky). I want to get only the  
radiation that comes directly from the source without any reflection.  
It seems that even with the parameters -ab 1 -dr 0 -lr 0 (-ab 1 because the  
sky is modeled with "glow") the radiation coming from the sky produces  
reflections in the scene.

I modeled the environment with the material "plastic" and it works  
perfectly. I'm almost sure that the problem comes from the material "glow"  
combined with materials "mirror" but I want to keep this configuration.

Regards,

Antoine

> **···**
>
> 2017-10-24 20:46 GMT+02:00 Greg Ward \<gregoryjward@gmail.com\>:
> 
> > Hi Antoine,
> > 
> > Glad you got the basic mirror type working.
> > 
> > One thing you should take into consideration for your model is the Fresnel  
> > factor that affects how light reflects off glazing materials (building  
> > facades). The "mirror" type does not change its reflectance with angle,  
> > but coated and uncoated glazing materials do. There are exact calculations  
> > and approximations you can use, which you can apply as a "brightfunc"  
> > modifier to the "mirror" type.
> > 
> > To answer your question, though, the number of reflections or redirections  
> > from virtual source materials is controlled by the -dr rendering option.  
> > Set this to "-dr 0" if you do not wish to include any specular source  
> > redirections. You will still get reflections (even multiple reflections)  
> > of the sky, even if you set -ab 0. That's because the specular reflections  
> > don't count in the diffuse interreflection (ambient) calculation. To fully  
> > eliminate sky reflections, you'll need to set -lr 0.
> > 
> > Cheers,  
> > -Greg
> > 
> > \*From: \*Antoine Bugeat \<bugeatantoine@gmail.com\>
> > 
> > \*Date: \*October 24, 2017 10:38:57 AM PDT
> > 
> > Hello all,
> > 
> > Thanks again for your quick reply. Now I can model my street walls as a  
> > perfect specular materials ("mirror" materials) and obtain the results I  
> > expected.
> > 
> > I come back with an other problem:
> > 
> > The main purpose of my work is to compute the impact of the specular  
> > reflections in a street canyon.  
> > So, I would like to separate the light that comes from the reflections of  
> > the walls (only specular) and the light that comes directly from the sky  
> > (defined by "glow" material and "skyfunc"). I wanted to do a simulation  
> > with 0 reflection and an other simulation with 5 (or more) reflections. The  
> > results obtain with 0 reflection is directly the direct sky component and  
> > the substraction of 5 reflections - 0 reflections is the "environment" part.
> > 
> > I did the same process with a diffuse environment and it worked well. I  
> > changed the -ab parameter:  
> > -ab 1 to have the direct sky component (1 because of "glow" material);  
> > and -ab 5 to have the entire reflections in the environment.
> > 
> > \*But in the specular environment (with "mirror" wall) there is no  
> > difference between my "0 reflection" case and my "5 reflections" case\*  
> > I tried to change the parameters -ab -dr and -lr and it seems that all the  
> > reflections is computed whatever the parameters.  
> > From what I know, -ab is for "diffuse inter-reflections", -dr is for  
> > "direct reflections", and -lr I don't know...
> > 
> > Obviously, I can replace the "0 reflection specular" case with the "0  
> > refelction diffuse" case because it should be exactly the same, but I would  
> > like to understand where this problem comes from.
> > 
> > I do not know if I was clear and precise in my explanation. I am available  
> > if you have questions.
> > 
> > Regards,
> > 
> > Antoine
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Radiance-general mailing list  
> > Radiance-general@radiance-online.org  
> > [https://www.radiance-online.org/mailman/listinfo/radiance-general](https://www.radiance-online.org/mailman/listinfo/radiance-general)

---

<div class="post-metadata">

**Author:** ![Greg\_Ward](https://discourse.radiance-online.org/user_avatar/discourse.radiance-online.org/greg_ward/32/471_2.png) [@Greg\_Ward](https://discourse.radiance-online.org/u/Greg_Ward)\
**Post date:** [November 27, 2017, 5:28pm UTC](https://discourse.radiance-online.org/t/perfect-specular-reflection-in-rtrace/3874/11 "2017-11-27T17:28:33Z")

</div>

Hi Antoine,

The "-lr 0" doesn't mean "zero reflections," but "no limit on reflections," so that's part of your problem. Setting "-dr 0" has no effect if you don't have any non-glow light sources. Offhand, I don't know how to compute what you're after other than temporarily replacing your mirror with a completely black surface.

Cheers,  
-Greg

> **···**
>
> > From: Antoine Bugeat \<bugeatantoine@gmail.com\>  
> > Date: November 27, 2017 8:58:19 AM PST
> > 
> > Hello
> > 
> > Thanks again for your help Greg
> > 
> > I still have not been able to solve my problem ...
> > 
> > To summarize my case, I have an environment composed only of surface "mirror" and a light source "glow" (the sky). I want to get only the radiation that comes directly from the source without any reflection.  
> > It seems that even with the parameters -ab 1 -dr 0 -lr 0 (-ab 1 because the sky is modeled with "glow") the radiation coming from the sky produces reflections in the scene.
> > 
> > I modeled the environment with the material "plastic" and it works perfectly. I'm almost sure that the problem comes from the material "glow" combined with materials "mirror" but I want to keep this configuration.
> > 
> > Regards,
> > 
> > Antoine
> > 
> > 2017-10-24 20:46 GMT+02:00 Greg Ward \<gregoryjward@gmail.com\>:  
> > Hi Antoine,
> > 
> > Glad you got the basic mirror type working.
> > 
> > One thing you should take into consideration for your model is the Fresnel factor that affects how light reflects off glazing materials (building facades). The "mirror" type does not change its reflectance with angle, but coated and uncoated glazing materials do. There are exact calculations and approximations you can use, which you can apply as a "brightfunc" modifier to the "mirror" type.
> > 
> > To answer your question, though, the number of reflections or redirections from virtual source materials is controlled by the -dr rendering option. Set this to "-dr 0" if you do not wish to include any specular source redirections. You will still get reflections (even multiple reflections) of the sky, even if you set -ab 0. That's because the specular reflections don't count in the diffuse interreflection (ambient) calculation. To fully eliminate sky reflections, you'll need to set -lr 0.
> > 
> > Cheers,  
> > -Greg
> > 
> > > From: Antoine Bugeat \<bugeatantoine@gmail.com\>  
> > > Date: October 24, 2017 10:38:57 AM PDT
> > > 
> > > Hello all,
> > > 
> > > Thanks again for your quick reply. Now I can model my street walls as a perfect specular materials ("mirror" materials) and obtain the results I expected.
> > > 
> > > I come back with an other problem:
> > > 
> > > The main purpose of my work is to compute the impact of the specular reflections in a street canyon.  
> > > So, I would like to separate the light that comes from the reflections of the walls (only specular) and the light that comes directly from the sky (defined by "glow" material and "skyfunc"). I wanted to do a simulation with 0 reflection and an other simulation with 5 (or more) reflections. The results obtain with 0 reflection is directly the direct sky component and the substraction of 5 reflections - 0 reflections is the "environment" part.
> > > 
> > > I did the same process with a diffuse environment and it worked well. I changed the -ab parameter:  
> > > -ab 1 to have the direct sky component (1 because of "glow" material);  
> > > and -ab 5 to have the entire reflections in the environment.
> > > 
> > > But in the specular environment (with "mirror" wall) there is no difference between my "0 reflection" case and my "5 reflections" case  
> > > I tried to change the parameters -ab -dr and -lr and it seems that all the reflections is computed whatever the parameters.  
> > > From what I know, -ab is for "diffuse inter-reflections", -dr is for "direct reflections", and -lr I don't know...
> > > 
> > > Obviously, I can replace the "0 reflection specular" case with the "0 refelction diffuse" case because it should be exactly the same, but I would like to understand where this problem comes from.
> > > 
> > > I do not know if I was clear and precise in my explanation. I am available if you have questions.
> > > 
> > > Regards,
> > > 
> > > Antoine
