Sign in to follow this  
n00body

Baking Directional Occlusion [SOLVED]

Recommended Posts

Basically, I am trying to test out the Directional Occlusion technique outlined in "The Brutal Art of Brutal Legend" (pg. 75-79). Unfortunately, this necessitates my having a model with DO information baked into vertex data or a texture. So that brings me to my question. As I understand it, I will basically be baking data similar to what is used in a Self-Shadowed Bump map, but raycasting against geometry rather than a heightmap. Are there any tools that will generate this kind of data for me? Can I easily modify a tool to generate it for me? Will I have to make my own custom content processing tool to do this? Any help would be most appreciated. EDIT: The link is just a presentation with one page of short description and three picture pages. Read it, before attempting to answer my question. Also, I am not asking for alternative implementations, I am asking for a means of generating data to test this specific implementation. [Edited by - n00body on March 5, 2010 6:46:47 PM]

Share this post


Link to post
Share on other sites
It is also possible to use spherical harmonics functions to encode the occlusion sphere in vertex or texture data. If you do this, it isn't a big leap to encode statistic effects of radiosity transfer (indirect lighting) and subsurface scattering in there too.

Share this post


Link to post
Share on other sites
You'd probably get more replies if you weren't snippy to the people trying to help. :)
Anyways, search for "renderman baking". There are a few non-commercial renderman compliant renderers out there, and they have pretty straight forward support for baking pretty much whatever you want to texture using renderman shaders. Baking to vertex colors I'm not sure about though - but I would check out pbrt. That's the much simpler case though and would be easy to knock out a tool for that purpose.

I couldn't figure out what exactly they're baking from the presentation though (SH coefficients?). Seriously all it says is ambient occlusion modified by light direction, baked to vertex colors (or texture for heightmap). Which by the way you could've put in the post instead of making people download that just to read 4 sentence fragments in a 50mb file. What is your take on what you think they are actually baking?

Share this post


Link to post
Share on other sites
Sorry about being a bit touchy. I made the mistake of trying to work through this problem while being sick and cranky. That's no excuse, but that's how it is.

I am just working off a hunch on their implementation, based on some prior work I did playing around with SS Bump maps. In Valve's implementation, they dynamically convert lights to intensities from three directions, and multiply those with occlusion for each direction, before combining them. This Directional Occlusion information is stored in an SS Bump map, which was generated from a height map.

I am thinking that Double fine's implementation is similar, but generates the DO information based on geometry. My assumption is that they store this data separately, and at a lower frequency, than the bump map data to cut back on storage costs. SS Bump maps are terrible when it comes to compression, and not so good for detail normal mapping either. So I figured they decided to go with a hybrid approach, to get a little of the benefits of SS Bump mapping and tangent-space normal mapping.

This is the notion I want to test, and the original reason I asked my question. I will definitely look into the renderman tools you mentioned, as they sound like the most promising lead thus far. Ultimately though, I would have to write my own tool if I decided to seriously pursue this tech.

Thanks for the help and sorry for being a bit snippy. Take care.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this