problem loading tutorial 2 bsp

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
gitrinec

problem loading tutorial 2 bsp

Post by gitrinec »

I am having a problem I keep getting an error message when loading my file error is could not load mesh because file could not be opened 20kdm2.bsp

thanks
Boris
Posts: 14
Joined: Sun Oct 17, 2004 6:58 pm

Post by Boris »

Same thing with me! And I didn't get an answer yet.
gitrinec

hmm

Post by gitrinec »

maybe its our setup maybe its similiar I have tried every type of directory for it and it still tells me that it cant load the bsp and the window just stays grey tells me fps.
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Do you have the lastest direct x drivers?

Maybe you two should compare systems it could be a graphics card problem or something else hardware related.

Are you having problems with any of the other tutorials?

what version of Irrlicht are you using? is it the correct .DLL?

information is key boys provide more information and you'll give the rest of us more opertunity to help.

it's like taking a car to the mechanic if it doesn't fail for the mechanic and it's not a typical problem then all they can do is guess.
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Post by Robomaniac »

Sounds like its your directory structure.
The Robomaniac
Project Head / Lead Programmer
Centaur Force
gitrinec

hmm

Post by gitrinec »

Im using the latest ati radeon driver i have a ati radeon 9000 ii pro, directx 9.0c installed I noticed that when I tried anything but opengl in the options it wouldnt even give me the grey window the only version i have is the 7.0 version also when trying to load directx9.0 i get a driver was not compiled into this dll. try opengl. Error: could not load built-in Font. here is the code

#include <irrlicht.h>
#include <iostream>

using namespace irr;

#pragma comment(lib, "Irrlicht.lib")

int main()
{

// ask user for driver

video::E_DRIVER_TYPE driverType = video::EDT_DIRECTX9;
printf("Please select the driver you want for this example:\n"\
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.2\n"\
" (d) Software Renderer\n (e) NullDevice\n (otherKey) exit\n\n");

char i;
std::cin >> i;
switch(i)
{
case 'a': driverType = video::EDT_DIRECTX9; break;
case 'b': driverType = video::EDT_DIRECTX8; break;
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_NULL; break;
default: return 1;
}
// create device and exit if creation failed
IrrlichtDevice *device =
createDevice(driverType, core::dimension2d<s32>(640, 480));
if (device == 0)
return 1;

video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();

device->getFileSystem()->addZipFileArchive("../media/20kdm2.pk3");

scene::IAnimatedMesh* mesh = smgr->getMesh("20kdm2.bsp");
scene::ISceneNode* node = 0;

if (mesh)
node = smgr->addOctTreeSceneNode(mesh->getMesh(0));

if (node)
node->setPosition(core::vector3df(-1300,-144,-1249));

smgr->addCameraSceneNodeFPS();

device->getCursorControl()->setVisible(false);

int lastFPS = -1;

while(device->run())
{
driver->beginScene(true, true, video::SColor(0,200,200,200));
smgr->drawAll();
driver->endScene();

int fps = driver->getFPS();
if (lastFPS != fps)
{
core::stringw str = L"Irrlicht Engine - Vertex and pixel shader example [";
str += driver->getName();
str += "] FPS:";
str += fps;
device->setWindowCaption(str.c_str());
lastFPS = fps;
}
}

device->drop();
return 0;
}
Boris
Posts: 14
Joined: Sun Oct 17, 2004 6:58 pm

Post by Boris »

I don't think problem is in our directory structure, because we both succesfuly loaded *.pk file, and as I understand pk3 is compressed file that contains *.bsp files. (correct me if I am wrong).
gitrinec
Posts: 1
Joined: Mon Oct 18, 2004 6:36 pm

problem solved

Post by gitrinec »

Hey Boris problem solved in the directory for the pk3 make sure you supply an actual directory like ("c:/irrlicht-0.7/media/20kdm2.pk3"); instead of what the tutorial says ../../
Boris
Posts: 14
Joined: Sun Oct 17, 2004 6:58 pm

Post by Boris »

Are you saying that I have to use absolute path instead of relative?? I don't understand: how come I had no trouble loading other *.pk3's with relative path??
Well, I'll try it anyway.
trinec

hmm

Post by trinec »

hey boris Im not sure exactly on your situation but for some reason relative paths didnt work for me but Im only using the pk3 that came with irrlicht I have tried using another one but it states its missing a bunch of texture files and a few models.
Boris
Posts: 14
Joined: Sun Oct 17, 2004 6:58 pm

Post by Boris »

As I was answered before, the reason engine is unable to load some textures and models is because you (am i right?) don't have installed Quake 3 on your system. It doesn't make much sense to me, but that's what I've been told, and I don't think that issue is conected with this loading problem.
trinec

hmm

Post by trinec »

yes I have it installed is there somewhere that I need to point to a q3 texture directory or something
Post Reply