   Implementing Hemispheric Lighting...
  Hello,I recently stumbled accross the hemispheric lighting tutorial in the DirectX SDK, and I find it an impressive and easy upgrade from the traditional ambient lighting model.  Now, all the shader code made sense, but there's one thing they left out... Calculating the occlusion term.  The one thing I'm beginning to notice about the SDK samples is that they cheat a lot.  In this case, they used a .x file that had the occlusion values precomputed (scullocc.x I believe).I've searched the net, but I can't find any resources on implementing this offline process...  Can you guys give me some pointers?  Thanks   
  Google for "ambient occlusion", it's a very popular technique, and you'll find a lot of references and papers about it. GPU Gems has an entire chapter about the technique. I seem to recall that both ATI and nvidia have tools to generate offline ambient occlusion term maps. It's also possible to generate them in realtime, on the fly (good for animated models).Wikipedia has a short introduction into the technique, that might get you started.   ;  Thanks Yann, I'll check that stuff out.   ;Quote:Original post by DirectXFreakHello,I recently stumbled accross the hemispheric lighting tutorial in the DirectX SDK, and I find it an impressive and easy upgrade from the traditional ambient lighting model.  Now, all the shader code made sense, but there's one thing they left out... Calculating the occlusion term.  The one thing I'm beginning to notice about the SDK samples is that they cheat a lot.  In this case, they used a .x file that had the occlusion values precomputed (scullocc.x I believe).I've searched the net, but I can't find any resources on implementing this offline process...  Can you guys give me some pointers?  ThanksYou can get the Ambient Occlusion term by using the PRT library in D3DX. PRT is a superset of Ambient Occlusion - it will spit a bunch of numbers for each vertex/texture called the basis. The FIRST term is exactly the ambient occlusion, you will often see it refered to as the DC term. So you have to do a bit of code to run the PRT library and process the data, but it is all there.;  Thanks EvilDecl81,I've always wanted to learn about PRT, maybe I'll start now =)