Lightmaps vs. baked diffuse maps.

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
dwmitch
Posts: 52
Joined: Thu Nov 09, 2006 9:29 pm

Lightmaps vs. baked diffuse maps.

Post by dwmitch »

I've been pondering this for months now, and I still haven't found any advantages to using lightmaps over just baking the lighting into the same texture as the color map.

In fact, it seems to me that lightmapping would be a little more expensive, given that it takes two passes.

Is there just something I'm not getting here, or does it all come down to personal preference?
Those who call the faithful 'sheep' do not realize that they themselves are sheep. We follow one shepherd, they follow another.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

well, a lightmapped mesh has two sets of texture coordinates, so you can repeat an area of the texture on different parts of the mesh. So you can have a few pixels of lightmap in areas where it is all one brightness or doesn't change much, but use a high resolution repeated part of the diffuse on the same area.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
CuteAlien
Admin
Posts: 9644
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

@dwmitch: The lightmap has a lower resolution. You use for example often a single lightmap for a whole level. Also the other textures will be used in light and in dark places so you would need a lot more textures as you could no longer just repeat them.

I've made an example of using lightmaps some months ago, maybe that helps to understand it: http://www.michaelzeilfelder.de/lightmaps.html
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

there's no way around it. You need them. A landscape would need *huge* texture that the card cant take, as well as that size of lightmap. No card would stand it.

even in fps game of rooms...it's ok if you would just lightmap and texture one only room in your game...but you will need tiling every where (and so, you need litlle texture tile an dits UVs for texture, and lightmap in an independent channel for other)

Last time I did levels, I used 512x512 or 1024x1024 lightmaps for big building areas, using a good system of lightmapped chunks distribution (FSRAD ha a very good one) .In the texture layer, I mean, the uv channel 1, I did lots of tilings for walls, floors, etc, etc. Whose UVs and textures go independent of what happens in UV channel 2 . (usually 3 in Max...you can set whichever. In other tools usual is channel 2.)
Finally making games again!
http://www.konekogames.com
Post Reply