Are you using lightmapping?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

in fact there is a free way for that. Even at least 3 ways. None eazzzy, you know whaz iz all about.

But Murphy surely will bring a much better one.
Finally making games again!
http://www.konekogames.com
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

:?:
vermeer: can you please summarize all 3? (I'm stupid i know 8) )
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

Anonymous wrote:Zat is poop. dhenton9000 you are wondering vhy zere arent any tuts on lightmapping yet, arent you? Ze reason is: No vay around propietary softvare (gile[s] , max) yet. At ze time vhere someone publishes an OPEN SOURCE lightmapper vhich supports funking curved surfaces, i promise (funking serious) to release a tutorial on zis workflow as soon as i have got it working.
(ze anonymous german vith ze strong accent, hehe)
Just curious... Why does it have to be open source as long as it's free?


Thanks for the vote of confidence, Vermeer. :) Hopefully I'll get some work done on it this weekend.

As it is now, I've got it reading OBJs and I think I've got a sort of braindead version of the UV generation working. If I get some decent time to work on it this weekend, I'll hopefully get a braindead version of the texture packing working and then a very simple direct lighting calculation, and then at least I can post some screenshots. ;)
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

"vermeer: can you please summarize all 3? (I'm stupid i know )"

No, you are not stupid. (cough) :roll: :twisted: ;) :D :P

Ouch...that last coffee...

..No, seriously...You can do lightmaps with curved surfaces with deled -just 16x16 pixel chunks, I think- , with the windsoft free tool, with certain complex workflow with Blender, most surely with certain alpha tool I have from Trancos, and even you can, if ur a painter, and have strong lighting knowledge, just paint an overlay with 3d painting tools (there are two for free)

You can also even burn the lighting into channel with mor ethan one tool that does not support 2 UV channels (been done with Blender old version, for Blender game Engine, even using AO (~Global Illumination))

But my personal hope is mainly in Murphy. If he's again as generous as was once, take no doubt that'd be the tool to use.

Is not simply a vote of confidence; I've seen you work, Murphy :)

you know you can mail me any test version if feel in the mood :)
I'm terribly curious on its progress :)
Finally making games again!
http://www.konekogames.com
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Great news, i've just tried mim loader and it works like a charm!
here is the code for adding mim-loader into your app (add a loader was little bit triky for me, hope now everybody could use this):

Code: Select all

    io::IFileSystem* fs = device->getFileSystem();
    CMIrrMeshLoader* loader = new CMIrrMeshLoader(fs, Driver);
    SceneMgr->addExternalMeshLoader(loader);
    scene::IAnimatedMesh* mesh = SceneMgr->getMesh("map/lightmapped.mim");

    scene::ISceneNode* node = 0;	
	if (mesh)
		node = SceneMgr->addOctTreeSceneNode(mesh->getMesh(0));
dont forget to add #include "CMIrrMeshLoader.h" in top of file...
And i use such command line parameters for OBJ2MIM:
obj2mim -f -s 10 -t map -vf1 -vf2 -lm lightmapped_lmap.obj lightmapped.obj lightmapped.mim

To Murphy: is it possible to use prallax mapping for lightmapped surfaces? Your opinion?

And good luck with your lightmapper, can't wait to see it in action!
needforhint
Posts: 322
Joined: Tue Aug 30, 2005 10:34 am
Location: slovakia

Post by needforhint »

I grow big dislikes about lightmaps.... you see , It is cool, but once lightmapped, nothing alse can be done on the texture...it looks just dead, but "big dislikes about lightmaps" :shock: , it can't be done without them, I need them .... I am despared, I start messing with pixel shader for dynamic light appearing on my lightmapped surfaces and such stuff (doom 3 like batery light)... if I just had a 3dviewport for placing the irrlicht lights into my irrscene :roll: ? aren't we loosing the very essence of irrlicht when we abandon its great dynamic lights? say dudes...aren't we?
what is this thing...
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

puh wrote:To Murphy: is it possible to use prallax mapping for lightmapped surfaces? Your opinion?
Yeah, I think it should be possible, though I'm not positive if Irrlicht supports it, as I haven't messed with the latest version yet really. And MIM doesn't yet have support for parallax mapping material types, though it shouldn't be hard to add.

As a sidenote... this sort of thing is one of the areas where I think MIM would really be useful with Irrlicht. For example, let's say you want a parallax-mapped lightmapped surface. And you want to use DeleD as your modeler. DeleD (as far as I know) doesn't support parallax mapping. So having a DMF loader for Irrlicht isn't really that helpful. With MIM, I'd eventually like to see a material editor, probably integrated into an Irrlicht-specific mapping/lighting/entity-editing type program, where you could import various filetypes (DMF, for example) and then apply Irrlicht-specific features in a simple way, and then save these as MIM -- letting you get combinations of features supported by Irrlicht, but not found in other file formats.
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Well, the app which could assign irrlicht specific materials on top of existing would be cool.

I have an issue with mim loader so far: if i load file with 2 lightmaps then one of it is fine but second is messed somehow. In command line i added -vf1 -vf2 (or just -vf2) as without it file with only one lightmap has wrong uv.
What could it be?
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

puh wrote:I have an issue with mim loader so far: if i load file with 2 lightmaps then one of it is fine but second is messed somehow.
Strange... I've used many multi-texture lightmaps.

What tool are you using to do the lightmapping? Can you post your files? Your meshes (source OBJ or whatever and MIM) and textures?
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Hi, Murphy.
I compressed test-level to rar-archive, you can get it here: http://zupload.com/download.php?file=ge ... epath=7779
(file is 2,180 MB, there you can find also original level01.gls)
I used Gile[s] for it.
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

It looks to me as if the problem isn't with OBJ2MIM or the MIM loader at all, but with the walk_lmap.obj and walk_lmap.mtl produced by gile[s]!

Try opening up walk_lmap.obj in another program that displays OBJ, like LithUnwrap or Blender -- it looks messed up. :(

Maybe it's a bug in gile[s] or a problem with how you're exporting it? I don't really know gile[s] so I couldn't really say...


I like the map, by the way!


On a sidenote, I haven't gotten a chance to work on the lightmapper this weekend yet. :(
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

I'm downloading it, I'll see it later, puh...

I have giles,(gotta remember to update from time to time lol) so I should be able to load it and study better. Can export also to obj, and surely make a mIM file, if I remember how, haven't touched this for a while, but he gave me an irrlicht viewer to test :)

"Strange... I've used many multi-texture lightmaps. "

Yup. Me too. While in testing of mim and mimtools.


Don't worry bout not touching the lightmapper , Murphy. is all about a gift :)
Finally making games again!
http://www.konekogames.com
Murphy
Posts: 290
Joined: Mon Dec 13, 2004 12:06 am
Location: United States
Contact:

Post by Murphy »

puh wrote:I have an issue with mim loader so far: if i load file with 2 lightmaps then one of it is fine but second is messed somehow. In command line i added -vf1 -vf2 (or just -vf2) as without it file with only one lightmap has wrong uv.
What could it be?
I just did a check to make sure that it wasn't a UV flipping problem, and it isn't. It's strange. The mtl doesn't make much sense. It redefines materials over and over! I played around with fixing some of the materials manually and definitely got it to look better but didn't quite get it -- there are 70 groups in the model, so that'd be a lot of tweaking to get it right. :)

Basically the problem just seems to be that gile[s] messed up exporting the materials. :? Hopefully Vermeer can shed some light since he knows a lot more about gile[s] than I do! :D
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Well, i'm pretty sure that problem with my hands only :oops:
Could vermeer explain the proper way to assign another lightmap in gile[s]?
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Here you can find a standard Irrlicht meshviewer enhanced with ability to load .mim files (as well as to change material to lightmap and change maya/fps camera mode):
http://www.uploadraid.com/uploads/6713464a3d.zip [58 KB, file will stay hosted on this server for at least 60 days after uploaded]

Image

Just unzip it to irrlicht-0.12.0\bin\Win32-VisualStudio. If you want you can backup the original Meshviewer.exe though i'm sure it will work with standard irrlicht.dll.

To Murphy: i've slightly modified the CMIrrMeshLoader.cpp to add root path for textures loading (i.e. the mim file itself). If you are interested i can send you the file. Just copy-paste from CDMFLoader.cpp...
Post Reply