Q3bsp
Nope, I just played around with it and I got the same result.. actually not quite true. first time I put my q3node->setMaterialFlag(video::EMF_BACK_FACE_CULLING, false); in teh wrong place... got a nice crash out of it
second time in the right place, but no visiable change. It looks almost like the vertexs are getting sorted wrong, causing the some face normals to point inside a brush while others point the correct why ..hmmm
second time in the right place, but no visiable change. It looks almost like the vertexs are getting sorted wrong, causing the some face normals to point inside a brush while others point the correct why ..hmmm
I just used a different BSP compilier, it fixed all the problems and seems better too
http://www.inficad.com/~mnichol/dummies/index
It works and is simple to understand..
http://www.inficad.com/~mnichol/dummies/index
It works and is simple to understand..
Please, put tools me on mail, but that reference does not work!WhytWulf wrote:I just used a different BSP compilier, it fixed all the problems and seems better too
http://www.inficad.com/~mnichol/dummies/index
It works and is simple to understand..
tsantsinger@mail.ru
half a solution to a half triangle problem
i think that q3map2 is actually the compiler that GtkRadiant uses. i came across the problem you mentioned of a bsp level being loaded with only half of it's triangles showing. the following image is a simple hollow box room created in gtkRadiant and exported to bsp then loaded in irrlichtWhytWulf wrote:I just used a different BSP compilier, it fixed all the problems and seems better too
http://www.inficad.com/~mnichol/dummies/index
It works and is simple to understand..
i started playing around with the command line switches and came up with a solution that seems to work. it seems the problem is that the first bsp build option in gtkradiant has the -meta command which apparently doesn't work well with irrlicht. what i did was create my own .bat files to create the bsp like so:
build_basic_bsp.bat
Code: Select all
"C:/Program Files/GtkRadiant-1.3/q3map2" -v -game quake3 -fs_basepath "C:/Program Files/Quake III Arena/" "C:/Program Files/Quake III Arena/baseq3/maps/my_irr_map.map" > "C:/Program Files/GtkRadiant-1.3/junk.txt"
pause
here is a shot of the same level without the triangle trouble
Is is possible to find the cause for this bug and fix it in Irrlicht?
I am not a 3D programmer, but I can debug fairly well, so if someone will point me in the right direction I may find it. I am a complete Irrlicht newbie though so I will have to go through reading the source code first.
Its really an annoying bug, cause I am currently lacking the Q3 editor and the bsp tool to fix it for me... I am on dialup, and have problems downloading a 34MB file...
SkyFlash
I am not a 3D programmer, but I can debug fairly well, so if someone will point me in the right direction I may find it. I am a complete Irrlicht newbie though so I will have to go through reading the source code first.
Its really an annoying bug, cause I am currently lacking the Q3 editor and the bsp tool to fix it for me... I am on dialup, and have problems downloading a 34MB file...
SkyFlash
Last night, I made a long debugging session, and I've found the bug. I'll include a fix into the next release of the engine, but for all of you who can't wait, I'll post the corrected code into here. In CQ3LevelMesh.cpp, there is a method called CQ3LevelMesh::constructMesh(). In the big switch inside, replace the case 3 and case 1 with the following code:SkyFlash wrote:Is is possible to find the cause for this bug and fix it in Irrlicht?
Code: Select all
case 3: // mesh vertices
case 1: // normal polygons
{
for (s32 tf=0; tf<Faces[i].numMeshVerts; tf+=3)
{
s32 idx = meshBuffer->getVertexCount();
s32 vidxes[3];
vidxes[0] = MeshVerts[Faces[i].meshVertIndex + tf +0]
+ Faces[i].vertexIndex;
vidxes[1] = MeshVerts[Faces[i].meshVertIndex + tf +1]
+ Faces[i].vertexIndex;
vidxes[2] = MeshVerts[Faces[i].meshVertIndex + tf +2]
+ Faces[i].vertexIndex;
// add all three vertices
for (s32 vu=0; vu<3; ++vu)
{
video::S3DVertex2TCoords currentVertex;
tBSPVertex *v = &Vertices[vidxes[vu]];
//currentVertex.Color = video::SColor(v->color[3], v->color[0], v->color[1], v->color[2]);
currentVertex.Color.set(255,255,255,255);
currentVertex.Pos.X = v->vPosition[0];
currentVertex.Pos.Y = v->vPosition[2];
currentVertex.Pos.Z = v->vPosition[1];
currentVertex.Normal.X = v->vNormal[0];
currentVertex.Normal.Y = v->vNormal[2];
currentVertex.Normal.Z = v->vNormal[1];
currentVertex.TCoords.X = v->vTextureCoord[0];
currentVertex.TCoords.Y = v->vTextureCoord[1];
currentVertex.TCoords2.X = v->vLightmapCoord[0];
currentVertex.TCoords2.Y = v->vLightmapCoord[1];
meshBuffer->Vertices.push_back(currentVertex);
}
// add indexes
meshBuffer->Indices.push_back(idx);
meshBuffer->Indices.push_back(idx+1);
meshBuffer->Indices.push_back(idx+2);
}
}
break;
wow, nice level!
wow...where do you get these levels? i have been having trouble finding good free levels on the web.
-Ted
-Ted
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
does this problem still happen sometimes with more complicated geometry, regardless of removing the -meta tag with q3bsp2? I started adding more complex geometry into my scene then noticed triangles disappearing on SOME faces, definately not 1/2 of them like the -meta problem, but occasionally. I can post a screenshot if needed. I'm wondering if my problem is related to this or if its caused entirely by something else.
No, I haven't applied the patch yet.
Sorry for the confusion, I was basically asking if these problems still occur ocasionally when you haven't installed the patch, but instead you are using the posted work-around, which was to remove the -meta flag from the q3map2 command line options.
I guess I'll try installing the patch anyway. Was a little hesitant, since I'm pretty new to the engine, didn't want to end up breaking something, heh
Sorry for the confusion, I was basically asking if these problems still occur ocasionally when you haven't installed the patch, but instead you are using the posted work-around, which was to remove the -meta flag from the q3map2 command line options.
I guess I'll try installing the patch anyway. Was a little hesitant, since I'm pretty new to the engine, didn't want to end up breaking something, heh