Line 3: | Line 3: | ||
Maybe you already bumped into the problem of projecting a cubemap into spherical harmonics and found this page to help you out: http://www.rorydriscoll.com/2012/01/15/cubemap-texel-solid-angle/ ? | Maybe you already bumped into the problem of projecting a cubemap into spherical harmonics and found this page to help you out: http://www.rorydriscoll.com/2012/01/15/cubemap-texel-solid-angle/ ? | ||
− | + | [[File:PerspectiveProjection.png|500px|Perspective projection of an area element on plane z=1 onto the hemisphere]] | |
− | [[File:OrthoProjection.png|500px]] | + | |
+ | But maybe you need the solution to another, similar problem that consists in finding the solid angle of a pixel lying in the z=0 plane and orthogonally projected onto the hemisphere, but couldn't find a page with that computation? | ||
+ | |||
+ | [[File:OrthoProjection.png|500px|Orthographic projection of an area element on plane z=0 onto the hemisphere]] | ||
+ | |||
+ | |||
+ | Well let me help you with that! [[File:S1.gif]] | ||
Line 12: | Line 18: | ||
==Cubemap Projection Configuration== | ==Cubemap Projection Configuration== | ||
− | The configuration for a cube map is that pixels are lying on a plane z=1 such as <math>p'=(x,y,1), -1<x<1, -1<y<1</math> and we project back onto the unit hemisphere by "normalizing" the vector <math>p=\frac{p'}{|p'|}=\frac{(x,y,1)}{\sqrt{1+x^2+y^2}}</math> as shown on the figure below: | + | The configuration for a cube map is that pixels are lying on a plane z=1 such as <math>p'=(x,y,1), -1<x<1, -1<y<1</math> and we project back onto the unit hemisphere by "normalizing" the vector <math>p=\frac{\mathbf{p'}}{|\mathbf{p'}|}=\frac{(x,y,1)}{\sqrt{1+x^2+y^2}}</math> as shown on the figure below: |
− | |||
− | |||
− | |||
+ | The idea is to compute the area of a small element of surface on the hemisphere as we make it vary on the plane, we do that by computing the partial derivatives of <math>\mathbf{p}</math> along x and y that give us the vectors <math>\frac{\partial \mathbf{p}}{\partial x}</math> and <math>\frac{\partial \mathbf{p}}{\partial y}</math>. | ||
==Our Projection Configuration== | ==Our Projection Configuration== |
Revision as of 18:00, 2 June 2017
Hi!
Maybe you already bumped into the problem of projecting a cubemap into spherical harmonics and found this page to help you out: http://www.rorydriscoll.com/2012/01/15/cubemap-texel-solid-angle/ ?
But maybe you need the solution to another, similar problem that consists in finding the solid angle of a pixel lying in the z=0 plane and orthogonally projected onto the hemisphere, but couldn't find a page with that computation?
Well let me help you with that!
First of all, the document that was used initially to do the computations, both in AMD's cube map generator, Rory Driscoll's summary and this page, is the very interesting thesis by Manne Öhrström.
Cubemap Projection Configuration
The configuration for a cube map is that pixels are lying on a plane z=1 such as <math>p'=(x,y,1), -1<x<1, -1<y<1</math> and we project back onto the unit hemisphere by "normalizing" the vector <math>p=\frac{\mathbf{p'}}{|\mathbf{p'}|}=\frac{(x,y,1)}{\sqrt{1+x^2+y^2}}</math> as shown on the figure below:
The idea is to compute the area of a small element of surface on the hemisphere as we make it vary on the plane, we do that by computing the partial derivatives of <math>\mathbf{p}</math> along x and y that give us the vectors <math>\frac{\partial \mathbf{p}}{\partial x}</math> and <math>\frac{\partial \mathbf{p}}{\partial y}</math>.