Sign in to follow this  
3TATUK2

Directional lightmapping

Recommended Posts

Does anyone have information on *directional* lightmapping?

 

I know how to bake a lightmap in maya, i guess you just have to figure out how to bake direction into a lightmap texture, then use that texture lookup for direction to be used with the normal in the shader for model lighting?

 

also that's a little confusing.. how is the GEOMETRY lightmap applied to the MODELS? i mean the lightmap on the geometry works because you use the uv's of the geometry polygons in the lightmap texture lookup

 

how do you know the x,y lightmap texture lookup coords to use in the model shader?

Share this post


Link to post
Share on other sites

I'm not sure what you mean about the UV coordinates. You get the coordinates the same way you would for any type of texture mapping: you store them in your vertex data, interpolate them in the vertex shader, and pass them to the pixel shader. With directional lightmaps you store lighting information using something like spherical harmonics.

 

http://molecularmusings.wordpress.com/2012/06/11/real-time-radiosity-normal-mapped-surfaces/

Share this post


Link to post
Share on other sites

What kind of directional light-mapping are you after? The HL2 method?

 


also that's a little confusing.. how is the GEOMETRY lightmap applied to the MODELS? i mean the lightmap on the geometry works because you use the uv's of the geometry polygons in the lightmap texture lookup
 
how do you know the x,y lightmap texture lookup coords to use in the model shader?
Are you talking about dynamic models that are placed on top of light-mapped geometry, like a player walking through a light-mapped level?

Share this post


Link to post
Share on other sites

So, I found this: http://web.student.tuwien.ac.at/~e9907459/docs_tutorials/directionalLightmaps.pdf

 

But a couple things I still don't get...

 

How do you get the "Normal Mapped Radiosity" from the "Radiosity" and "Normal" ? (multiply?)

Also... if you have a "Normal Mapped Radiosity" lightmap for the world geometry, how do you apply it onto model objects that move about the world?

Edited by 3TATUK2

Share this post


Link to post
Share on other sites


Also... if you have a "Normal Mapped Radiosity" lightmap for the world geometry, how do you apply it onto model objects that move about the world?

 

You don't. Lightmapping is for static meshes only. Dynamic meshes need something entirely different. You could try irradiance volumes for example.

Share this post


Link to post
Share on other sites

You can with something called an "ambient cube"...

 

"This approach helps integrate characters with the world and its static lighting-environment."

 

So I need to know about both directional lightmaps *and* this "ambient cube" method :x ;)

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