Issue of Adjacent links being registered incorrectly in a ZoneGraph

<br>(This is a translation of a [Japanese [Content removed] by AXEL PROTO.)

I would like to ask about an issue of the ZoneGraph feature in Unreal Engine, as I am experiencing an issue where it does not behave as expected.

Summary:

When building a ZoneGraph, I saw a case where Adjacent lanes (links of the Adjacent type) were not be registered correctly under certain conditions.

I’d appreciate it if you could let me know whether this behavior is intended or a bug. If it’s a bug, I would like to know if there’s a plan for addressing it.

Prerequisites I understand:

I understand that in the current system, the lane data in ZoneGraph contains a range index of LaneLinks to maintain connection information, and that there are three types of links:

- Outgoing: connections that go away from the current lane

- Incoming: connections that come into the current lane

- Adjacent: connections of lanes that are adjacent

I expect that the Adjacent links should always be registered mutually.

Issue I am experiencing:

Under specific conditions, adjacent lanes may not be mutually registered as links of the Adjacent type. Specifically, I have confirmed the following when Lane A and Lane B are adjacent:

(i) Lane B is registered as Adjacent in the Links of Lane A.

(ii) However, Lane A is not registered as Adjacent in the Links of Lane B.

Conditions for occurrence:

As far as I confirmed in my environment, this issue occurs under the following conditions:

(a) The type of ZoneShape is Polygon.

(b) Different lane profiles are set for each vertex.

(c) On a lane that connects between a vertex with a narrow lane profile and a vertex with a wider lane profile.

Cause of the issue:

Looking into the code of ZoneGraphBuilder, I guess that this might occur due to the implementation of FZoneGraphBuilder::ConnectLanes().

It seems that Polygon-type lanes are not registered as InternalLinks before this function is called, and that the links are calculated when the following condition is true:

if (AdjacentLaneCount == 0)

In this section of the code, there is a comment stating “Assumes adjacent lanes have the same width.” However, this assumption is not always true when different lane profiles are set for each vertex. As a result, when a narrow lane connects to a wider lane, the assumption is not true, so that adjacent links are not registered.

Related issues:

Due to this behavior, for example, if a crowd is implemented as in CitySample and the crowd needs to make a U-turn on a Polygon type lane that connects lanes of different widths, the route may not be calculated as the adjacent lanes cannot be obtained.

Questions:

(1) Is this behavior intended or a bug?

(2) If it is a bug, is there a plan to fix this?

(3) If there is a recommended workaround to register adjacent links correctly in a Polygon-type ZoneShape with different lane profiles for each vertex, please let me know.

(4) I am using a Spline-type ZoneShape with lane profiles of different widths for connection. If there is any better method, please let me know.

Thank you in advance.

This certainly seems like a bug, but there are no plans for any further work on ZoneGraph at this time. The plugin is planned to continue to be available, but we are not doing any further development on it. If you work on fixing it yourself, we would be glad to review a PR to add it to the engine.

-James

[mention removed]​

The licensee has been waiting for you to answer his additional question.

Thanks.

[mention removed]​

Please answer the additional question. The licensee is waiting for you to answer.

[mention removed]​

Could you see this thread, please?

[mention removed]​

(This is a translation of a Japanese post by AXEL PROTO.)

Thank you very much for your reply.

I understand that it’s a bug. I’ll address this by modifying the engine when using ZoneGraph in our project.

> we are not doing any further development on it.

Let me ask an additional question about this. I understand that ZoneGraph is like a navigation system for moving a large number of objects, which is intended to be used with data-oriented design (DOD) utilizing the Mass framework. So, are you developing a new DOD navigation system akin to the existing NavigationMesh, separately from ZoneGraph (like StateTree v.s. BehaviorTree)?

Thank you.

My apologies. For some reason this particular thread is not showing up for me in my case view.

We have added experimental support for using Mass entities with navmesh in 5.6. There have been improvements to the movement and avoidance as well. The plugin is still very experimental, but it is a first approach to getting this to work. There are also new StateTree tasks for using the navmesh that were added. All of this should be included in the MassAI plugin. The code is in the MassAIBehavior and MassNavMeshNavigation folders in the plugin.