Questions concerning rcontrib & three-phase-method

Dear Radiance Users:
I am learning rcontrib & three-phase-method recently and I have a few
questions.

1) In rcontrib_less 4.3, I ran the command to produce point illuminance:
$ cat data/photocells.pts | rcontrib -h -I -fo @rtc.opt -e MF:1 -f
reinhart.cal -b rbin -o results/sensors/p%03d.dat -m sky_glow -w
restroom_whitesky1.oct

However, the error I got is:

rcontrib: fatal - unspecified or illegal bin count for modifier 'sky_glow'

2) In 3-phase-method, When I run the command to generate two view matrices:

$ vwrays -ff -vf views/back.vf -x 600 -y 600 | rcontrib 'vwrays -vf
views/back.vf -x 600 -y 600 -d' -ffc -fo -o images/vmx/window_%03d.hdr -f
klems_int.cal -b kbinS -bn Nkbins -m windowglow -ab 12 -ad 50000 -lw 2e-5
model_vmx.oct

I got: rcontrib: fatal - missing required modifier argument

I couldn't get much information to solve either of the issues above from
the mailing list. Any suggestion is appreciated.

Thank you,

···

--
*Zhe Kong*
*PhD Student*
*University of Wisconsin - Milwaukee *
*School of Architecture and Urban Planning *
*2131 E. Hartford Ave, Milwaukee, WI 53211 *
*Office 327*

Hello Zhe,

It's unfortunate that at the moment, we have only incomplete or withdrawn tutorials covering the 3-phase method. I hope we will be able to remedy this at some point. You are actually better off using rfluxmtx instead of rcontrib in most cases, as it simplifies operations and incorporates a more generalized version of genklemsamp.

For example, your first command, which must be the basic daylight coefficient (2-phase) method:

  cat data/photocells.pts | rcontrib -h -I -fo @rtc.opt -e MF:1 -f reinhart.cal -b rbin -o results/sensors/p%03d.dat -m sky_glow -w restroom_whitesky1.oct

will run if you add the option "-bn Nrbins" near the "-b" option above, but can be replaced with the simpler call to rfluxmtx:

  rfluxmtx -I @rtc.opt -w - sky.rad -i restroom_nosky.oct < data/photocells.pts

Do not forget the lone hyphen ('-') above -- it tells rfluxmtx to read the sender positions from stdin rather than generating them itself. Also, the receiver file "sky.rad" should not be included in the octree "restroom_nosky.oct", but should look like this:

···

##############
#@rfluxmtx o=results/sensors/daycoeff.dat

#@rfluxmtx h=u
void glow groundglow
0
0
4 1 1 1 0
groundglow source ground
0
0
4 0 0 -1 180

#@rfluxmtx h=r4 u=+Y
void glow skyglow
0
0
4 1 1 1 0
skyglow source sky
0
0
4 0 0 1 180
##############

The special comments are very important, as they tell rfluxmtx how to handle each hemisphere and what to do with the data. (You could also have used the -o option on the command line as before in this case.) Note that I have removed the "%d" from the file name, because you would have ended up with two sets of coefficients for each sensor point in bin #0. I am not sure about the rest of the commands in your sequence, so you'll have to figure out how to work with the rearranged output, which will now be in columns of triplets, one triplet for the ground followed by a triplet for each of the 145 sky patches. Each sensor will thus be represented by 146x3 coefficients in each row of the output matrix "results/sensors/daycoeff.dat".

Some of this is explained in my 2014 "What's New" talk from London:

  http://www.radiance-online.org/community/workshops/2014-london/presentations/day1/Ward_WhatIsNew.pdf

Your second command can also be replaced with a simpler rfluxmtx version, but the actual problem appears to be your substitution of single quotes (') in place of the special back-quote character (`) when you call vwrays with the -d option to set the output image dimensions.

Best,
-Greg

From: Zhe Kong <[email protected]>
Date: September 28, 2016 6:37:13 PM PDT

Dear Radiance Users:
I am learning rcontrib & three-phase-method recently and I have a few questions.

1) In rcontrib_less 4.3, I ran the command to produce point illuminance:
$ cat data/photocells.pts | rcontrib -h -I -fo @rtc.opt -e MF:1 -f reinhart.cal -b rbin -o results/sensors/p%03d.dat -m sky_glow -w restroom_whitesky1.oct
However, the error I got is:

rcontrib: fatal - unspecified or illegal bin count for modifier 'sky_glow'

2) In 3-phase-method, When I run the command to generate two view matrices:
$ vwrays -ff -vf views/back.vf -x 600 -y 600 | rcontrib 'vwrays -vf views/back.vf -x 600 -y 600 -d' -ffc -fo -o images/vmx/window_%03d.hdr -f klems_int.cal -b kbinS -bn Nkbins -m windowglow -ab 12 -ad 50000 -lw 2e-5 model_vmx.oct

I got: rcontrib: fatal - missing required modifier argument

I couldn't get much information to solve either of the issues above from the mailing list. Any suggestion is appreciated.

Thank you,

--
Zhe Kong
PhD Student
University of Wisconsin - Milwaukee
School of Architecture and Urban Planning
2131 E. Hartford Ave, Milwaukee, WI 53211
Office 327

1 Like

I spotted an error in my example file, which should have h=r1 rather than h=r4 to match your sampling case:

···

##############
#@rfluxmtx o=results/sensors/daycoeff.dat

#@rfluxmtx h=u
void glow groundglow
0
0
4 1 1 1 0
groundglow source ground
0
0
4 0 0 -1 180

#@rfluxmtx h=r1 u=+Y
void glow skyglow
0
0
4 1 1 1 0
skyglow source sky
0
0
4 0 0 1 180
##############

-Greg

Hello Greg:
Thank you very much for your quick and detailed response. I will try the
commands tonight.
Best,

Zhe

···

On Thu, Sep 29, 2016 at 2:00 PM, < [email protected]> wrote:

Send Radiance-general mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.radiance-online.org/mailman/listinfo/radiance-general
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Radiance-general digest..."

Today's Topics:

   1. Questions concerning rcontrib & three-phase-method (Zhe Kong)
   2. Re: Questions concerning rcontrib & three-phase-method (Greg Ward)
   3. Re: Questions concerning rcontrib & three-phase-method
      (Gregory J. Ward)

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

Message: 1
Date: Wed, 28 Sep 2016 20:37:13 -0500
From: Zhe Kong <[email protected]>
To: [email protected]
Subject: [Radiance-general] Questions concerning rcontrib &
        three-phase-method
Message-ID:
        <CAEV5Nyf_qXrKkLjmNoz9=HnEyF3hyCyMYVfW8-X2Jvv7_EzAyw@mail.
gmail.com>
Content-Type: text/plain; charset="utf-8"

Dear Radiance Users:
I am learning rcontrib & three-phase-method recently and I have a few
questions.

1) In rcontrib_less 4.3, I ran the command to produce point illuminance:
$ cat data/photocells.pts | rcontrib -h -I -fo @rtc.opt -e MF:1 -f
reinhart.cal -b rbin -o results/sensors/p%03d.dat -m sky_glow -w
restroom_whitesky1.oct

However, the error I got is:

rcontrib: fatal - unspecified or illegal bin count for modifier 'sky_glow'

2) In 3-phase-method, When I run the command to generate two view matrices:

$ vwrays -ff -vf views/back.vf -x 600 -y 600 | rcontrib 'vwrays -vf
views/back.vf -x 600 -y 600 -d' -ffc -fo -o images/vmx/window_%03d.hdr -f
klems_int.cal -b kbinS -bn Nkbins -m windowglow -ab 12 -ad 50000 -lw 2e-5
model_vmx.oct

I got: rcontrib: fatal - missing required modifier argument

I couldn't get much information to solve either of the issues above from
the mailing list. Any suggestion is appreciated.

Thank you,

--
*Zhe Kong*
*PhD Student*
*University of Wisconsin - Milwaukee *
*School of Architecture and Urban Planning *
*2131 E. Hartford Ave, Milwaukee, WI 53211 *
*Office 327*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-
general/attachments/20160928/fd238f0b/attachment-0001.html>

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

Message: 2
Date: Thu, 29 Sep 2016 11:20:26 -0700
From: Greg Ward <[email protected]>
To: Radiance general discussion <[email protected]>
Subject: Re: [Radiance-general] Questions concerning rcontrib &
        three-phase-method
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

Hello Zhe,

It's unfortunate that at the moment, we have only incomplete or withdrawn
tutorials covering the 3-phase method. I hope we will be able to remedy
this at some point. You are actually better off using rfluxmtx instead of
rcontrib in most cases, as it simplifies operations and incorporates a more
generalized version of genklemsamp.

For example, your first command, which must be the basic daylight
coefficient (2-phase) method:

        cat data/photocells.pts | rcontrib -h -I -fo @rtc.opt -e MF:1 -f
reinhart.cal -b rbin -o results/sensors/p%03d.dat -m sky_glow -w
restroom_whitesky1.oct

will run if you add the option "-bn Nrbins" near the "-b" option above,
but can be replaced with the simpler call to rfluxmtx:

        rfluxmtx -I @rtc.opt -w - sky.rad -i restroom_nosky.oct <
data/photocells.pts

Do not forget the lone hyphen ('-') above -- it tells rfluxmtx to read the
sender positions from stdin rather than generating them itself. Also, the
receiver file "sky.rad" should not be included in the octree
"restroom_nosky.oct", but should look like this:

##############
#@rfluxmtx o=results/sensors/daycoeff.dat

#@rfluxmtx h=u
void glow groundglow
0
0
4 1 1 1 0
groundglow source ground
0
0
4 0 0 -1 180

#@rfluxmtx h=r4 u=+Y
void glow skyglow
0
0
4 1 1 1 0
skyglow source sky
0
0
4 0 0 1 180
##############

The special comments are very important, as they tell rfluxmtx how to
handle each hemisphere and what to do with the data. (You could also have
used the -o option on the command line as before in this case.) Note that
I have removed the "%d" from the file name, because you would have ended up
with two sets of coefficients for each sensor point in bin #0. I am not
sure about the rest of the commands in your sequence, so you'll have to
figure out how to work with the rearranged output, which will now be in
columns of triplets, one triplet for the ground followed by a triplet for
each of the 145 sky patches. Each sensor will thus be represented by 146x3
coefficients in each row of the output matrix "results/sensors/daycoeff.dat"
.

Some of this is explained in my 2014 "What's New" talk from London:

        http://www.radiance-online.org/community/workshops/2014-
london/presentations/day1/Ward_WhatIsNew.pdf

Your second command can also be replaced with a simpler rfluxmtx version,
but the actual problem appears to be your substitution of single quotes (')
in place of the special back-quote character (`) when you call vwrays with
the -d option to set the output image dimensions.

Best,
-Greg

> From: Zhe Kong <[email protected]>
> Date: September 28, 2016 6:37:13 PM PDT
>
> Dear Radiance Users:
> I am learning rcontrib & three-phase-method recently and I have a few
questions.
>
> 1) In rcontrib_less 4.3, I ran the command to produce point illuminance:
> $ cat data/photocells.pts | rcontrib -h -I -fo @rtc.opt -e MF:1 -f
reinhart.cal -b rbin -o results/sensors/p%03d.dat -m sky_glow -w
restroom_whitesky1.oct
> However, the error I got is:
>
> rcontrib: fatal - unspecified or illegal bin count for modifier
'sky_glow'
>
>
> 2) In 3-phase-method, When I run the command to generate two view
matrices:
> $ vwrays -ff -vf views/back.vf -x 600 -y 600 | rcontrib 'vwrays -vf
views/back.vf -x 600 -y 600 -d' -ffc -fo -o images/vmx/window_%03d.hdr -f
klems_int.cal -b kbinS -bn Nkbins -m windowglow -ab 12 -ad 50000 -lw 2e-5
model_vmx.oct
>
> I got: rcontrib: fatal - missing required modifier argument
>
> I couldn't get much information to solve either of the issues above from
the mailing list. Any suggestion is appreciated.
>
> Thank you,
>
>
> --
> Zhe Kong
> PhD Student
> University of Wisconsin - Milwaukee
> School of Architecture and Urban Planning
> 2131 E. Hartford Ave, Milwaukee, WI 53211
> Office 327
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-
general/attachments/20160929/58515be2/attachment-0001.html>

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

Message: 3
Date: Thu, 29 Sep 2016 11:23:48 -0700
From: "Gregory J. Ward" <[email protected]>
To: Radiance general discussion <[email protected]>
Subject: Re: [Radiance-general] Questions concerning rcontrib &
        three-phase-method
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

I spotted an error in my example file, which should have h=r1 rather than
h=r4 to match your sampling case:

##############
#@rfluxmtx o=results/sensors/daycoeff.dat

#@rfluxmtx h=u
void glow groundglow
0
0
4 1 1 1 0
groundglow source ground
0
0
4 0 0 -1 180

#@rfluxmtx h=r1 u=+Y
void glow skyglow
0
0
4 1 1 1 0
skyglow source sky
0
0
4 0 0 1 180
##############

-Greg

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

Subject: Digest Footer

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

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

End of Radiance-general Digest, Vol 151, Issue 6
************************************************

--
*Zhe Kong*
*PhD Student*
*University of Wisconsin - Milwaukee *
*School of Architecture and Urban Planning *
*2131 E. Hartford Ave, Milwaukee, WI 53211 *
*Office 327*