   Vertex Cache on Light-Maps
  I just looked a series of articles talking about how to implement Lightmaps in the game scene. The thing that I''m concerning is about the efficiency. It is in good efficiency to assign one specified lightmap for each triangle? I mean I often use triangle strips or indexed triangle lists to draw meshes. But due to lightmaps do I have to draw each triangle individually?? How to organize that? Thanks! 
  a lightmap is just another texture, so why should it change anything? ;  Arrange your lightmaps together in a single bitmap.   ---Brent Gunning | My Site;  HeavenPR:Man, u r right abt assigning lightmaps to individual triangle (as Q3 did the similar thing).. but first tell me how did u assign lightmap to each polygon... i dont have seen any tool which can assign mulitexture to individual polys..   TALAL BIN GHIZAL ;quote:Original post by HeavenPR  I just looked a series of articles talking about how to implement Lightmaps in the game scene. The thing that I''m concerning is about the efficiency. It is in good efficiency to assign one specified lightmap for each triangle? I mean I often use triangle strips or indexed triangle lists to draw meshes. But due to lightmaps do I have to draw each triangle individually?? How to organize that? Thanks!   Unfortunetly, you will have to draw each triangle individually, which is quite inefficient, unless you do what RapidStunna suggests and organize multiple lightmaps into a single texture. There are disadvantages to that approach, however -- the most obvious being that you have to ensure that texture filtering doesn''t cause any bleeding between different lightmaps when you go to render. The best way I can think of to avoid that is to simply provide a bit of buffer space between the various triangle''s lightmaps (although it is a bit wasteful wof memory).In my new engine which I''m working on at the moment, what I''m doing is cutting up the scene with an octree, and then in each octree node I organize all the polygons into groups by texture. Then, I make a sufficiently large lightmap texture for each group and place all the individual triangle''s lightmaps into that texture while adjusting the texture coordinates for each triangle. That way, I can draw each texture group with a single call, which helps with batching.(If that sounded complex, that''s because it is )What you need to consider though, is this: Are you going to be drawing so many level polygons that you''re going to need to optimize? I wouldn''t really worry about optimizing your lightmaps unless they become a bottleneck.   ----------------------------------------"Before criticizing someone, walk a mile in their shoes.Then, when you do criticize them, you will be a mile away and have their shoes." -- Deep Thoughts"If you have any trouble sounding condescending, find a Unix user to show you how it''s done." - Scott AdamsFaceHat Software -- Wear the hat. 