As there are no "natural" mappings between the sphere of directions and the square, so there is no standard way to parametrize your environment map. In the Original paper by Blinn and Newell, a cylindrical map was used. There are many such cylindrical maps out there and have been used for map projection . For software renderers these are more intuitive than cube maps or the Disk on square paramerterization. In a physically based renderer, you would like to importance sample the environment map. This is easiest if each texel in the map subtends the same solid angle as every other texel. There is one cylindrical map that does this for a given rectangle. A well-known version of this projection is the Peters Projection.
Here's an example projection. The rectangle has parameters [0.1]^2. Let's take u to the angle phi (longitude): u = phi/(2*pi) = atan2(y,x)/(2*pi) assuming your direction (x,y,z) is a unit vector and z is "up". Now we have v = f(z). The simplest such mapping is v = (z+1)/2. Is there area distortion there? What is the area of a given pixel in the texture map. How about the differential area? Let's say that we have a differential square du*dv in the texture map. The area on the sphere of that will be sin(theta) * dtheta(v) * dphi(u).
dphi(u) = 2*pi*du = constant so we can ignore it.
Since z = cos(theta), the other mapping is
(cos(theta) + 1)/2 = v
so differentiating both sides:
-sin(theta)*dtheta/2 = dv
As the differential area is proportional to sign theta, each pixel does have the same solid angle. So this most simple mapping is also a good one! I am not sure why anybody uses any other in a software renderer.
Showing posts with label computer graphics. Show all posts
Showing posts with label computer graphics. Show all posts
Saturday, March 10, 2007
Monday, November 20, 2006
Outer product
Given two three vectors the "inner" product is:
...........|X|
[x y z]|Y| = [xX + yY + zZ]
...........|Z|
Which we use all the time (dot product). There is
also an outer product:
|x|.................|xX xY xZ|
|y|[X Y Z] = |yX yY yZ|
|z|.................|zX zY zZ|
I'm not sure this is useful for anything in graphics, or even what this thing is operationally.
...........|X|
[x y z]|Y| = [xX + yY + zZ]
...........|Z|
Which we use all the time (dot product). There is
also an outer product:
|x|.................|xX xY xZ|
|y|[X Y Z] = |yX yY yZ|
|z|.................|zX zY zZ|
I'm not sure this is useful for anything in graphics, or even what this thing is operationally.
Monday, November 13, 2006
How long before interactive ray tracing is on the desktop?
Solomon Boulos and friends in our group at Utah have their ray tracer going about 1 frame per second on one core of a 2GHz Opteron 870 with one ray per pixel at a million pixels. This is with full shadows and reflections so is slower than a lot of the numbers you see in the literature. For NTSC resolution (640x480) that would be more like 3-4 frames per second. So we'd need about 8 of those cores for fluid motion. So we are right on the threshold for such low resolutions. If Intel comes through with its 60 core chip, and ray tracing maps to it, then HDTV resolution and some multisampling should be straightforward. The Cell is also a possibility as shown by Carsten Benthin and his collaborators in their recent papers. We could get ray tracing even sooner if an ASIC is built. I don't see why a game box based on ray tracing would not be feasible now.
Subscribe to:
Posts (Atom)