Assuming your icosahedron is centered about some coordinate system, then in that coordinate system you can project the vertex onto the unit sphere by normalizing it. To get a point on a sphere with radius R, just scale the unit vector by R.
You can build the triangle list for the isocahedron, and use 3 control points. Each input primitive is a triangle and the initial vertices are the control points. Then tessellate each triangle, and project the tessellated vertices back on to the unit sphere. The more you tessellate the better the sphere approximation.
Those artifacts looks like you are getting a whole bunch of self intersection (points on the same plane as P are working to occlude P). Even without blurring, the interiors of your walls and ground plane should be white (there are no occluders). You can scale your ambient occlusion by how much "in front" your random sample point Q is to the pixel P you are shading:
float s = max(dot(n, normalize(q - p)), 0.0f);
This is in the game programming gems 8 book by the starcraft guy.
I started watching some of the AMD Fusion 2011 summit videos today.
So it sounds to me fusion is a hybrid CPU/GPU chip.
It sounds like they have removed the overhead from switching back and forth between "compute" mode and normal graphics rendering mode.
They say "a pointer is a pointer" and you can pass a pointer allocated in the C++ code over to GPU code and the GPU can just dereference it directly. So it sounds like this is a unified memory architecture??
What do you think about this architecture? Do you think NVIDIA will follow it?
Do you think this gives the best graphics, or is it more optimized for general applications that want to easily use compute power of GPU.
Hi, I have a triangle based ray tracer which just traces each triangle one by one. It is very slow for all but simple meshes, so I want to add an octree to eleminate lots of wasteful tests. I just wanted to know if my algorithm is correct before I start working on the code. Here it is:
Build one AABB that contains the whole scene. Subdivide box into 8 octants, and sort triangles amongst them. Repeat recursively until a leaf box contains no more than some some fixed number of triangles. So I guess this would be a "leafy" octree, where internal nodes just store an AABB, but the leaf nodes store a collection of triangles.
Then once the data structure is built, I shoot a ray at the root box. It interesects it, so I test against each of its children boxes. Then continue recursively down each child box the ray intersects until I hit the leaf boxes--then do ray-triangle intersection tests.
So as I recurse, I will miss entire boxes and therefore eleminate many tests with one AABB/ray test.