This is useful when a project file (.GSET) has been loaded with predetermined navmesh bounds, which allows you to check the new bounds to the old, and also see what you will be resetting too if mistakes were made during the modification thereof.
When loading from .gset, the editor would clip anything outside the stored bounds, but we still need the outer bounds as otherwise editing the existing bounds would be a lot harder.
The thickness of the bounds were increased, so the red one doesn't need to be darker anymore. Previously it was hard to see compared to the blue poly's.
There was an issue where Recast's common math library was less complete than that of Detour. Some common math operations were also isolated in specific translation units causing copies everywhere. All common math operations have been moved to the Shared library ultimately fixing all the above issues.
Make sure there is a navmesh before attempting to build static pathing data. The crash gets triggered when loading geometry, and trying to build a tile without generating the navmesh first.
The near clip plane has been increased significantly. This was never adjusted correctly with the large scale change that was done to make Recast work with the scale of Titanfall and Apex maps. The near clipping is still minimal but the z-fighting problem has been fixed entirely. The offset for Recast and Detour debug drawing have also been reduced significantly as a result, since they no longer need to be offset that much. Also removed a comment regarding the projection matrix since we have to adjust the projection matric for XYZ rendering.
Hull human wasn't able to reach places where it should. Multiplying it with its scale (0.5), makes them able to do so, and the navmeshes also look very similar to Titanfall 2 navmeshes around door frames and corridors now.
User can now define where the navmesh will be build and what would be excluded in the map. Also adjusted some colors of existing bounding boxes to make them more visible. They weren't as visible as they used to be after the UX and rendering improvements.
The depth testing is useful when rendering the navmesh without a background (e.g. disabling the rendering of the input geom). But when rendering with the geometry, it should be disabled as otherwise some data will overlap and become invisible (the off-mesh links or poly verts, or boundaries when looking from a tilted perspective).
This function was originally 'duDebugDrawHeightfieldLayers', it was once renamed by the Recast authors, but the old declaration has never been removed.
New ability to adjust it in all directions, recast and detour offsets are separate. By default, the Recast mesh renders 20 units from the input geom and Detour 30 units to avoid z-fighting.
Going below a cell size of 12 will cause bad artifacts during the rasterization of the navmesh as the voxel mold would be too detailed. Also clamped the min of the cell height to 0.4 since any value below that will result in no navmesh getting generated on correct topology, so no point going lower.
The original min values for size and height were 0.1, but due to the scale differences with our maps and what recast was originally configured with, adjustments had to be made.
- Make NavMesh light blue (original color, but more solid and vibrant).
- Make Recast poly mesh and height field's darker blue, but more opaque.
- Increase render thickness of outer poly boundaries (should and will be an option in the debug class soon).
- Increase render size of poly verts (should and will be an option in the debug class soon).
- Make gradient background color slightly more uniform with the GUI.
Agent's height should not be multiplied by its scale, but rather the agent's climb height. It should also be lower than the agent's height. So an agent of height 75 should have a climb height of height * scale, which for human is 36 (72 * 0.5). Also increased the max clamp for the "Max Climb" slider.
Static pathing data is only build when the entire navmesh is build, but if an individual tile has been created, then the data isn't rebuild to accommodate the changes. Building code has been moved to the base class as it should be used for all tile editors, and is now also called from other code paths that require it.
Flags are changed to game specific flags, but never reset after build causing the recast debug draw to be incorrect. Reset area flags to fix this issue.
Regression was caused in commit f95eb13ab30c78c03c38aa20492389d0fdf39a7f. The m_tileSize member was moved to the base class as this allows us to run the navmesh type selector in the base class which is subclassed by all the other 3 editors. The member wasn't removed from the tilemesh editor class causing it to shadow the base class one.
Renamed them to brushes, and renamed the ground brush to clip to be more consistent with the naming convention of the tools used for Source Engine and this particular game.
Factor should be 100, as 512x512 tiles with only 4 verts in Titanfall navmeshes are 5242, ours are twice as large +1. Our tiles are also 512x512 for small to medium navmeshes, and this constant results in nearly identical values, it was still off with 1 (5243 vs 5242).
Probing another poly in a Titanfall 2 navmesh, resulted in a polygon surface area of 1152.0, quantized by 100 is 11.52, the value stored in the Titanfall 2 navmesh was 11 so the value needs to be floored.
The values are now identical between custom and original navmeshes.