water - any news???

"You might be able to get Radiance to find the sun for a still body of
water using the 'prism2' type, but you have to know what you're doing.
How important is this to you? If you're just going for looks and not
very interested in physical accuracy, go ahead and use 'glass'. At
least you will be able to see the bottom of your pool that way.
-Greg"

Just going through and old question... simulating water properly.

Did anybody do anything bout this in the last 10 years? Any news? All
still using glass?

For who may not know the interface/dielectric primitive struggle to
solve the direct light component, hence it is not trivial to simulate a
pool with Radiance.

We incidentally realized of this problem when dealing with water in
daytime, which indeed looks very dark...

(in fact for nighttimes shots a wavy mirror is often good looking
enough...)

Any input?

···

____________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses

Hi Guilio,

I'm still catching up with e-mail after a week's absence. This one also required some thought...

It would be a fair amount of work, but it's possible to use rtcontrib to give you a nice incident light field on the bottom of a swimming pool. You could then model this as a glow source and see it reflected back through the wavy dielectric surface of the water. If you were extra-ambitious, you could even model the water's surface as a height field, but it would have to be really choppy for that to even matter, visually.

I would have to spend some time to create an example of this approach, but the basic idea is to flag the surfaces defining the underwater portion of the pool so they can gather rays using rtcontrib. You would have to also define bin numbers corresponding to pixels in (5) low-resolution images you would create and map back onto the surfaces for subsequent rendering. The rays given to rtcontrib would correspond to the solar radiation on a rectangle covering the pool's surface. Normalization for this data would require a bit of math as well, but it's all doable. I won't call it easy.

-Greg

···

From: "Giulio Antonutto" <[email protected]>
Date: November 8, 2007 3:48:07 AM PST

“You might be able to get Radiance to find the sun for a still body ofwater using the 'prism2' type, but you have to know what you're doing.How important is this to you? If you're just going for looks and notvery interested in physical accuracy, go ahead and use 'glass'. Atleast you will be able to see the bottom of your pool that way.-Greg”
Just going through and old question… simulating water properly.

Did anybody do anything bout this in the last 10 years? Any news? All still using glass?

For who may not know the interface/dielectric primitive struggle to solve the direct light component, hence it is not trivial to simulate a pool with Radiance.

We incidentally realized of this problem when dealing with water in daytime, which indeed looks very dark…

(in fact for nighttimes shots a wavy mirror is often good looking enough…)

Any input?

>

Greg,
this is a great idea!
We will definitely look into it (perhaps not today but soon enough).
rtcontrib is just surprising every day with its potential...
thanks for your help,
and thanks for calling it 'not easy'...
this make a failure less of a problem
:slight_smile:
Ciao
G.

···

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Greg
Ward
Sent: 14 November 2007 04:02
To: Radiance general discussion
Subject: Re: [Radiance-general] water - any news???

Hi Guilio,

I'm still catching up with e-mail after a week's absence. This one
also required some thought...

It would be a fair amount of work, but it's possible to use rtcontrib
to give you a nice incident light field on the bottom of a swimming
pool. You could then model this as a glow source and see it
reflected back through the wavy dielectric surface of the water. If
you were extra-ambitious, you could even model the water's surface as
a height field, but it would have to be really choppy for that to
even matter, visually.

I would have to spend some time to create an example of this
approach, but the basic idea is to flag the surfaces defining the
underwater portion of the pool so they can gather rays using
rtcontrib. You would have to also define bin numbers corresponding
to pixels in (5) low-resolution images you would create and map back
onto the surfaces for subsequent rendering. The rays given to
rtcontrib would correspond to the solar radiation on a rectangle
covering the pool's surface. Normalization for this data would
require a bit of math as well, but it's all doable. I won't call it
easy.

-Greg

From: "Giulio Antonutto" <[email protected]>
Date: November 8, 2007 3:48:07 AM PST

"You might be able to get Radiance to find the sun for a still body
ofwater using the 'prism2' type, but you have to know what you're
doing.How important is this to you? If you're just going for looks
and notvery interested in physical accuracy, go ahead and use
'glass'. Atleast you will be able to see the bottom of your pool
that way.-Greg"
Just going through and old question... simulating water properly.

Did anybody do anything bout this in the last 10 years? Any news?
All still using glass?

For who may not know the interface/dielectric primitive struggle to
solve the direct light component, hence it is not trivial to
simulate a pool with Radiance.

We incidentally realized of this problem when dealing with water in
daytime, which indeed looks very dark...

(in fact for nighttimes shots a wavy mirror is often good looking
enough...)

Any input?

>

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general
____________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses

Hi Guilio,

If you're really going to attempt this, I can offer a few more pointers. For the underwater bin computations, you want bin numbers to correspond to colorpict pixels in scanline order. For the floor of the pool, you might define the following bin definition based on a 5x15 meter bottom with the origin at (0,0):

FloorXres : 50;
FloorYres : 150;
FloorWidth : 5 {meters};
FloorOrigX : 0;
FloorHeight : 15 {meters};
FloorOrigY : 0;
floor_bin = floor(FloorYres*(Py - FloorOrigY)/FloorHeight + .5)*FloorXres
      + floor(FloorXres*(Px - FloorOrigX)/FloorWidth + .5);

The same approach would be used for the walls of the pool, with slightly different coordinate mappings. You could put all these together in the same file, call it "pool_coords.cal". The rtcontrib command line would resemble this:

  vwrays -vf pool_par.vf -x 1000 -y 1000 -ff \
    > rtcontrib -V+ -ff -f pool_coords.cal \
      -b floor_bin -bn 7500 -o '!total -if22500 | pvalue -r -h +Y 150 +X 50 -df > floor_caustics.pic' -m floor \
      -b s_wall_bin -bn 3000 -o '!total -if9000 | pvalue -r -h +Y 30 +X 100 -df > s_wall_caustics.pic' -m s_wall \
      -b n_wall_bin -bn 3000 -o '!total -if9000 | pvalue -r -h +Y 30 +X 100 -df > n_wall_caustics.pic' -m n_wall \
      -b e_wall_bin -bn 5000 -o '!total -if15000 | pvalue -r -h +Y 50 +X 100 -df > e_wall_caustics.pic' -m e_wall \
      -b w_wall_bin -bn 5000 -o '!total -if15000 | pvalue -r -h +Y 50 +X 100 -df > w_wall_caustics.pic' -m w_wall \
      pool.oct

I made up the dimensions for the other surfaces, but I hope this makes sense. The actual view you use and resolution out of vwrays doesn't much matter, as it just gets summed up by "total" into the appropriate images. Note that the standard compile of "total" won't work, since it has a hard limit of 256 for the number of columns, and we're trying to sum RGB for each pixel, here. So, you'll have to recompile it and set MAXCOL to 22500 or greater to get this to work. If it does, maybe I'll consider a little rewrite of the utility to take away the column limit and make it dynamic. Bit of a hassle, but possibly worth it. I couldn't figure out how else to get this kind of result without a lot of scripting.

I expect most of the time in this command to be spent sending data between rtcontrib and the 5 "total" processes. The actual ray tracing part will shrink to insignificance.

Best of luck!
-Greg

runrtcont.csh (2.71 KB)

runsum.csh (572 Bytes)

sumpicture.csh (374 Bytes)

comp_pcargs.csh (1.42 KB)

···

------
Demostration of rtcontrib in two stages. The first computes
contributions as a function of angle from a window (divided into
three sections) and three skylights connected to a light pipe.
The second stage computes the incidence of sky illumination on these
portholes, and the results are combined. There are two main scripts,
run like so:

runrtcont.csh
runsums.csh

The first handles the two main stages, whose results are put into
src_cont/ and src_dc/ respectively. The second script combines
the results into daylight coefficient pictures in the dc_cont/
folder. A final script combines these into a result for a particular
date and time, e.g.:

sumpicture.csh 5 10 14:00PDT -g .12 > sunny5_10_14.pic

A P.S. to my last message. The total commands should have -of as well, to correspond to the -df of pvalue:

vwrays -vf pool_par.vf -x 1000 -y 1000 -ff \
  > rtcontrib -V+ -ff -f pool_coords.cal \
    -b floor_bin -bn 7500 -o '!total -if22500 -of | pvalue -r -h +Y 150 +X 50 -df > floor_caustics.pic' -m floor \
    -b s_wall_bin -bn 3000 -o '!total -if9000 -of | pvalue -r -h +Y 30 +X 100 -df > s_wall_caustics.pic' -m s_wall \
    -b n_wall_bin -bn 3000 -o '!total -if9000 -of | pvalue -r -h +Y 30 +X 100 -df > n_wall_caustics.pic' -m n_wall \
    -b e_wall_bin -bn 5000 -o '!total -if15000 -of | pvalue -r -h +Y 50 +X 100 -df > e_wall_caustics.pic' -m e_wall \
    -b w_wall_bin -bn 5000 -o '!total -if15000 -of | pvalue -r -h +Y 50 +X 100 -df > w_wall_caustics.pic' -m w_wall \
    pool.oct

I'm sure I made other mistakes as well, which you'll no doubt discover.

Also, the files I attached after my signature (assuming they made it) are from my "Applying the Radiance rtcontrib program" talk at last year's Radiance Workshop <http://www.radiance-online.org/radiance-workshop5/2006_Radiance_Workshop/>. These offer an example of applying rtcontrib in a similar context, where I've worked out the solid angle factors to get correct irradiance units.

-Greg

wow.
It sounds we have to do it now :slight_smile:
Ok, I will let you know of ours progress when (if) we solve it.
Thank you a lot for the continuous and extensive support!!!!
Ciao

···

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Greg
Ward
Sent: 14 November 2007 19:58
To: Radiance general discussion
Subject: [Radiance-general] Re: water - any news???

A P.S. to my last message. The total commands should have -of as
well, to correspond to the -df of pvalue:

vwrays -vf pool_par.vf -x 1000 -y 1000 -ff \
  > rtcontrib -V+ -ff -f pool_coords.cal \
    -b floor_bin -bn 7500 -o '!total -if22500 -of | pvalue
-r -h +Y 150
+X 50 -df > floor_caustics.pic' -m floor \
    -b s_wall_bin -bn 3000 -o '!total -if9000 -of | pvalue
-r -h +Y 30
+X 100 -df > s_wall_caustics.pic' -m s_wall \
    -b n_wall_bin -bn 3000 -o '!total -if9000 -of | pvalue
-r -h +Y 30
+X 100 -df > n_wall_caustics.pic' -m n_wall \
    -b e_wall_bin -bn 5000 -o '!total -if15000 -of | pvalue
-r -h +Y 50
+X 100 -df > e_wall_caustics.pic' -m e_wall \
    -b w_wall_bin -bn 5000 -o '!total -if15000 -of | pvalue
-r -h +Y 50
+X 100 -df > w_wall_caustics.pic' -m w_wall \
    pool.oct

I'm sure I made other mistakes as well, which you'll no doubt discover.

Also, the files I attached after my signature (assuming they made it)
are from my "Applying the Radiance rtcontrib program" talk at last
year's Radiance Workshop <http://www.radiance-online.org/radiance-
workshop5/2006_Radiance_Workshop/>. These offer an example of
applying rtcontrib in a similar context, where I've worked out the
solid angle factors to get correct irradiance units.

-Greg

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general
____________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses

Hi Guillio,

This got me thinking about rtcontrib some more, and I decided that having an option for accumulating values could be very useful in cases like this, so I added the -c switch. I just uploaded it into the CVS HEAD, and attached is a working example of a pool with caustics simulated on the bottom. You are welcome to use it however you like. (The rtcontrib -r option doesn't yet work with -c, but I'm on it.)

Best,
-Greg

pool.tar (20 KB)

This is extremely cool Greg! Just tried out your example scene, and will now look at the commands behind it...

- Rob

···

On Nov 16, 2007, at 6:21 PM, Greg Ward wrote:

Hi Guillio,

This got me thinking about rtcontrib some more, and I decided that having an option for accumulating values could be very useful in cases like this, so I added the -c switch. I just uploaded it into the CVS HEAD, and attached is a working example of a pool with caustics simulated on the bottom. You are welcome to use it however you like. (The rtcontrib -r option doesn't yet work with -c, but I'm on it.)

How do you generate the floor_caustics.pic from the files you uploaded? This is most interesting!

-Rob Shakespeare

···

On 11/16/07 11:16 PM, "Rob Guglielmetti" <[email protected]> wrote:

On Nov 16, 2007, at 6:21 PM, Greg Ward wrote:

Hi Guillio,

This got me thinking about rtcontrib some more, and I decided that
having an option for accumulating values could be very useful in
cases like this, so I added the -c switch. I just uploaded it into
the CVS HEAD, and attached is a working example of a pool with
caustics simulated on the bottom. You are welcome to use it
however you like. (The rtcontrib -r option doesn't yet work with -
c, but I'm on it.)

This is extremely cool Greg! Just tried out your example scene, and
will now look at the commands behind it...

- Rob

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

Hi Rob,

If you type "make" in the unpacked directory, the enclosed Makefile (attached with minor tweaks) will run the following commands:

oconv -f pool_surface.rad catchpool.rad > catchscene.oct
vwrays -pj .6 -vf pool_par.vf -x 500 -y 500 -ff \

rtcontrib -w -ffc -c -fo -n 1 \

                 -f pool_coords.cal -o %s_caustics.pic \
                 -b floor_bin -bn 7500 -x 50 -y 150 -m floor \
                 -b s_wall_bin -bn 1500 -x 50 -y 30 -m s_wall \
                 -b n_wall_bin -bn 1500 -x 50 -y 30 -m n_wall \
                 -b e_wall_bin -bn 4500 -x 150 -y 30 -m e_wall \
                 -b w_wall_bin -bn 4500 -x 150 -y 30 -m w_wall \
                 catchscene.oct
rm catchscene.oct
rad -o x11 poolscene.rif
  oconv sky.rad glowpool.rad pool_surface.rad > poolscene.oct
         rvu -vp -20 20 20 -vd 20 -20 -20 -vh 30 -vv 20 -ps 16 -pt .16 -dp 64 -ar 38 -ds 0 -dt .2 -dc .25 -dr 0 -sj 0 -st .5 -aa .3 -ad 256 -as 0 -av 17 17 17 -lr 6 -lw .01 -R poolscene.rif -o x11 -pe .03 poolscene.oct

This will produce 5 Radiance pictures, one for each wall. Since the defaults for rtcontrib set -ab 1, it will also consider some mutual interactions from the sunlight cast along the given parallel view (pool_par.vf). It does not include sky illuminance, which is probably a minor component, anyway. Adding that in would require a more sophisticated bombarding sampler than vwrays, or a mixfunc rather than a glow surface on the remodeling end.

The other cool thing the new rtcontrib -c option facilitates is optical system modeling, as in custom-designed luminaires. It would be interesting to compare to more specialized (& sophisticated) commercial ray-tracing systems.

-Greg

P.S. You need to download the latest HEAD of src/util/rtcontrib.c and recompile for this to work.

···

From: "Shakespeare, Robert A." <[email protected]>
Date: November 17, 2007 6:52:23 AM PST

How do you generate the floor_caustics.pic from the files you uploaded? This is most interesting!

-Rob Shakespeare

---------------------
#
# A swimming pool with caustics on the bottom
#

NPROCS = 1

CAUSTICS = floor_caustics.pic s_wall_caustics.pic n_wall_caustics.pic \
         e_wall_caustics.pic w_wall_caustics.pic

OBJF =

SCENEF = pool_surface.rad

view: glowpool.rad sky.rad $(SCENEF) $(OBJF) $(CAUSTICS)
         rad -o x11 poolscene.rif

pics: glowpool.rad sky.rad $(SCENEF) $(OBJF) $(CAUSTICS)
         rad -N $(NPROCS) poolscene.rif

$(CAUSTICS): catchpool.rad $(SCENEF) $(OBJF) pool_par.vf
         oconv -f $(SCENEF) catchpool.rad > catchscene.oct
         vwrays -pj .6 -vf pool_par.vf -x 500 -y 500 -ff \
                 > rtcontrib -w -ffc -c -fo -n $(NPROCS) \
                         -f pool_coords.cal -o %s_caustics.pic \
                         -b floor_bin -bn 7500 -x 50 -y 150 -m floor \
                         -b s_wall_bin -bn 1500 -x 50 -y 30 -m s_wall \
                         -b n_wall_bin -bn 1500 -x 50 -y 30 -m n_wall \
                         -b e_wall_bin -bn 4500 -x 150 -y 30 -m e_wall \
                         -b w_wall_bin -bn 4500 -x 150 -y 30 -m w_wall \
                         catchscene.oct
         rm catchscene.oct

That is a cool feature, Greg,
Using your files, I increased resolution, added a few spheres and rendered..
http://rastermon.livejournal.com/

Rob F

···

-----Original Message-----
From: [email protected] on behalf of Greg Ward
Sent: Sat 11/17/2007 9:16 AM
To: Radiance general discussion
Subject: Re: [Radiance-general] water - any news???

Hi Rob,

If you type "make" in the unpacked directory, the enclosed Makefile
(attached with minor tweaks) will run the following commands:

oconv -f pool_surface.rad catchpool.rad > catchscene.oct
vwrays -pj .6 -vf pool_par.vf -x 500 -y 500 -ff \

rtcontrib -w -ffc -c -fo -n 1 \

                 -f pool_coords.cal -o %s_caustics.pic \
                 -b floor_bin -bn 7500 -x 50 -y 150 -m floor \
                 -b s_wall_bin -bn 1500 -x 50 -y 30 -m s_wall \
                 -b n_wall_bin -bn 1500 -x 50 -y 30 -m n_wall \
                 -b e_wall_bin -bn 4500 -x 150 -y 30 -m e_wall \
                 -b w_wall_bin -bn 4500 -x 150 -y 30 -m w_wall \
                 catchscene.oct
rm catchscene.oct
rad -o x11 poolscene.rif
  oconv sky.rad glowpool.rad pool_surface.rad > poolscene.oct
         rvu -vp -20 20 20 -vd 20 -20 -20 -vh 30 -vv 20 -ps 16 -pt .
16 -dp 64 -ar 38 -ds 0 -dt .2 -dc .25 -dr 0 -sj 0 -st .5 -aa .3 -ad
256 -as 0 -av 17 17 17 -lr 6 -lw .01 -R poolscene.rif -o x11 -pe .03
poolscene.oct

This will produce 5 Radiance pictures, one for each wall. Since the
defaults for rtcontrib set -ab 1, it will also consider some mutual
interactions from the sunlight cast along the given parallel view
(pool_par.vf). It does not include sky illuminance, which is
probably a minor component, anyway. Adding that in would require a
more sophisticated bombarding sampler than vwrays, or a mixfunc
rather than a glow surface on the remodeling end.

The other cool thing the new rtcontrib -c option facilitates is
optical system modeling, as in custom-designed luminaires. It would
be interesting to compare to more specialized (& sophisticated)
commercial ray-tracing systems.

-Greg

P.S. You need to download the latest HEAD of src/util/rtcontrib.c
and recompile for this to work.

From: "Shakespeare, Robert A." <[email protected]>
Date: November 17, 2007 6:52:23 AM PST

How do you generate the floor_caustics.pic from the files you
uploaded? This is most interesting!

-Rob Shakespeare

---------------------
#
# A swimming pool with caustics on the bottom
#

NPROCS = 1

CAUSTICS = floor_caustics.pic s_wall_caustics.pic n_wall_caustics.pic \
         e_wall_caustics.pic w_wall_caustics.pic

OBJF =

SCENEF = pool_surface.rad

view: glowpool.rad sky.rad $(SCENEF) $(OBJF) $(CAUSTICS)
         rad -o x11 poolscene.rif

pics: glowpool.rad sky.rad $(SCENEF) $(OBJF) $(CAUSTICS)
         rad -N $(NPROCS) poolscene.rif

$(CAUSTICS): catchpool.rad $(SCENEF) $(OBJF) pool_par.vf
         oconv -f $(SCENEF) catchpool.rad > catchscene.oct
         vwrays -pj .6 -vf pool_par.vf -x 500 -y 500 -ff \
                 > rtcontrib -w -ffc -c -fo -n $(NPROCS) \
                         -f pool_coords.cal -o %s_caustics.pic \
                         -b floor_bin -bn 7500 -x 50 -y 150 -m floor \
                         -b s_wall_bin -bn 1500 -x 50 -y 30 -m s_wall \
                         -b n_wall_bin -bn 1500 -x 50 -y 30 -m n_wall \
                         -b e_wall_bin -bn 4500 -x 150 -y 30 -m e_wall \
                         -b w_wall_bin -bn 4500 -x 150 -y 30 -m w_wall \
                         catchscene.oct
         rm catchscene.oct

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