I am using walaber's exporter, but I am having no luck at all. Here is what I have done: Peice my scene together in Gile[s], place my lights, remove all but the floor (just a plane), put the resulting .material(cleaned up the invalid characters), lightmap texture, and .mesh file where my game can find it. When I run my game I get "Cannot create D3D9 Index buffer" when loading the .mesh.
Are there any step by step tutorials on getting a lightmap into Ogre? I would really be grateful if someone would help me with this.
Thank you!
[Solved] help me get a Gile[s] lightmap into my game?
-
- Gnoblar
- Posts: 17
- Joined: Sun Jun 10, 2007 3:25 am
- Location: Lebanon, TN USA
- Contact:
[Solved] help me get a Gile[s] lightmap into my game?
Last edited by byte_wrench on Mon Aug 06, 2007 9:37 pm, edited 1 time in total.
- Praetor
- OGRE Retired Team Member
- Posts: 3335
- Joined: Tue Jun 21, 2005 8:26 pm
- Location: Rochester, New York, US
- x 3
- Contact:
To Ogre a lightmap is nothing more than a regular texture. It isn't treated special, so it seems like your problem is either with the exporter (bug, or out of date maybe) or with something you might be doing. Does the exporter create the .mesh, or is it created in some other tool and simply used by Giles and your app? Can you post your initialization code?
-
- Gnoblar
- Posts: 17
- Joined: Sun Jun 10, 2007 3:25 am
- Location: Lebanon, TN USA
- Contact:
Yes, it does produce a .mesh file. I am simply doing:
When this code gets hit, everything stops with
I have tried running the mesh through the meshUpgrader, and the XMLConverter to no avail, yet when I convert it to XML I do get a different error, something about header info and Endian?
Is there a more simple way to produce a nice light map for my Ogre game?
Code: Select all
Entity * Floor = SceneMgr->createEntity("floor", "floor.mesh");
Code: Select all
11:24:19: OGRE EXCEPTION(3:RenderingAPIException): Cannot create D3D9 Index buffer: Invalid call in D3D9HardwareIndexBuffer::D3D9HardwareIndexBuffer at ..\src\OgreD3D9HardwareIndexBuffer.cpp (line 65)
Is there a more simple way to produce a nice light map for my Ogre game?
- Falagard
- OGRE Retired Moderator
- Posts: 2060
- Joined: Thu Feb 26, 2004 12:11 am
- Location: Toronto, Canada
- x 3
- Contact:
-
- Gnoblar
- Posts: 17
- Joined: Sun Jun 10, 2007 3:25 am
- Location: Lebanon, TN USA
- Contact:
Thanks Falagard, I will start on that now and post any findings
[edit]
Whew! with encouragement from Falagard and 10 minutes, it worked!
And just to think, I spent 2 days on this! Now to create some nice lights.
Just recompiled with current version of Ogre, and put the new OgreMain.dll in the Gile[s] folder, and the newly compiled ExportOgre.dll into the Exporters folder, and off I go...
Thank You!!
[/edit]
[edit]
Whew! with encouragement from Falagard and 10 minutes, it worked!
And just to think, I spent 2 days on this! Now to create some nice lights.
Just recompiled with current version of Ogre, and put the new OgreMain.dll in the Gile[s] folder, and the newly compiled ExportOgre.dll into the Exporters folder, and off I go...
Thank You!!
[/edit]
-
- Gnoblar
- Posts: 17
- Joined: Sun Jun 10, 2007 3:25 am
- Location: Lebanon, TN USA
- Contact:
one more note: when exporting your lightmap from Gile[s] be sure to remove any unused textures, and use the mesh converter to convert the mesh to xml. Then scroll through the xml toward the bottom, and look for any empty submeshes. Remove them if present. You might get a vertex buffer error from Ogre if you don't. Then you can convert the mesh back to binary, and you should be good to go.
- walaber
- OGRE Expert User
- Posts: 829
- Joined: Sat Oct 02, 2004 2:20 pm
- Location: California, USA
- Contact: