Home Technical Talk

light maps, and their implementation in engine

mod
Offline / Send Message
rooster mod
we're looking at getting some lightmap support so we can get some nice prerendered lighting ingame. Since we dont have massive environments or a sophisticated in-engine lighting system we'll be rendering the maps from maya and the game will apply them to the corresponding objects.

The way we're going to do that is by tagging geometry names such as box_lmp01 or something so that the game knows that object has a lightmap and it applies lmp01.png or whatever.

this allows multiple meshes to use one map, but comes with the limitation that one piece of geometry can not use multiple maps. My question is can you think of a solution that allows us to eliminate this limit and tag certain polygons with information pointing them to the correct lightmap.

Now, the most straightforward way would be to use materials but say we have 12 materials on an object, how can we then divide that object into 2? The lightmap split will likely be different to the distribution of materials applied

am I wondering about a pointless issue- maybe just splitting the object into 2 chunks is acceptable.

Replies

  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    I would not split a object on multiple lightmaps, that is not efficient at all at runtime. (unless the object already is made of different materials that reflect that split). Else you ask for the same model needing separate drawcalls just as you changed lightmaps and nothing else...

    multiple meshes on one map is what you should try to achieve. If you ever looked at lightmaps of latest games, they have HUGE atlas textures, taht contain lightmaps of all static meshes. E.g BF2. In luxinia's quake3 import I take many of the small lightmaps into big ones, means less chance of a state change. And I bet many others do similar. Often they might hide this from the user and combine the atlas at runtime.
  • rooster
    Options
    Offline / Send Message
    rooster mod
    nice one, that makes a lot of sense. thanks CB!
Sign In or Register to comment.