Unsure how to specify a trans modifier

Hi Everyone,

I'm trying to create a material with properties of a leaf - for a project examining countershading camouflage in animals, I've created model trees and I want them to be green in colour but with leaf-like transmission of light to the forest floor.

For example, I might want the colour to be [.3 .7 .1] and the transmission to be [.05 .25 .02].

Here's a mock-up of what I'm working on: https://www.dropbox.com/s/cidluvy1h8u7jqd/Horse_Trees_Panels.png.

To make it really obvious that light is passing through the material I've added the two floating panels, the left is opaque and the right one allows red light to pass through (at least it should, but I'm not getting any difference in the colour of the shadows).

Do I specify a colour plastic material and then a trans modifier and then the polygon? I've tried various script formats, so far when it doesn't crash I get no noticeable difference in the images with and without transmission specified as above.

Here's a script that just specifies a grey ground and the two green panels:

···

=======================================================

void plastic backgroundPolygon
0
5 0.2000 0.2000 0.2000 0.0000 0.2000

backgroundPolygon polygon rectangle_1v
0
12
     5000000.0000 -5000000.0000 000.0000
     5000000.0000 5000000.0000 000.0000
     -5000000.0000 5000000.0000 -00.0000
     -5000000.0000 -5000000.0000 -00.0000

void plastic backgroundPolygon
0
5 0.2000 0.7000 0.1000 0.0000 0.2000

backgroundPolygon polygon rectangle_1v
0
12
     500.0000 1000.0000 500.0000
     500.0000 2000.0000 500.0000
     -500.0000 2000.0000 500.0000
     -500.0000 1000.0000 500.0000

void trans rectangle_1i_trans
0
3
1.00 0.00 0.00

rectangle_1i_trans plastic backgroundPolygon
0
5 0.2000 0.7000 0.1000 0.0000 0.2000

backgroundPolygon polygon rectangle_1i
0
12
     500.0000 -2000.0000 500.0000
     500.0000 -1000.0000 500.0000
     -500.0000 -1000.0000 500.0000
     -500.0000 -2000.0000 500.0000

=======================================================

I'm clearly doing something wrong, but I've no idea exactly what.

Best wishes once again,

George

--
Dr P. George Lovell,

Lecturer in Psychology
University of Abertay Dundee
Dundee
DD1 1HG

Tel 01382-308581
Fax 01382-308749

Researcher/Co-investigator,
School of Psychology, University of St Andrews

RM 2.27 (The Yellow Room).
Phone (01334) 463056

Hi George,

That sounds like a very intriguing project - I look forward to seeing some of the results.

Trans is its own material, like plastic or metal. It can act as a modifier to a polygon, but not to another material (as far as I know). Here is one that I have used:

void trans frosted_glass
0
0
7 0.7 0.7 0.7 0 0.025 1 0.95

frosted_glass polygon rectangle_1
0
0
12 etc.

The 7 trans parameters are not extremely intuitive, but you can read about them in Axel Jacobs' excellent Radiance Cookbook (http://www.jaloxa.eu/resources/radiance/documentation/docs/radiance_cookbook.pdf).

In my case, I think they mean the following:
   -0.7 0.7 0.7: the RGB values for the light that is coloured (i.e., not specularly reflected or absorbed)
   -0: the specularity of the material (in my case 0, as I didn't want or require specular reflection)
   -0.025: the roughness (small, in my case, to account for scatter in the transmitted light)
   -1: trans; of the coloured light, how much is transmitted vs reflected (I didn't want or require light to be diffusely reflected)
   -0.05: tspec: how much of the transmitted light is specular: if you choose this to be one, it would act more like a regular glass panel. I chose 0.05 because I wanted model glass with highly diffusive properties

So of the light that hits this trans material:
   1. 30% is absorbed
   2. 70% is transmitted, with no colour: 95% is scattered, 5% transmitted like a normal ray (although technically, I think Radiance uses a curve determined by these two parameters to scatter the light)

This is not a very realistic material, it would appear entirely black from the outside. I used it only for interior modelling with a single surface so that was of no import to me, and I wanted to avoid fiddling with both the RGB values and trans to get the final transmittance right.

In your case, you will probably want to pick:
   -green RGB values, probably fairly low (weighted), as most of the non-green light is absorbed for photosynthesis
   -low specularity (<0.07)
   -low roughness (<0.025)
   -low trans value (depending on leaf properties, probably more light is reflected than transmitted, so 0.2-0.5?)
   -low tspec value (<0.1) because most of the transmitted light will be diffuse

I don't know if these properties have been measured for different kinds of leaves / plants, but I'd be interested to hear if they are.

Hope that helps,

Reinier

Message: 3

···

Date: Fri, 20 Sep 2013 11:51:16 +0100
From: P George Lovell <[email protected]>
To: Radiance general discussion <[email protected]>
Subject: [Radiance-general] Unsure how to specify a trans modifier
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi Everyone,

I'm trying to create a material with properties of a leaf - for a project examining countershading camouflage in animals, I've created model trees and I want them to be green in colour but with leaf-like transmission of light to the forest floor.

For example, I might want the colour to be [.3 .7 .1] and the transmission to be [.05 .25 .02].

Here's a mock-up of what I'm working on:
https://www.dropbox.com/s/cidluvy1h8u7jqd/Horse_Trees_Panels.png.

To make it really obvious that light is passing through the material I've added the two floating panels, the left is opaque and the right one allows red light to pass through (at least it should, but I'm not getting any difference in the colour of the shadows).

Do I specify a colour plastic material and then a trans modifier and then the polygon? I've tried various script formats, so far when it doesn't crash I get no noticeable difference in the images with and without transmission specified as above.

Here's a script that just specifies a grey ground and the two green panels:

=======================================================

void plastic backgroundPolygon
0
0
5 0.2000 0.2000 0.2000 0.0000 0.2000

backgroundPolygon polygon rectangle_1v
0
0
12
     5000000.0000 -5000000.0000 000.0000
     5000000.0000 5000000.0000 000.0000
     -5000000.0000 5000000.0000 -00.0000
     -5000000.0000 -5000000.0000 -00.0000

void plastic backgroundPolygon
0
0
5 0.2000 0.7000 0.1000 0.0000 0.2000

backgroundPolygon polygon rectangle_1v
0
0
12
     500.0000 1000.0000 500.0000
     500.0000 2000.0000 500.0000
     -500.0000 2000.0000 500.0000
     -500.0000 1000.0000 500.0000

void trans rectangle_1i_trans
0
0
3
1.00 0.00 0.00

rectangle_1i_trans plastic backgroundPolygon
0
0
5 0.2000 0.7000 0.1000 0.0000 0.2000

backgroundPolygon polygon rectangle_1i
0
0
12
     500.0000 -2000.0000 500.0000
     500.0000 -1000.0000 500.0000
     -500.0000 -1000.0000 500.0000
     -500.0000 -2000.0000 500.0000

=======================================================

I'm clearly doing something wrong, but I've no idea exactly what.

Best wishes once again,

George

--
Dr P. George Lovell,

Lecturer in Psychology
University of Abertay Dundee
Dundee
DD1 1HG

Tel 01382-308581
Fax 01382-308749

Researcher/Co-investigator,
School of Psychology, University of St Andrews

RM 2.27 (The Yellow Room).
Phone (01334) 463056

------------------------------

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

End of Radiance-general Digest, Vol 115, Issue 25
*************************************************

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit:


________________________________________________________________________

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:


________________________________________________________________________

Thank you Reinier,

That was really helpful. I have a large database of northern european woodland reflectance spectra (Parkkinnen et al, an IEEE paper), though unfortunately it's not labelled, so perhaps not that useful. Luckily I have a spectroradiometer so can go out and measure some target plants. In my example I made up my reflectances but the transmission data was from a maple leaf (http://www.apogeeinstruments.co.uk/content/transmissiongraph_large.jpg).

Thanks for the link to the book, it looks very useful! I think if I'd read more when I started using radiance four years ago, I wouldn't be stuck re-writing my Matlab wrapper now. All my previous Radiance models have been for simple visual stimuli for experiments so they have all been grey plastics. Now I need to re-tool for leaves I have to unwrap a lot of spaghetti-code!

But yes, the project is really fun, here's a summary of some early work <https://www.dropbox.com/s/mxkhw64wd3gkd7w/Lovell_et_al_IECASAB_Poster_A4_FINAL.pptx>.

Best wishes,

George

···

On 20/09/2013 12:28, Reinier Zeldenrust wrote:

Hi George,

That sounds like a very intriguing project - I look forward to seeing some of the results.

Trans is its own material, like plastic or metal. It can act as a modifier to a polygon, but not to another material (as far as I know). Here is one that I have used:

void trans frosted_glass
0
7 0.7 0.7 0.7 0 0.025 1 0.95

frosted_glass polygon rectangle_1
0
12 etc.

The 7 trans parameters are not extremely intuitive, but you can read about them in Axel Jacobs' excellent Radiance Cookbook (http://www.jaloxa.eu/resources/radiance/documentation/docs/radiance_cookbook.pdf).

In my case, I think they mean the following:
    -0.7 0.7 0.7: the RGB values for the light that is coloured (i.e., not specularly reflected or absorbed)
    -0: the specularity of the material (in my case 0, as I didn't want or require specular reflection)
    -0.025: the roughness (small, in my case, to account for scatter in the transmitted light)
    -1: trans; of the coloured light, how much is transmitted vs reflected (I didn't want or require light to be diffusely reflected)
    -0.05: tspec: how much of the transmitted light is specular: if you choose this to be one, it would act more like a regular glass panel. I chose 0.05 because I wanted model glass with highly diffusive properties

So of the light that hits this trans material:
    1. 30% is absorbed
    2. 70% is transmitted, with no colour: 95% is scattered, 5% transmitted like a normal ray (although technically, I think Radiance uses a curve determined by these two parameters to scatter the light)

This is not a very realistic material, it would appear entirely black from the outside. I used it only for interior modelling with a single surface so that was of no import to me, and I wanted to avoid fiddling with both the RGB values and trans to get the final transmittance right.

In your case, you will probably want to pick:
    -green RGB values, probably fairly low (weighted), as most of the non-green light is absorbed for photosynthesis
    -low specularity (<0.07)
    -low roughness (<0.025)
    -low trans value (depending on leaf properties, probably more light is reflected than transmitted, so 0.2-0.5?)
    -low tspec value (<0.1) because most of the transmitted light will be diffuse

I don't know if these properties have been measured for different kinds of leaves / plants, but I'd be interested to hear if they are.

Hope that helps,

Reinier

Message: 3
Date: Fri, 20 Sep 2013 11:51:16 +0100
From: P George Lovell <[email protected]>
To: Radiance general discussion <[email protected]>
Subject: [Radiance-general] Unsure how to specify a trans modifier
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi Everyone,

I'm trying to create a material with properties of a leaf - for a project examining countershading camouflage in animals, I've created model trees and I want them to be green in colour but with leaf-like transmission of light to the forest floor.

For example, I might want the colour to be [.3 .7 .1] and the transmission to be [.05 .25 .02].

Here's a mock-up of what I'm working on:
https://www.dropbox.com/s/cidluvy1h8u7jqd/Horse_Trees_Panels.png.

To make it really obvious that light is passing through the material I've added the two floating panels, the left is opaque and the right one allows red light to pass through (at least it should, but I'm not getting any difference in the colour of the shadows).

Do I specify a colour plastic material and then a trans modifier and then the polygon? I've tried various script formats, so far when it doesn't crash I get no noticeable difference in the images with and without transmission specified as above.

Here's a script that just specifies a grey ground and the two green panels:

=======================================================

void plastic backgroundPolygon
0
5 0.2000 0.2000 0.2000 0.0000 0.2000

backgroundPolygon polygon rectangle_1v
0
12
      5000000.0000 -5000000.0000 000.0000
      5000000.0000 5000000.0000 000.0000
      -5000000.0000 5000000.0000 -00.0000
      -5000000.0000 -5000000.0000 -00.0000

void plastic backgroundPolygon
0
5 0.2000 0.7000 0.1000 0.0000 0.2000

backgroundPolygon polygon rectangle_1v
0
12
      500.0000 1000.0000 500.0000
      500.0000 2000.0000 500.0000
      -500.0000 2000.0000 500.0000
      -500.0000 1000.0000 500.0000

void trans rectangle_1i_trans
0
3
1.00 0.00 0.00

rectangle_1i_trans plastic backgroundPolygon
0
5 0.2000 0.7000 0.1000 0.0000 0.2000

backgroundPolygon polygon rectangle_1i
0
12
      500.0000 -2000.0000 500.0000
      500.0000 -1000.0000 500.0000
      -500.0000 -1000.0000 500.0000
      -500.0000 -2000.0000 500.0000

=======================================================

I'm clearly doing something wrong, but I've no idea exactly what.

Best wishes once again,

George

--
Dr P. George Lovell,

Lecturer in Psychology
University of Abertay Dundee
Dundee
DD1 1HG

Tel 01382-308581
Fax 01382-308749

Researcher/Co-investigator,
School of Psychology, University of St Andrews

RM 2.27 (The Yellow Room).
Phone (01334) 463056

------------------------------

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

End of Radiance-general Digest, Vol 115, Issue 25
*************************************************

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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

--
Dr P. George Lovell,

Lecturer in Psychology
University of Abertay Dundee
Dundee
DD1 1HG

Tel 01382-308581
Fax 01382-308749

Researcher/Co-investigator,
School of Psychology, University of St Andrews

RM 2.27 (The Yellow Room).
Phone (01334) 463056

Hi George,

No problem at all. Was a good test of my own understanding as well.

Thanks for telling me a bit more about your project. I'm also doing some modelling of vegetation (hence my interest) but for a different purpose. I'm trying to determine how much light plants block (depending on the leaf density, etc.) and also how you well you can see glazing behind vegetation.

Did you know there are a few programs that create plants/trees? There is Tree-D (http://www.frecle.net/?show=treed.about), which is free, but I have not yet found a way to properly export correct leaf shapes. Then there is Onyx (http://www.onyxtree.com/index.html), but I have no experience with that yet. Do other people?

Also, can you send me a link to the papers with reflectance / transmission spectra? I wasn't able to find them myself.

Cheers,
Reinier

···

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:


________________________________________________________________________