splitting a render by light sources - rtcontrib

hi

i've trying out rtcontrib on this, but whatever settings i use i seem to get just a black screen out. if i run rpict witht the same settings (ie the same view and opt files) i get a good picture (although obviously using all the lights).
does anyone have any suggestions what i might be doing wrong?
thanks
will

ps i am just following the example usage of rtcontrib, given below.

Francesco Anselmo wrote:

···

Hi Will,

i am trying to use radiance to render a relatively simple model
geometrically - just a simple room, with a box sitting on the floor -
but with up to 100 or so light sources. but the difference is that i
want to get a separte image file for each light source - i.e. hundred
or so images, with only 1 light on in each. i will then use
superposition and recombine the images later, allowing me to vary the
intensities of each light source.

is there any kind of built in functionality in radiance to allow me to
do this, or do i have to write a shell script or something (and if so,
can anyone point me towards a good place to learn how! i come from a
very winndows based background)

Shell scripts would work, but Greg has recently added to Radiance rtcontrib:
http://radsite.lbl.gov/radiance/man_html/rtcontrib.1.html

This man page contains already a good starting example:

"
To generate a pair of images corresponding to two lights' contributions:

         vwrays -ff -x 1024 -y 1024 -vf best.vf | rtcontrib -ffc `vwrays -d -x
         1024 -y 1024 -vf best.vf` @render.opt -o c_%s.pic -m light1 -m light2
         scene.oct

These images may then be recombined using the desired outputs of light1
and light2:

         pcomb -c 100 90 75 c_light1.pic -c 50 55 57 c_light2.pic > com-
         bined.pic
"

--
Francesco

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

Hi Will,

Here are some ideas (although you probably know most already)

- make sure you have a recent head version
- make sure that the definitions of the materials are ok (if you want to separate 100 lights you need to define 100 light materials and use one material in each light)
- the actual names of the materials replace the "light1" "light2" in the example
- sometimes the image is too dark and you need to use "a" (for auto exposure) in ximage
- make sure the resolution is the same in both commands (I got this mistake)
- after "-fcc" is a backtick ` and the same after "best.vf" (in Unix this means "execute the command inside and return the result" or something like that)
- if you have too many lights, could be you don`t have enough descriptors, try the command "csh" (to enter cshell) and then "limit descriptors" (the result should be higher than the number of materials you want to define, but it`s probably more than 100)

just some ideas. it is probably none of the above. and it would surely help more information: what command you actually used, what result you get (any error message?) which OS, Radiance version, etc
HTH

Santiago

···

On Jan 24, 2006, at 11:48 PM, william reynolds wrote:

hi

i've trying out rtcontrib on this, but whatever settings i use i seem to get just a black screen out. if i run rpict witht the same settings (ie the same view and opt files) i get a good picture (although obviously using all the lights).
does anyone have any suggestions what i might be doing wrong?
thanks
will

ps i am just following the example usage of rtcontrib, given below.

Francesco Anselmo wrote:

Hi Will,

i am trying to use radiance to render a relatively simple model
geometrically - just a simple room, with a box sitting on the floor -
but with up to 100 or so light sources. but the difference is that i
want to get a separte image file for each light source - i.e. hundred
or so images, with only 1 light on in each. i will then use
superposition and recombine the images later, allowing me to vary the
intensities of each light source.

is there any kind of built in functionality in radiance to allow me to
do this, or do i have to write a shell script or something (and if so,
can anyone point me towards a good place to learn how! i come from a
very winndows based background)

Shell scripts would work, but Greg has recently added to Radiance rtcontrib:
http://radsite.lbl.gov/radiance/man_html/rtcontrib.1.html
This man page contains already a good starting example:
"
To generate a pair of images corresponding to two lights' contributions:
         vwrays -ff -x 1024 -y 1024 -vf best.vf | rtcontrib -ffc `vwrays -d -x
         1024 -y 1024 -vf best.vf` @render.opt -o c_%s.pic -m light1 -m light2
         scene.oct
These images may then be recombined using the desired outputs of light1
and light2:
         pcomb -c 100 90 75 c_light1.pic -c 50 55 57 c_light2.pic > com-
         bined.pic
"
--
Francesco
_______________________________________________
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

i've trying out rtcontrib on this, but whatever settings i use
i seem to get just a black screen out. if i run rpict witht the
same settings (ie the same view and opt files) i get a good
picture (although obviously using all the lights).
does anyone have any suggestions what i might be doing wrong?

Fist guess: Is the image realy black or just very,very dark?
    Remove all lights except "light1" and "light2"
    from the scene and check the rvu/rpict image.

Second guess: Do you have _materials_ in your scene that are
                 assocciated with lights and are the name those
                 you gave with the "-m" option?

For the example below the materials "light1" and "light2" should
be defined in your scene and used for i.e. a polygon or a sphere
("geometric primitives", first paragraph of the man page).

To generate a pair of images corresponding to two lights' contributions:
         vwrays -ff -x 1024 -y 1024 -vf best.vf | rtcontrib -ffc `vwrays -d -x
         1024 -y 1024 -vf best.vf` @render.opt -o c_%s.pic -m light1 -m light2
         scene.oct
These images may then be recombined using the desired outputs of light1
and light2:
         pcomb -c 100 90 75 c_light1.pic -c 50 55 57 c_light2.pic > com-
         bined.pic

Thomas

···

On 24.01.2006, at 15:48, william reynolds wrote:

hi all
so i managed to get rtcontrib to produce me a picture - it turned out to be a combination of the suggestions people wrote, but noteably the need to adjust the exposure.
however the image that i'm producing has terrible jagged edges to the lit area. (i'm using the spotlight primitive, with penumbras turned off - so i should get a clean, sharp pool of light on the wall.)
it looks to me much worse than aliassing, but i dont know whether thats true.
i have tried pfilt on the .pic file, reducing the size and adding a little gaussian blur, but that doesnt fix the problem.

does anyone have any suggestions?
here is my opt file for the rendering settings:
-dp 2048
-ar 64
-ms 0.13
-ds .2
-dt .05
-dc .75
-dr 3
-sj 1
-st .01
-ab 3
-af theatre.amb
-aa .125
-ad 512
-as 64
-av 0.062 0.062 0.062
-lr 12
-lw .0005
-av 0 0 0
-ad 500
-ab 10
-aa 0.01

and i'll happilly email anyone the .pic produced. (im assuming i cant put attachments on this list.)

while i'm writing, im a bit confused by the exposure settings for pfilt, perhaps someone could shed some light on that for me. i seem to be able to run:
pfilt -e 1 image.pic, and get a very bright image back, when i cant see anything but black in the original. - i thought that -e 1 would mean multiply by 1, so no change, is that wrong?

thanks for your help.
will

Thomas Bleicher wrote:

···

On 24.01.2006, at 15:48, william reynolds wrote:

hi

i've trying out rtcontrib on this, but whatever settings i use
i seem to get just a black screen out. if i run rpict witht the
same settings (ie the same view and opt files) i get a good
picture (although obviously using all the lights).
does anyone have any suggestions what i might be doing wrong?

Fist guess: Is the image realy black or just very,very dark?
        Remove all lights except "light1" and "light2"
        from the scene and check the rvu/rpict image.

Second guess: Do you have _materials_ in your scene that are
                  assocciated with lights and are the name those
                  you gave with the "-m" option?

For the example below the materials "light1" and "light2" should
be defined in your scene and used for i.e. a polygon or a sphere
("geometric primitives", first paragraph of the man page).

To generate a pair of images corresponding to two lights' contributions:
         vwrays -ff -x 1024 -y 1024 -vf best.vf | rtcontrib -ffc `vwrays -d -x
         1024 -y 1024 -vf best.vf` @render.opt -o c_%s.pic -m light1 -m light2
         scene.oct
These images may then be recombined using the desired outputs of light1
and light2:
         pcomb -c 100 90 75 c_light1.pic -c 50 55 57 c_light2.pic > com-
         bined.pic

Thomas

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

Hi Will,

You are correct that attachment sizes are limited on the mailing list, and people usually post JPEG images on a website somewhere when they want to share, if they have the option.

Please do send me your .pic file, so I can see what you're talking about.

Regarding pfilt, unless you use the -1 option, pfilt makes two passes on the file and applies and automatic scaling factor, which the -e option can modify. This should be explained in the man page, which comes with the distribution or may be found on the Radiance website at:
  
  http://radsite.lbl.gov/radiance/man_html/whatis.html

-Greg

···

From: william reynolds <[email protected]>
Date: January 28, 2006 3:44:56 PM PST

hi all
so i managed to get rtcontrib to produce me a picture - it turned out to be a combination of the suggestions people wrote, but noteably the need to adjust the exposure.
however the image that i'm producing has terrible jagged edges to the lit area. (i'm using the spotlight primitive, with penumbras turned off - so i should get a clean, sharp pool of light on the wall.)
it looks to me much worse than aliassing, but i dont know whether thats true.
i have tried pfilt on the .pic file, reducing the size and adding a little gaussian blur, but that doesnt fix the problem.

does anyone have any suggestions?
here is my opt file for the rendering settings:
-dp 2048
-ar 64
-ms 0.13
-ds .2
-dt .05
-dc .75
-dr 3
-sj 1
-st .01
-ab 3
-af theatre.amb
-aa .125
-ad 512
-as 64
-av 0.062 0.062 0.062
-lr 12
-lw .0005
-av 0 0 0
-ad 500
-ab 10
-aa 0.01

and i'll happilly email anyone the .pic produced. (im assuming i cant put attachments on this list.)

while i'm writing, im a bit confused by the exposure settings for pfilt, perhaps someone could shed some light on that for me. i seem to be able to run:
pfilt -e 1 image.pic, and get a very bright image back, when i cant see anything but black in the original. - i thought that -e 1 would mean multiply by 1, so no change, is that wrong?

thanks for your help.
will

Hi Will,

The reason you are seeing jagged edges to your spot is because the default "direct jitter" or "-dj" setting for rtcontrib is 0.5. (You may discover all the default values by typing "rtcontrib -defaults".) For spotlight's, the edges can be particularly strong, and I don't generally recommend this type unless you couple it with a light output distribution and set the cut-off past the natural cut-off of the fixture -- unless of course you are simply going for an artistic effect.

The -u+ option is recommended for rtcontrib, particularly when you are using it to render images, because the correlations between values will show up in odd ways on a 2-D image that would not be noticeable in a 1-D sample sequence. This is why your original rendering looks so odd.

As for the -e option of pfilt, it is used as an additional multiplier if auto-exposure is employed with the default -2 (pass) operation, so it is not completely overridden.

-Greg

···

From: william reynolds <[email protected]>
Date: January 29, 2006 8:45:42 AM PST

hi Greg

theatre.pic is the image with the jagged edges. the optfile is below from my post.

I have also put on another image which I have just generated (t2.pic, the command i generated it with is rtcontib_command, and the opt fiale was theatre.opt), using the -u+ option to rtcontrib. i gather this forces the use of purely mote carlo sampling, with no interpolation (is that right?). this seems to give a better image, but the edges (and indeed the areas in the scene lit entirely by interreflections) are very noisy. I have tried to reduce this by scaling down a large image and applying gaussian filtering to it with pfilt, and although this helps it doesnt really fix the issue.

let me know if there is anything else that i could send you to help, and thanks very much for your help.

regarding the exposure in pfilt - does the auto scaling factor overide a "-e 1" setting? i'm not sure i quite understand the bit in the man page. it doesnt really matter to me, but im curious!

thanks again, will

Greg
Thanks for your help. I will play with the -dj settings to get a better picture.

as for the spotlight type light, i am still at the "pretty basic" stage with my model - i will hopefully use real lighting fixture specs to model real instruments in the not too distant future! having said that, i dont really follow waht you mean by "set the cut-off past the natural cut- off of the fixture". could you explain a bit more please.

thanks once again
will

Gregory J. Ward wrote:

···

Hi Will,

The reason you are seeing jagged edges to your spot is because the default "direct jitter" or "-dj" setting for rtcontrib is 0.5. (You may discover all the default values by typing "rtcontrib - defaults".) For spotlight's, the edges can be particularly strong, and I don't generally recommend this type unless you couple it with a light output distribution and set the cut-off past the natural cut- off of the fixture -- unless of course you are simply going for an artistic effect.

The -u+ option is recommended for rtcontrib, particularly when you are using it to render images, because the correlations between values will show up in odd ways on a 2-D image that would not be noticeable in a 1-D sample sequence. This is why your original rendering looks so odd.

As for the -e option of pfilt, it is used as an additional multiplier if auto-exposure is employed with the default -2 (pass) operation, so it is not completely overridden.

-Greg

From: william reynolds <[email protected]>
Date: January 29, 2006 8:45:42 AM PST

hi Greg

theatre.pic is the image with the jagged edges. the optfile is below from my post.

I have also put on another image which I have just generated (t2.pic, the command i generated it with is rtcontib_command, and the opt fiale was theatre.opt), using the -u+ option to rtcontrib. i gather this forces the use of purely mote carlo sampling, with no interpolation (is that right?). this seems to give a better image, but the edges (and indeed the areas in the scene lit entirely by interreflections) are very noisy. I have tried to reduce this by scaling down a large image and applying gaussian filtering to it with pfilt, and although this helps it doesnt really fix the issue.

let me know if there is anything else that i could send you to help, and thanks very much for your help.

regarding the exposure in pfilt - does the auto scaling factor overide a "-e 1" setting? i'm not sure i quite understand the bit in the man page. it doesnt really matter to me, but im curious!

thanks again, will

Hi Will,

The spotlight type is designed to make the calculation more efficient by avoiding testing for light sources that don't stand to make a contribution. If you used the regular "light" type with a narrow spot fixture, it would check for source visibility at all angles, only finding out the contribution was zero afterwards. Using the spotlight source, you can preempt this test for angles past the normal cut-off of the fixture.

This is less important since the introduction of adaptive shadow ray testing way back in 1991, but it was left in there for legacy reasons and because the code is handy for the virtual light source handling, anyway. (Long story.)

-Greg

···

From: william reynolds <[email protected]>
Date: January 29, 2006 11:11:38 AM PST

Greg
Thanks for your help. I will play with the -dj settings to get a better picture.

as for the spotlight type light, i am still at the "pretty basic" stage with my model - i will hopefully use real lighting fixture specs to model real instruments in the not too distant future! having said that, i dont really follow waht you mean by "set the cut-off past the natural cut- off of the fixture". could you explain a bit more please.

thanks once again
will

Greg just pointed out that the spotlight is an unnatural light
source with an unrealistically sharp edge you won't find in any
physical fixture. So you should not use a spotlight if you want
to create a downlight in your scene and get realistic results.

You can modify the output distribution (and with this the "edge"
of the beam) of a spotlight with measured data and get a better
representation of a real world fixture. But you have to use a
spotlight angle that exceeds the angle of the fixture the data
was taken from or anything beyond the angle of the spotlight
will just be black.

Example: If your data shows a beam angle of 30 deg for the
fixture use an angle of more than 30 deg for the spotlight (add
5 or 10 deg to be sure you won't cut of small amounts of light
at the rim).

hth,

Thomas

···

On 29.01.2006, at 20:11, william reynolds wrote:

having said that, i dont really follow waht you mean by
"set the cut-off past the natural cut- off of the fixture".
could you explain a bit more please.

thanks once again
will