Creating bsps for irrlicht!

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
RapchikProgrammer
Posts: 279
Joined: Fri Dec 24, 2004 6:37 pm

Creating bsps for irrlicht!

Post by RapchikProgrammer »

I am using gtk radiant to make my levels! I am using quake 3 textures and was succesful in makin one level! Ok no i load it in irrlicht it shows nothing? And when i load it in quake 3 and use /svpure 0 and /map try.bsp it works fine! I have copied the textures and in the console it shows that it loaded all the textures but at the oct tree there are 0 nodes and 0 polys! I have no idea what i have done wrong!
andrei25ni
Posts: 326
Joined: Wed Dec 14, 2005 10:08 pm

Post by andrei25ni »

Please post your code.

It's something wrong there, if you say that the textures are loaded, and the .bsp file is correct.

It should look like this :

Code: Select all

scene::IAnimatedMesh* mesh = smgr->getMesh("your path/your level.bsp");
scene::ISceneNode* node = 0;
node = smgr->addOctTreeSceneNode(mesh->getMesh(0));
Melancor
Posts: 7
Joined: Sun Apr 23, 2006 1:17 am

Post by Melancor »

I suppose, learning c++ this way is not recommended, anyway I dare asking:

The code generated by IrrWizard doesn't seem to include this feature.
The GameManager.ccp does


ISceneManager* CGameManager::getSceneManager()
{
return m_pSceneManager;
}


but I am too noobish to determine how to implement


scene::IAnimatedMesh* mesh = return m_pSceneManager->getMesh("your path/your level.bsp");
scene::ISceneNode* node = 0;
node = return m_pSceneManager->addOctTreeSceneNode(mesh->getMesh(0));


Is it not that simple?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

No, melancor, the code you posted is syntacitcally wrong. CGameManager::getSceneManager() is a method which returns the scene manager stored in a class structure, that's why the return statement is in there. You should either remove the return from your code (if inside the same class, but I doubt that) or use something like smgr=getSceneManager(); before continuing with andrei's code.
Melancor
Posts: 7
Joined: Sun Apr 23, 2006 1:17 am

Post by Melancor »

Thanx for the very fast reply. You're almost giving me the impression that I could learn c++ this way :wink:
Melancor
Posts: 7
Joined: Sun Apr 23, 2006 1:17 am

Post by Melancor »

Instead of messing with the wizard-generated code, I have worked my way through the tutorials and OF COURSE everything works fine.
BSP files are loaded allright, but maps appear crewed up (models missing) and need heavy customization when used with irrlicht. Having the .map file and being able to modify it with gktRadiant helps a lot.
Post Reply