Quake3 bsp map question

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.
sebas_76
Posts: 8
Joined: Mon Aug 25, 2008 11:02 am

Quake3 bsp map question

Post by sebas_76 »

Hi to all irrlicht coders,

I'm new on irrlicht. I'm a c++ coder for a long time now, and I have made my own 3d game engine with Directx 8 but now i'd like to use a more powerful engine as Irrlicht to use vertex/pixel shader etc..

I'd like to know if it is possible to draw or/and acces to the md3 model that are contained in a quake3 bsp map because I used them in my own engine for dynamic traps in level.

I have tried the Quake3MapShader example supplied with irrlicht sdk but there are few bugs on flame shader.
The flames or the object behind it flickers.
It is not a driver problem because these bug are always the same with opengl,directx or software render.

Thank for your help.

Seb
Quillraven
Posts: 62
Joined: Fri Aug 22, 2008 7:22 am

Post by Quillraven »

maybe i'm wrong, but look at the mainpage -> tutorials -> load a quake3map


maybe that's it, what you want to know.

i'm not sure, if there were "real flames", but maybe in the folder, where you installed irrlicht:
there should be an example folder with a subfolder, called demo. i think that there was the quake3map with flames, but as i said, i'm not sure :)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I think the flickering is part of the torch model/shader, because it doesn't happen with other shaders in more complex levels.
Moreover, these torches are not md3 models (IIRC), but Irrlicht 1.4.1 is capable of displaying md3 models and use them just like other formats already supported.
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

Those torches are md3 models, but have been included in the bsp (Quake3 liked to merge models with the bsp mesh when it could)
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, the torches are not flickering, it's the flames. And these are only visible if shader objects are displayed. But I don't know which parts are necessary for the whole models.
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

I've suspected that it may be a problem with how irrlicht creates the "shader" to represent the quake3 shader script for the flame. However, I haven't been able to dig around in the code to really check.

What I do know is that the flame shader is a very basic cycle through frames with transparency. It doesn't do some of the odder things that are possible with the Quake 3 shader scripting language.
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
sebas_76
Posts: 8
Joined: Mon Aug 25, 2008 11:02 am

Post by sebas_76 »

So nobody has an explanation why the flames flickers...

And can I get acees to
- bsp brushes with irrlicht or should I use my own functions to detec collision with brushes ?
- material and texture applid to a surface in the bsp ?

thanks.
sebas_76
Posts: 8
Joined: Mon Aug 25, 2008 11:02 am

Post by sebas_76 »

Aa I wrote previously, the md3 models included in the bsp (not separate md3 models) are not drawn by irrlicht, is there any way to acces to this md3 models for drawing them ?
jef
Posts: 18
Joined: Sat Nov 13, 2004 10:10 pm

Post by jef »

I guess you are using Irrlicht version 1.4.1 or older.
With the SVN trunk version the flames are not flickering.

// jef
sebas_76
Posts: 8
Joined: Mon Aug 25, 2008 11:02 am

Post by sebas_76 »

yes i use irrlicht 1.4.1
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Oh yes, you're right. Seesm like the extra frame has been fixed. However, I just noticed that the metal body of the torches is not properly depth rendered. If there are flames in front of the torches, you can see the metal body on top...
sebas_76
Posts: 8
Joined: Mon Aug 25, 2008 11:02 am

Post by sebas_76 »

bad if irrlicht don't display the quake shaders normally...

And is there any way to disply the static md3 model included in a quake3 bsp.
It will be great if it can do it else I must convert all my engine from Dx8 to irrlicht.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can load md3 content just as the other ressources. Don't know if you can figure the placement from the files.
sebas_76
Posts: 8
Joined: Mon Aug 25, 2008 11:02 am

Post by sebas_76 »

You don't understand what I mean.
In bsp file, there is static model included inside the bsp (for exemple trees) but irrlicht doesn't f display them at all. I can't load them seperately because they have vertex color (for shadow and lihgting).
jef
Posts: 18
Joined: Sat Nov 13, 2004 10:10 pm

Post by jef »

Have you looked in 'source\Irrlicht\CQ3LevelMesh.cpp'?

Not everything in the bsp is loaded...

Code: Select all

void CQ3LevelMesh::loadPlanes(tBSPLump* l, io::IReadFile* file)
{
        // ignore
}

void CQ3LevelMesh::loadNodes(tBSPLump* l, io::IReadFile* file)
{
        // ignore
}

void CQ3LevelMesh::loadLeafs(tBSPLump* l, io::IReadFile* file)
{
        // ignore
}

void CQ3LevelMesh::loadLeafFaces(tBSPLump* l, io::IReadFile* file)
{
        // ignore
}

void CQ3LevelMesh::loadVisData(tBSPLump* l, io::IReadFile* file)
{
        // ignore
}

...

void CQ3LevelMesh::loadModels(tBSPLump* l, io::IReadFile* file)
{
        // ignore
}

...

void CQ3LevelMesh::loadBrushes(tBSPLump* l, io::IReadFile* file)
{
        // ignore
}

void CQ3LevelMesh::loadBrushSides(tBSPLump* l, io::IReadFile* file)
{
        // ignore
}

void CQ3LevelMesh::loadLeafBrushes(tBSPLump* l, io::IReadFile* file)
{
        // ignore
}
Maybe that's why the model is not displayed.
Post Reply