   BSP Artifacts !!!
  sorry for re-posting this, but it really bothers me, and couln't fix it.I've been trying to render an indoor scene, but in some areas and certain camera angles in the map, there are some strange pixel artifacts :I think this occurs when something (skybox in this case) is rendered behind the wall, and on the splitting planes of the BSP.I also welded the vertices in BSP compiler, so there wouldn't be any "too near" vertices to cause imprecision problems.I have also tested it on nVidia cards and the pixel are gone, but on ATI cards the problem still persists.could anyone give me any hint on this ?thanks   
  This is almost certainly floating point precision problems caused when splitting the walls of your bsp by hyperplanes.Im assuming your skybox is blue, rendered first, with the walls rendered afterwards..You are seeing parts of the skybox through the seams where the wall was split.The only thing I can suggest is that in your splitting code, to re-weild vertices that have been split, using an EPSILON value.   ;  Hi,Could the problem be t-junctions? Maybe a wireframe shot of the same place would help [smile]Regards,ViLiO   ;Quote:The only thing I can suggest is that in your splitting code, to re-weild vertices that have been split, using an EPSILON value.I guess it's from imprecision too, but I can't figure out where.I have checked my welding algorithm again, it welds all room/sector verts after bsp generation by 0.01 value.besides that, the BSP splitting algorithm does not generate repeated vertices, for example if you have a quad(4 vertices) and when you split it in half, the algorithm generates two quads and 6 vertices. so there is no repeated vertices right out of the procedure, and doesn't even need welding.Quote:Could the problem be t-junctions? Maybe a wireframe shot of the same place would helphere is the same edge that has pixel artifacts on it in wireframe mode :another guess is when calculating polygon normals before bsp compilation, some of the normals have imprecisions like (0, 0, 0.99999999) instead of (0, 0, 1).and that may cause problems when splitting other polys with this normal as super plane. but I did some rounding for these normals, and bsp algorithm got messed up badly.anyway, don't you think it's a little wierd cuz the same geometry have no problems on nVidia cards and has artifacts on ATI cards ? if it has imprecision in bsp compilation, how can it cause different results on different cards ?   ;  If you're using a skybox that covers 100% of the background, a quick hack is to NOT clear the backbuffer before drawing the scene. This way you'll only ever have similar-colored pixels showing through the cracks, rather than an obvious background color.   ;  Hi,If the face i've highlighted with blue doesn't have a vertex at the yellow spot, then you have a t-junction. This can result in discontinuities between edges (and this may well be the case on your radeon).Removing them can be quite a pain, I recently spent a good week implementing and debugging the method Yann described hereI also posted the code I currently use here. If you find any bugs in it then let me know [smile]All the best,ViLiO   ;  That, my friend, is a class T-junction, and exactly the kind of artifact you might see.  These can also cause your physics to weird out if you use the same geometry.What you need to do is to fix the t-junctions.  One way is to turn your bsp into regular triangles.  Then for each vertex, search for nearby triangles.  For each of these nearby triangles, see if this vertex splits one of their edges or faces.  If so, split the triangle with respect to this vertex.  This will create some extra tris, but will prevent these artifacts.Another related issue can happen if you have two edges in an X that overlap without a vertex where the 2 edges intersect.  This again requires the ability to find nearby triangle edges, and do an edge-edge intersection to see if they intersect somewhere other than a vertex.;  oh, thanks for pointing out the problemI'll work on t-junctions and ask help if I got problems implementing it   