Do you HAVE to use lightmaps?
Do you absolutely have to use lightmaps when creating a game? The type of game i''m creating uses alot of lights and I''m just making sure I can''t just use DX8 lighting by itself.
And does anybody know of a tutorial describing how I can make my level editor generate lightmaps. I want to be able to place lights in my level editor that have a specific color, radius, intensitym type (point, spot, directional...etc)...etc. How can I make it generate the lightmap to be used in real-time?
Another lightmap question. How do I make sure to affect characters and objects that move into a lightmapped area?
-- Ivyn --
i (think) you can only have 8 lights in realtime. what i''m hoping to do in my engine, is make a bsp, which has a lightmap. turn off lighting while rendering the bsp. then when rendering static meshes, and players, turn it back on. if i can only have 8 lights, only turn on the ones in of whatever your rendering.
No, you certainly don''t HAVE to use light maps. Light maps just happen to be an efficient way to get lighting that''s not half bad. Another technique you can use is called "vertex lighting", where you pre-calculate the lighting colors into your vertices. This is super fast to render, but the downside is that if you''re geometry is not tesselated enough, or if the tesselation is rather irregular, then you''ll see artifacts in the interpolation of light on the polygons.
I would, however, suggest that you really try to use some approach other than all DX real-time lighting. Simply put, using real-time lights are slower and will get you lesser quality than good pre-computed lighting in your scene. At least for the moment, real-time lights are mostly useful for calculating fancy lighting effects(Specular highlights, etc) and for interactive lighting f/x...like a character carying a torch through a dungeon.
As for how to go about creating and using lightmaps...that''s a fairly deep topic. One of your toughest goals is that you have to create unique uv''s for all of your geometry so that you can store the lighting out into a map that''ll work with them. For calculating the lighting itself, there''s all kinds of methods, from the really simple to cutting edge light-tracing algorithms. I''m sure a search on google would get ya some info though....just be prepared for a bit of work!
-John
I would, however, suggest that you really try to use some approach other than all DX real-time lighting. Simply put, using real-time lights are slower and will get you lesser quality than good pre-computed lighting in your scene. At least for the moment, real-time lights are mostly useful for calculating fancy lighting effects(Specular highlights, etc) and for interactive lighting f/x...like a character carying a torch through a dungeon.
As for how to go about creating and using lightmaps...that''s a fairly deep topic. One of your toughest goals is that you have to create unique uv''s for all of your geometry so that you can store the lighting out into a map that''ll work with them. For calculating the lighting itself, there''s all kinds of methods, from the really simple to cutting edge light-tracing algorithms. I''m sure a search on google would get ya some info though....just be prepared for a bit of work!
-John
With dot3 bump mapping + attentuation mapping + shadow maps\stencil shadows it''s possible to do fully dynamic lighting in realtime. For static scenes hi res light maps probably work better though. You can do things like global illumination (radiosity, etc.) or raytracing or other complex lighting algorithms that can only be precalculated.
While we are at the lightmap topic:
I''ve allways wondered about the amounts of data necessary to store lightmaps. Do I really have to use a unique surface for all but the all bright / all dark spots? Or do you use a set of lightmaps (circular, diagonal ... ) and apply them as needed?
---------------------------
I may be getting older, but I refuse to grow up
I''ve allways wondered about the amounts of data necessary to store lightmaps. Do I really have to use a unique surface for all but the all bright / all dark spots? Or do you use a set of lightmaps (circular, diagonal ... ) and apply them as needed?
---------------------------
I may be getting older, but I refuse to grow up
You have a separate map for each single ->polygon<- not tri. However, these are very small, they are not as hi-res as the diffuse textures. And of course, you can place several maps per textures to prevent losses when dealing with the power-of-2.
What you were talking about would be feasible, however the quality would suffer, just look at a JPEG.
What you were talking about would be feasible, however the quality would suffer, just look at a JPEG.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement