Trail Rending of Agents with NavMesh, Physics, Unity and CityEngine

Combining simple agent based models with physics objects and rendering techniques in a game engine has potential for city wide 3D urban modelling. Traditional techniques often use JAVA based solutions or custom written toolkits with researchers developing their own models. With recent advances in procedural modelling and game engine technology, with the move to real time data feeds and advanced physics engines, there is notable potential.

Trail Render in Unity

Trail Render in Unity

Yesterday’s post on ‘Shortest Path Modelling and NavMesh in Unity and CityEngine‘ explored a simple target/navmesh approach. If you add physics to the target and use the ‘trail rendering’ effects of Unity you can create a dynamic scene with the paths of the agents traced. It is of course exploratory, but the possibilities are intriguing:

The Trail Renderer is simply used to make trails behind objects in the scene as they move about – with the addition of physics the ball reacts to the mesh and the agents are continuously calculating a shortest path. This is computationally intensive so a question remains on the number of agents Unity can handle in a single simulation, we will be exploring this over the coming weeks.

Author Bio

Andy is Professor of Digital Urban Systems at the Centre for Advanced Spatial Analysis at University College London.

Leave a Reply