Failed Triangulation


(Violator) #1

Got this while building map, its usually to do with the terrain but any ideas how to track down which triangle ‘failed’?


(hozz) #2

I only had this with bad geometry.

Look at the console, it gives you the coordinates of the error.
Create random entity, move it to the coordinates, search for it, to see where the error is located.
Then delete that brush or have a close look at the terrain there.


(Violator) #3

Thats the problem, it doesn’t give the co-ords :confused: I did find a weird object in the terrain model and deleted it but it didn’t fix it :frowning:

This is what it loggeth:


--- StartWorldCompile ---
 4758 total world brushes
    0 total bad brushes
  919 total world patches
  182 total world models
   57 total references
  367 entities
    0 bot entities
    2 total detail models
  188 LOD entities
    1 Imposter entities
14946 planes
    2 areaportals
    0 BSP-generating models
size: ( -20736 -20736 -4096 ) to ( 20736 20736 16896 )
renderable size: ( -16089.14355 -3642.12305 -131.93719 ) to ( 560.125 10492.00684 2353 )
MegaTexture Bounds: -16384 -16384 -8.00029 to 16384 16384 0.00072
[B]WARNING: Failed Triangulation
WARNING: Failed Triangulation[/B]
----- WriteOutputFile -----
Writing maps/estate4.procb
writing to: J:\ET\QW\estate 3\maps\estate4.procb
0 total shadow triangles
0 total shadow verts
writing maps/estate4.entities
writing to: J:\ET\QW\estate 3\maps\estate4.entities
writing maps/estate4.bot_entities
writing to: J:\ET\QW\estate 3\maps\estate4.bot_entities
-----------------------
Compile completed in 05:07
loaded collision model models/structures/edf/cc/cc_desert.lwo
Skipping model 'models/structures/edf/cc/cc_desert_minvistdist.lwo', no collision geometry
loaded collision model models/structures/edf/cc/cc_desert_minvistdist.lwo
loaded collision model models/e4.obj
writing maps/estate4.cm
writing to: J:\ET\QW\estate 3\maps\estate4.cm
writing maps/estate4.cmb
writing to: J:\ET\QW\estate 3\maps\estate4.cmb
collision data:
    73 models
 67391 vertices (789 kB)
 79149 edges (1855 kB)
 25089 polygons (1568 kB)
 93882 polygon edges (366 kB)
  4959 brushes (154 kB)
 29505 brush planes (461 kB)
  4666 nodes (127 kB)
 45763 polygon refs (357 kB)
  7771 brush refs (60 kB)
 24165 internal edges
    70 sharp edges
   772 contained polygons removed
   309 polygons merged
  5891 kB total memory used
-------------------------------------
Created collision map in 16
------------- Warnings ---------------
during compiling world...
[B]WARNING: Failed Triangulation[/B]
1 warnings
Compile finished.
------------- Warnings ---------------
during compiling world...
[B]WARNING: Failed Triangulation[/B]
1 warnings
checking for new release..
Opening IP socket: localhost:-1
Game is up to date

Examples of whats happening, LOD group doesn’t render at all (left is in editor, right is in-game). I use the same reference in other places and it renders ok. Removing the houses does remove the failed triangulation error though…


(pazur) #4

That looks like the compiler error I had:

http://www.splashdamage.com/forums/showpost.php?p=226841&postcount=11

Maybe the issues are related. For me it helped to uses more materials (I know… it sounds strange) and reduce the amount of brushwork.


(hozz) #5

What happens when you remove the terrain and compile (maybe with a simple brush for ground)?
I’d find out whether it’s the terrain, or some bad geometry.

Can you re-triangulate and -uv the terrain in blender? And try again?


(.Chris.) #6

Just ignore it if it doesn’t cause any problems, they seem to fix themselves over time, I’ve had this warning (note it’s not an error) pop up in almost all my maps, normally after clipping brushes.


(Violator) #7

Yeah I have gone a bit crazy on the detail this time :slight_smile: It is the house geometry as removing the houses removes the warning (I edited the post with the screenshots in), but I get other odd stuff like car models only being viewable from one side (you can always see their shadows) and when facing certain directions GL_INVALID_VALUE errors spamming in the console.


(Violator) #8

The LOD group consists of 3 levels, the low level is the one that’s dissapearing, the second level is for detail brushwork and the third for windows (patches which use another material and don’t cast shadows). If I remove the 2nd level the low level starts appearing again + the failed triangulation messages go away. Deleting the car models from the map removes the GL_INVALID_VALUE messages.


(SebaSOFT) #9

Do you have any portal with un-straight angles or not inside another wall?

I have the costime of snap all vertices to grid as much as I can


(Violator) #10

hi Seba yeah I remember that issue, I don’t even have any portals in the map yet (bar the atmos box). I think it is probably what Chris said, a dodgy clip operation on one of those black house gables, would be nice if it told you the co-ords but ah well :(.


(.Chris.) #11

From the top perspective in the grid view try selecting with left alt the edges of where you think there maybe something wrong and try deleting, example hopefully you can pick up the problem this way, I do this at times with clipping multiple objects with one brush already been the same length as what I’m cutting the rest at by mistake leaving a ‘non-brush’ or something.


(Violator) #12

Nice tip that, I didn’t find any dodgy brushwork but I’ve fixed the dissapearing LODs by swapping the level order. I had the ‘block’ level (0-12800) as level 2, and the ‘detail’ level (0-3500) as level 1. Swapping these round sorted it. I still get failed triangulation but its not causing and problems so far…