Hello I am looking at the "ExportNavigationData(....)" method that is part of the FRecastNavMeshGenerator.
I was wondering what the difference is between bExportGeometry being true or false.
While I realise what it actually does I was wonder which geometry it actually exports ? Is it collision geometry ?
const bool bExportGeometry = Element.Data.HasGeometry() && Element.ShouldUseGeometry(&DestNavMesh->NavDataConfig);
if (bExportGeometry && Element.Data.CollisionData.Num())
IndexBuffer.Reserve( IndexBuffer.Num() + (CachedGeometry.Header.NumFaces * 3 ));
CoordBuffer.Reserve( CoordBuffer.Num() + (CachedGeometry.Header.NumVerts * 3 ));
for (int32 i = 0; i < CachedGeometry.Header.NumFaces * 3; i++)
IndexBuffer.Add(CachedGeometry.Indices[i] + CoordBuffer.Num() / 3);
for (int32 i = 0; i < CachedGeometry.Header.NumVerts * 3; i++)
const TArray<FAreaNavModifier>& AreaMods = Element.Data.Modifiers.GetAreas();
for (int32 i = 0; i < AreaMods.Num(); i++)
ExportInfo.AreaId = NavData->GetAreaID(AreaMods[i].GetAreaClass());
if (AreaMods[i].GetShapeType() == ENavigationShapeType::Convex)
GrowConvexHull(NavData->AgentRadius, ExportInfo.Convex.Points, ConvexVerts);
ExportInfo.Convex.MinZ -= NavData->CellHeight;
ExportInfo.Convex.MaxZ += NavData->CellHeight;
ExportInfo.Convex.Points = ConvexVerts;
the final exported obj file size is quite substantially different.
I am investigating what is the best way for me to export the Navmesh data (I need to re-use it outside of unreal) and this method seems really well suited for my needs.
Further is there any progress/update on having streamed navmesh technology ?
I am playing around with some landscape terrains and the navmesh generation only works for the terrain that sits around the world origin. If however I try to export the navmesh data just with the sub level loaded (so not going through the world composition, then the generatede navmesh is correct and i can at least export it, )
Sep 15 '14 at 12:13 AM
in C++ Programming