# Cubical sky maps?

**URL:** <https://discourse.radiance-online.org/t/cubical-sky-maps/679>\
**Category:** radiance-general\
**Created:** [June 11, 2010, 4:57pm UTC](https://discourse.radiance-online.org/t/cubical-sky-maps/679 "2010-06-11T16:57:03Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![R\_Fritz1](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/r/b3f665/32.png) [@R\_Fritz1](https://discourse.radiance-online.org/u/R_Fritz1)\
**Post date:** [June 11, 2010, 4:57pm UTC](https://discourse.radiance-online.org/t/cubical-sky-maps/679/1 "2010-06-11T16:57:03Z")

</div>

Anyone using these? Anyone think these might be possible?

> **···**
>
> --  
> Randolph Fritz • [RFritz@lbl.gov](mailto:RFritz@lbl.gov)  
> Environmental Energy Technologies Division • Lawrence Berkeley Labs

---

<div class="post-metadata">

**Author:** ![Lars\_Grobe](https://discourse.radiance-online.org/user_avatar/discourse.radiance-online.org/lars_grobe/32/469_2.png) [@Lars\_Grobe](https://discourse.radiance-online.org/u/Lars_Grobe)\
**Post date:** [June 12, 2010, 9:41am UTC](https://discourse.radiance-online.org/t/cubical-sky-maps/679/2 "2010-06-12T09:41:27Z")

</div>

Should be possible, but why give up the advantages of the dimensionless source-object? With cubical maps you must think about where in you cube the scene is to be located, how much related error to accept, then, how to get the increased scene bounding box reflected in the ambient setting...

Cheers, Lars.

> **···**
>
> On 11.06.2010 18:57, R Fritz wrote:
> 
> > Anyone using these? Anyone think these might be possible?

---

<div class="post-metadata">

**Author:** ![R\_Fritz1](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/r/b3f665/32.png) [@R\_Fritz1](https://discourse.radiance-online.org/u/R_Fritz1)\
**Post date:** [June 13, 2010, 2:56pm UTC](https://discourse.radiance-online.org/t/cubical-sky-maps/679/3 "2010-06-13T14:56:16Z")

</div>

Thanks, Lars. The big reason for doing this is to make it possible to use a captured sky, and it's probably easier to keep the exterior housing containing cameras clean if it's got flat surfaces, than if it's a sphere.

> **···**
>
> On 2010-06-12 02:41:27 -0700, Lars O. Grobe said:
> 
> > On 11.06.2010 18:57, R Fritz wrote:
> > 
> > > Anyone using these? Anyone think these might be possible?
> > 
> > Should be possible, but why give up the advantages of the dimensionless source-object? With cubical maps you must think about where in you cube the scene is to be located, how much related error to accept, then, how to get the increased scene bounding box reflected in the ambient setting...
> 
> --  
> Randolph Fritz • RFritz@lbl.gov  
> Environmental Energy Technologies Division • Lawrence Berkeley Labs

---

<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:** [June 13, 2010, 4:13pm UTC](https://discourse.radiance-online.org/t/cubical-sky-maps/679/4 "2010-06-13T16:13:34Z")

</div>

Using a cube map and actually mapping a cube are separable issues. You don't need local geometry to do this in other words. The mapping, which you can translate pretty easily to a .cal file, is given in Paul Debevec's image-based lighting chapter in the HDR Imaging book, Section 9.4.4. Quoting:

World to Image:  
if Dz\<0 and Dz\<Dx and Dz\<Dy  
u = 1.5 - 0.5 \* Dx / Dz  
v = 2.5 - 0.5 \* Dy / Dz  
else if Dz\>0 and Dz\>Dx and Dz\>Dy  
u = 1.5 + 0.5 \* Dx / Dz  
v = 0.5 + 0.5 \* Dy / Dz  
else if Dy\<0 and Dy\<Dx and Dy\<Dz  
u = 1.5 + 0.5 \* Dx / Dy  
v = 1.5 - 0.5 \* Dz / Dy  
else if Dy\>0 and Dy\>Dx and Dy\>Dz  
u = 1.5 + 0.5 \* Dx / Dy  
v = 3.5 + 0.5 \* Dz / Dy  
else if Dx\<0 and Dx\<Dy and Dx\<Dz  
u = 0.5 - 0.5 \* Dz / Dx  
v = 2.5 + 0.5 \* Dy / Dx  
else if Dx\>0 and Dx\>Dy and Dx\>Dz  
u = 2.5 + 0.5 \* Dz / Dx  
v = 2.5 + 0.5 \* Dy / Dx

Image to World:  
if u\>=1 and u \<=2 and v\>=0 and v\<=1 // up  
Vx = (u - 0.5) \* 6  
Vy = 1.0  
Vz = (v - 0.125) \* -8  
else if u\>=0 and u \<=1 and v\>=1 and v\<=2 // left  
Vx = -1.0;  
Vy = (v - 0.375) \* -8;  
Vz = (u – 1/6) \* -6;  
else if u\>=1 and u \<=2 and v\>=1 and v\<=2 // forward  
Vx = (u - 0.5) \* 6;  
Vy = (v - 0.375) \* -8;  
Vz = -1.0;  
else if u\>=2 and u \<=3 and v\>=1 and v\<=2 // right  
Vx = 1.0;  
Vy = (v - 0.375) \* -8;  
Vz = (u – 5/6) \* 6;  
else if u\>=1 and u \<=2 and v\>=2 and v\<=4 // down  
Vx = (u - 0.5) \* 6;  
Vy = -1.0;  
Vz = (v - 0.625) \* 8;  
else if u\>=1 and u \<=2 and v\>=3 and v\<=4 // backward  
Vx = (u - 0.5) \* 6;  
Vy = (v - 0.875) \* 8;  
Vz = 1.0;  
normalize = 1 / sqrt(Vx \* Vx + Vy \* Vy + Vz \* Vz)  
Dx = normalize\* Vx  
Dy = normalize\* Vy  
Dz = normalize\* Vz

Best,  
-Greg

> **···**
>
> > From: R Fritz \<RFritz@lbl.gov\>  
> > Date: June 13, 2010 7:56:16 AM PDT
> > 
> > On 2010-06-12 02:41:27 -0700, Lars O. Grobe said:
> > 
> > > On 11.06.2010 18:57, R Fritz wrote:
> > > 
> > > > Anyone using these? Anyone think these might be possible?
> > > 
> > > Should be possible, but why give up the advantages of the dimensionless source-object? With cubical maps you must think about where in you cube the scene is to be located, how much related error to accept, then, how to get the increased scene bounding box reflected in the ambient setting...
> > 
> > Thanks, Lars. The big reason for doing this is to make it possible to use a captured sky, and it's probably easier to keep the exterior housing containing cameras clean if it's got flat surfaces, than if it's a sphere.

---

<div class="post-metadata">

**Author:** ![Lars\_Grobe](https://discourse.radiance-online.org/user_avatar/discourse.radiance-online.org/lars_grobe/32/469_2.png) [@Lars\_Grobe](https://discourse.radiance-online.org/u/Lars_Grobe)\
**Post date:** [June 14, 2010, 2:35pm UTC](https://discourse.radiance-online.org/t/cubical-sky-maps/679/5 "2010-06-14T14:35:58Z")

</div>

> Thanks, Lars. The big reason for doing this is to make it possible to  
> use a captured sky, and it's probably easier to keep the exterior  
> housing containing cameras clean if it's got flat surfaces, than if it's  
> a sphere.

I would be careful with that. If you have a dome with a wide-angle camera, transmission is about perpendicular for all directions. If you have a flat glass, it is not. Do you want to a cube-shaped box with five cameras?

Cheers, Lars.

---

<div class="post-metadata">

**Author:** ![John\_Mardaljevic1](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@John\_Mardaljevic1](https://discourse.radiance-online.org/u/John_Mardaljevic1)\
**Post date:** [June 14, 2010, 3:22pm UTC](https://discourse.radiance-online.org/t/cubical-sky-maps/679/6 "2010-06-14T15:22:07Z")

</div>

Randolph's query reminded me that I had a search for cheap domes a while ago. This is what I found:

[http://www.hammacher.com/publish/75098.asp?cm\_mmc=CJ-](http://www.hammacher.com/publish/75098.asp?cm_mmc=CJ-)_-1414665-_-1492714-\_-Hammacher+Schlemmer

Difficult to tell from the photo if it is optically suitable, though Fido looks quite happy. I'd be interested to hear if this is any good as a housing.

Woof woof!

-John

> **···**
>
> -----------------------------------------------  
> Dr. John Mardaljevic  
> Reader in Daylight Modelling  
> Institute of Energy and Sustainable Development  
> De Montfort University  
> The Gateway  
> Leicester  
> LE1 9BH, UK  
> +44 (0) 116 257 7972  
> +44 (0) 116 257 7981 (fax)
> 
> [jm@dmu.ac.uk](mailto:jm@dmu.ac.uk)  
> [http://www.iesd.dmu.ac.uk/~jm](http://www.iesd.dmu.ac.uk/~jm)

---

<div class="post-metadata">

**Author:** ![R\_Fritz1](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/r/b3f665/32.png) [@R\_Fritz1](https://discourse.radiance-online.org/u/R_Fritz1)\
**Post date:** [June 14, 2010, 3:25pm UTC](https://discourse.radiance-online.org/t/cubical-sky-maps/679/7 "2010-06-14T15:25:19Z")

</div>

Oh, cool.

Thanks!

Randolph

> **···**
>
> On 2010-06-13 09:13:34 -0700, Greg Ward said:
> 
> > Using a cube map and actually mapping a cube are separable issues. You don't need local geometry to do this in other words. The mapping,  
> > which you can translate pretty easily to a .cal file, is given in Paul  
> > Debevec's image-based lighting chapter in the HDR Imaging book,Section 9.4.4. Quoting:
> > 
> > World to Image:  
> > if Dz\<0 and Dz\<Dx and Dz\<Dy  
> > u = 1.5 - 0.5 \* Dx / Dz  
> > v = 2.5 - 0.5 \* Dy / Dz  
> > else if Dz\>0 and Dz\>Dx and Dz\>Dy  
> > u = 1.5 + 0.5 \* Dx / Dz  
> > v = 0.5 + 0.5 \* Dy / Dz  
> > else if Dy\<0 and Dy\<Dx and Dy\<Dz  
> > u = 1.5 + 0.5 \* Dx / Dy  
> > v = 1.5 - 0.5 \* Dz / Dy  
> > else if Dy\>0 and Dy\>Dx and Dy\>Dz  
> > u = 1.5 + 0.5 \* Dx / Dy  
> > v = 3.5 + 0.5 \* Dz / Dy  
> > else if Dx\<0 and Dx\<Dy and Dx\<Dz  
> > u = 0.5 - 0.5 \* Dz / Dx  
> > v = 2.5 + 0.5 \* Dy / Dx  
> > else if Dx\>0 and Dx\>Dy and Dx\>Dz  
> > u = 2.5 + 0.5 \* Dz / Dx  
> > v = 2.5 + 0.5 \* Dy / Dx
> > 
> > Image to World:  
> > if u\>=1 and u \<=2 and v\>=0 and v\<=1 // up  
> > Vx = (u - 0.5) \* 6  
> > Vy = 1.0  
> > Vz = (v - 0.125) \* -8  
> > else if u\>=0 and u \<=1 and v\>=1 and v\<=2 // left  
> > Vx = -1.0;  
> > Vy = (v - 0.375) \* -8;  
> > Vz = (u – 1/6) \* -6;  
> > else if u\>=1 and u \<=2 and v\>=1 and v\<=2 // forward  
> > Vx = (u - 0.5) \* 6;  
> > Vy = (v - 0.375) \* -8;  
> > Vz = -1.0;  
> > else if u\>=2 and u \<=3 and v\>=1 and v\<=2 // right  
> > Vx = 1.0;  
> > Vy = (v - 0.375) \* -8;  
> > Vz = (u – 5/6) \* 6;  
> > else if u\>=1 and u \<=2 and v\>=2 and v\<=4 // down  
> > Vx = (u - 0.5) \* 6;  
> > Vy = -1.0;  
> > Vz = (v - 0.625) \* 8;  
> > else if u\>=1 and u \<=2 and v\>=3 and v\<=4 // backward  
> > Vx = (u - 0.5) \* 6;  
> > Vy = (v - 0.875) \* 8;  
> > Vz = 1.0;  
> > normalize = 1 / sqrt(Vx \* Vx + Vy \* Vy + Vz \* Vz)  
> > Dx = normalize\* Vx  
> > Dy = normalize\* Vy  
> > Dz = normalize\* Vz
> > 
> > Best,  
> > -Greg
> > 
> > > From: R Fritz \<RFritz@lbl.gov\>  
> > > Date: June 13, 2010 7:56:16 AM PDT
> > > 
> > > On 2010-06-12 02:41:27 -0700, Lars O. Grobe said:
> > > 
> > > > On 11.06.2010 18:57, R Fritz wrote:
> > > > 
> > > > > Anyone using these? Anyone think these might be possible?
> > > > 
> > > > Should be possible, but why give up the advantages of the\>\> dimensionless source-object? With cubical maps you must think about
> > 
> > > > where in you cube the scene is to be located, how much related\>\> error to accept, then, how to get the increased scene bounding box
> > 
> > > > reflected in the ambient setting...
> > > 
> > > Thanks, Lars. The big reason for doing this is to make it possible\> to use a captured sky, and it's probably easier to keep the exterior
> > 
> > > housing containing cameras clean if it's got flat surfaces, than if
> > 
> > > it's a sphere.
> 
> --  
> Randolph Fritz • RFritz@lbl.gov  
> Environmental Energy Technologies Division • Lawrence Berkeley Labs

---

<div class="post-metadata">

**Author:** ![R\_Fritz1](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/r/b3f665/32.png) [@R\_Fritz1](https://discourse.radiance-online.org/u/R_Fritz1)\
**Post date:** [June 14, 2010, 3:31pm UTC](https://discourse.radiance-online.org/t/cubical-sky-maps/679/8 "2010-06-14T15:31:54Z")

</div>

That was actually pretty much what I was visualizing. Any model, we'd have to experiment.

Randolph

> **···**
>
> On 2010-06-14 07:35:58 -0700, Lars O. Grobe said:
> 
> > > Thanks, Lars. The big reason for doing this is to make it possible to  
> > > use a captured sky, and it's probably easier to keep the exterior  
> > > housing containing cameras clean if it's got flat surfaces, than if it's  
> > > a sphere.
> > 
> > I would be careful with that. If you have a dome with a wide-angle camera, transmission is about perpendicular for all directions. If you have a flat glass, it is not. Do you want to a cube-shaped box with five cameras?
> > 
> > Cheers, Lars.
> > 
> > \<image\>\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Radiance-general mailing list  
> > Radiance-general@radiance-online.org  
> > [http://www.radiance-online.org/mailman/listinfo/radiance-general](http://www.radiance-online.org/mailman/listinfo/radiance-general)
> 
> --  
> Randolph Fritz • RFritz@lbl.gov  
> Environmental Energy Technologies Division • Lawrence Berkeley Labs

---

<div class="post-metadata">

**Author:** ![R\_Fritz1](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/r/b3f665/32.png) [@R\_Fritz1](https://discourse.radiance-online.org/u/R_Fritz1)\
**Post date:** [June 14, 2010, 3:32pm UTC](https://discourse.radiance-online.org/t/cubical-sky-maps/679/9 "2010-06-14T15:32:21Z")

</div>

Hee.

> Randolph's query reminded me that I had a search for cheap domes a while ago. This is what I found:
> 
> [PageNotFound](http://www.hammacher.com/publish/75098.asp?cm_mmc=CJ-_-1414665-_-1492714-_-Hammacher+Schlemmer)

Difficult

> **···**
>
> On 2010-06-14 08:22:07 -0700, John Mardaljevic said:
> 
> > to tell from the photo if it is optically suitable, though Fido looks quite happy. I'd be interested to hear if this is any good as a housing.
> > 
> > Woof woof!
> > 
> > -John
> > 
> > -----------------------------------------------  
> > Dr. John Mardaljevic  
> > Reader in Daylight Modelling  
> > Institute of Energy and Sustainable Development  
> > De Montfort University  
> > The Gateway  
> > Leicester  
> > LE1 9BH, UK  
> > +44 (0) 116 257 7972  
> > +44 (0) 116 257 7981 (fax)
> > 
> > jm@dmu.ac.uk  
> > [Institute of Energy and Sustainable Development](http://www.iesd.dmu.ac.uk/~jm)
> 
> --  
> Randolph Fritz • RFritz@lbl.gov  
> Environmental Energy Technologies Division • Lawrence Berkeley Labs

---

<div class="post-metadata">

**Author:** ![Lars\_Grobe](https://discourse.radiance-online.org/user_avatar/discourse.radiance-online.org/lars_grobe/32/469_2.png) [@Lars\_Grobe](https://discourse.radiance-online.org/u/Lars_Grobe)\
**Post date:** [August 5, 2010, 5:18pm UTC](https://discourse.radiance-online.org/t/cubical-sky-maps/679/10 "2010-08-05T17:18:20Z")

</div>

Hi, to complete an old thread on this and to avoid disappointment for anyone arriving from a search machine, there are acrylic domes available at Edmund Optics (not cheap but affordable):

[http://www.edmundoptics.com/onlinecatalog/displayproduct.cfm?productID=1395](http://www.edmundoptics.com/onlinecatalog/displayproduct.cfm?productID=1395)

as well as glass domes (not cheap but expensive):

[http://www.edmundoptics.com/onlinecatalog/displayproduct.cfm?productID=3147](http://www.edmundoptics.com/onlinecatalog/displayproduct.cfm?productID=3147)

Just in case someone wants to build some hemispherical capturing device or such...

Cheers, Lars.

> **···**
>
> On 14.06.2010 17:22, John Mardaljevic wrote:
> 
> > Randolph's query reminded me that I had a search for cheap domes a while  
> > ago. This is what I found:
