[SOLVED]problem with displaying a bsp map
-
- Posts: 24
- Joined: Sun Apr 09, 2006 8:19 pm
[SOLVED]problem with displaying a bsp map
hello everyone,
i started designing a fps game with this engine a few time ago. i thought using .bsp maps would be an amazing solution for the level creation as i have designed some levels in gtkradient before.
but everytime i load them into the engine (like described in the tutorial) there are many very strange display errors where planes that lie behind others are drawn in front of them and so on. additionally some of my mesh-planes even dissappeared if the lightmap has drawn them nearly black.
you know that error? i searched the whole forum two days but found nothing.
mfg
Jonas
ps: i add an screenshot below:
<img>http://loretta-with.no-ip.org/screenshot.jpg</img>
(if the image is not sightable the server may be down)
i started designing a fps game with this engine a few time ago. i thought using .bsp maps would be an amazing solution for the level creation as i have designed some levels in gtkradient before.
but everytime i load them into the engine (like described in the tutorial) there are many very strange display errors where planes that lie behind others are drawn in front of them and so on. additionally some of my mesh-planes even dissappeared if the lightmap has drawn them nearly black.
you know that error? i searched the whole forum two days but found nothing.
mfg
Jonas
ps: i add an screenshot below:
<img>http://loretta-with.no-ip.org/screenshot.jpg</img>
(if the image is not sightable the server may be down)
Last edited by Belshamaroth on Mon Apr 10, 2006 2:06 pm, edited 1 time in total.
use http://imageshack.us/ to post the screenshot.
noone know what wrong now..
noone know what wrong now..
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
-
- Posts: 24
- Joined: Sun Apr 09, 2006 8:19 pm
-
- Posts: 24
- Joined: Sun Apr 09, 2006 8:19 pm
Sry but the image is really dark and i really can barely see anything.....maybe post some code....or upload the source and the bsp and I will try to solve it.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
-
- Posts: 24
- Joined: Sun Apr 09, 2006 8:19 pm
So this means that the normals of your project are not correct. Check with your exporter if you can change this, or try to recalculate all of them in Irrlicht using the MeshManipulator. I'm not aware of a bug in the bsp loader, although many file formats are not very explicit about their normal orientation.
-
- Posts: 24
- Joined: Sun Apr 09, 2006 8:19 pm
-
- Posts: 24
- Joined: Sun Apr 09, 2006 8:19 pm
ok i tried it with recalculating the normals.
now every wall is sightable.
but now there is another problem.
the faces are solid but you can see objects and walls which are behind them.
(i have a zombie scene node which is following the player's cam)
how to fix that?
i played a little bit with the material properties but didnt get it
now every wall is sightable.
but now there is another problem.
the faces are solid but you can see objects and walls which are behind them.
(i have a zombie scene node which is following the player's cam)
how to fix that?
i played a little bit with the material properties but didnt get it
-
- Posts: 24
- Joined: Sun Apr 09, 2006 8:19 pm
i fixed all normals with my 3d program. (i used a less complicated room)
to load the bsp map i use following code:
Code: Select all
scene::IAnimatedMesh* q3levelmesh = smgr->getMesh("test.bsp");
scene::ISceneNode* q3node = 0;
smgr->getMeshManipulator()->recalculateNormals(q3levelmesh->getMesh(0));
if (q3levelmesh)
q3node = smgr->addAnimatedMeshSceneNode(q3levelmesh);
q3node->setMaterialType(video::EMT_SOLID);
q3node->setMaterialFlag(video::EMF_LIGHTING, false);
q3node->setMaterialFlag(video::EMF_FOG_ENABLE, true);
q3node->setMaterialFlag(video::EMF_BACK_FACE_CULLING , false);
q3node->setDebugDataVisible(true);
-
- Posts: 24
- Joined: Sun Apr 09, 2006 8:19 pm