Now it's time to move onto lighting and shadows, I've done a great deal of research into the matter already, and have decided that light maps are the way to go. From my
understanding and research, the following should be right (please correct me if i'm mistaken):
- A texture providing light data need's to be produced for each mesh.
- Each triangle on the mesh requires a separate set of coordinates to allow the lumel's provided by the texture to be mapped onto each triangle surface.
- Shadow's can exhibit jagged edges if the light map is of small resolution, as lumel projection is determined by the pixel centre, not pixel edges.
- light map coordinate data needs only to be calculated once.
- When calculating light map coordinate data, the maths must be done using plane projection.
Those of you who are experienced in this area I'm sure already can spot the gap's in my knowledge, but I'm hoping that I am not too far away, and that someone may be able to nudge me in the right direction. Today I found a tutorial on flip code Light Mapping - Theory And Implementation , I think using it, I should be able to eventually understand the things I need to, though I have a few questions that I believe would help me learn a bit faster:
- Are there any less pseudo OpenGL examples of plane projection that people use, I don't mind the language, as long as it's strong typed (not pseudo).
- I'm a bit confused on how lights relate to a light map, does this process assume that light's are static, therefore the usage of the light map texture,
this concept is part of what's confusing it for me. - Am I right in assuming that once I understand this process, I should be able to write a GLSL shader to map the lumel's based on the light map texture ID,
and light UV via a uniform variable or something similar? - Finally (and this one is a bit off-topic at the moment), but taking into account a semi-transparent face would not cast such a dark shadow, how would you
build this into this process? or would the colour information passed to the shader already account for the alpha channel.
Thanks for your time, I understand this is not the most straight forward question to answer, but I value your opinions, and very much look forward to some feedback.
Aimee.