Page 1 of 1

Creating bsps for irrlicht!

Posted: Mon Apr 24, 2006 8:34 am
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!

Posted: Mon Apr 24, 2006 9:04 am
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));

Posted: Tue May 02, 2006 10:31 am
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?

Posted: Tue May 02, 2006 10:40 am
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.

Posted: Tue May 02, 2006 11:45 am
by Melancor
Thanx for the very fast reply. You're almost giving me the impression that I could learn c++ this way :wink:

Posted: Thu May 04, 2006 1:25 pm
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.