Scene prelighting

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Domin

Scene prelighting

Post by Domin »

Hi all and as always - sorry for errors.

I was wondering how to prelight scene in Irrlicht. In my case I'm using oridinary 3ds file exported from some gfx package contains all level's geometry. I know, in general, two methods to prelight scene - lightmaps (slower, more acurate) and vertext colouring (faster, less accurate). In Irrlicht I have found structures that should support both methods. But after I explored code of all mesh loaders I have discovered that none of them supports vertex colouring (all sets all vertices colors to 255, 255, 255, 255) and only bsp loader support meshes with two texture coordinates what is required for attaching lightmaps. So, in my case (3ds) I cannot load a mesh that is prelighted in any way. I'm after using of coloured vertices because my level is very complex and lightmaps may be too slow. So, even if I write an editor in which I may prelight vertices, I still don't have format to store new data... Same with lightmaps - FSRad or LMTools gives great results with generating lightmaps, but there is no way to load them to the engine...

Maybe someone has similiar problem and maybe there is solution - please help.

I think that only solution there is internal mesh format that support all specific data used by the engine.
Niko wrote that he don't want to write a scene format because this may vary for every situation and his right. But internal MESH format should be very useful.

Domin.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

I also have thought about it. My idea would be to load a mesh (.3ds, .x, .bsp, whatever) into the engine, and modify the mesh, so that it has everything you need. If you write a lightmap compiler, you would have to modify the mesh in anyway most cases. (splitting triangles, changing texture coordinates,...)
Post Reply