X file + Lightmap??

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Serg Nechaeff
Posts: 162
Joined: Wed Nov 26, 2003 5:24 pm
Location: Europe

X file + Lightmap??

Post by Serg Nechaeff »

Code: Select all

	scene::IAnimatedMesh *mesh = smgr->getMesh("models/1.x");
	scene::ISceneNode* node = 0;
	
	node = smgr->addAnimatedMeshSceneNode(mesh);

	node->setMaterialFlag(video::EMF_LIGHTING, false);
	
	node->setMaterialTexture(1,	driver->getTexture("2.Xlm1.JPG"));	
	node->setMaterialType(video::EMT_LIGHTMAP );
need your help, i dont have a clue how to load a lightmap :-?
i have a X model and two textures (diffuse map and a lightmap)
http://www.javazing.com
P-III-950, WinXP, GeForce FX5600 128 MB ForceWare 52.16, DX9, Eclipse IDE, JRE 1.6
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Should work like you did it. Where's the problem? In addition, you could set a diffuse texture as texture 0, if it is not set already.
Xception
Posts: 22
Joined: Tue Feb 24, 2004 10:05 am

Post by Xception »

I have the same problem.
Everything is black when I set the texture to layer 1, layer 0 has the diffuse map.
Could anybody please post a small example with a small lightmapped world, I prefer 3ds.
I think it's not the code but the model's fault.
Therefore I want to see a lightmapped 3ds file with example code.
Serg Nechaeff
Posts: 162
Joined: Wed Nov 26, 2003 5:24 pm
Location: Europe

Post by Serg Nechaeff »

I haven't figured it out yet...
http://www.javazing.com
P-III-950, WinXP, GeForce FX5600 128 MB ForceWare 52.16, DX9, Eclipse IDE, JRE 1.6
Post Reply