What files are needed for lightmap in Blitz3d?
Blitz3D Forums/Blitz3D Beginners Area/What files are needed for lightmap in Blitz3d?
| ||
Hi all, (1) What files are needed for lightmap in Blitz3d? (eg. I have a room called room.3ds) (2) How to create lightmap in Blitz3D , without using external program (SlimShady or gile[s])? Thanks in advance. Sammy :) |
| ||
(1) Your lightmap would be a texture so not sure what you mean here. (2) Unless you are extremely good at maths I would forget about trying this yourself. Yet Another Lightmapper (YAL) is in the code archives ( I think ) .. it'll give you an idea of what is involved. I thought slimshady was free but I may be wrong. I'm pretty sure most will recommend gile[s] ... I think this is the daddy for this kind of stuff. Stevie |
| ||
yes, gile[s] is the best choice in my opinion. |
| ||
Hi Steve G and T3K|Mac, (1) Correct me if I was wrong... (At the time of writing, I only successfully create a lightmap with SlimShady.) Steps to display a model with lightmap: --------------------------------------- a) load mesh (room.3ds) and create lights b) export as single mesh with lightmap. Then, I got 2 files (room.b3d + room_lm.bmp) c) back to Blitz3D coding, just use: mesh = loadmesh("room.b3d") then lightmap data (room_lm.bmp) will be applied on room.b3d and show on screen. In order to get lightmap, I must finally get these 2 files : .b3d and .bmp. Am I correct? Is this also true for gile[s]? Thanks in advance. Sammy :) |
| ||
giles saves .b3d and lm.bmp as separate files. the lightmap is then automatically loaded from blitzs loadmesh() command. i also use giles as my favourite levelbuilder. yeah, i admit, i like giles lighting functions ;) |
| ||
Of course you need the b3d that is the model file and the bmp that is the lightmap texture, basicly an image file. you will need further textures for the model, like wall, floor etc. textures. However, you may use the YAL Lightmapper (see code archives), Slimshady is based on it too. Although this allows to lightmap a model by defining some "lights", it will take several minutes to lightmap something more complex, so you better use a tool like slimshady or giles to save your lightmap bmp and then use this in the game. |
| ||
hi all, Could we use lightmap without using .b3d? (e.g. room.3ds and room_lm.bmp) Thanks in advance. Sammy :) |
| ||
Yes and no If you do not use B3D format, you will need 2 models (only B3D is supported with 2 UV sets which are needed for lightmapping). One with base texturing and one with the lightmap applied. And you can not use Multiply2x as blendmode (ie brighter and darker) but only multiply (darken) as meshblend does not support more. |
| ||
Hi Dreamora, Would you mean: mesh = loadmesh("room.b3d") ;room_lm.bmp in same folder PositionEntity mesh, 0,0,0 replaced by mesh1 = loadmesh("room1.3ds") ; same room with texture mesh2 = loadmesh("room2.3ds") ; same room with lightmap PositionEntity mesh1, 0,0,0 PositionEntity mesh2, 0,0,0 ??? If so, how to create room2.3ds? Thanks in advance. Sammy :) |