Giter Club home page Giter Club logo

ue5masstest's Introduction

UE5MassTest

Testing the functionality of the UnrealEngine5 Mass System:

TODO:

Documentation : just started to upload

Github formatting

Buggy: Height Tracing disabling doesn't work for Usable Objects.
Position Snapping: Some agents snap to their end position (LoDOff Processor is off tho?)
Agent Avoidance: Disable avoidance if they are blocked too long (Planet Coaster approach)
Reduce force when reenabling avoidance: currently avoidance is disabled for far away LoDs, on reenabling it crowded areas get pushed beyond paths or clip through objects.

Documentation:

Current UE5 official documentation not the best, therefore here is some of my observations and understandings of parts from the system:
The goal is to create a Roller Coaster Tycoon like crowd, which is running around in a park, using objects or targeting POI (points of interests)
Basic behavior of the agents is done in the State Tree via custom Tasks.

Vertex Texture Animation:

The project uses vertex texture animation to gain a lot of performance from agent animations.
For simplicity I used the finished ones from https://github.com/Ji-Rath/MassAITesting
But with correct setup you can use https://github.com/Rexocrates/VAT_Example_Project to generate your own.

Height calculation:

By default currently a simple (hardcoded values for testing) height tracing processor is running in the background since we don't use collision.
The performance impact is noticeable. It should be disabled when using an object via tagging, which the height processor filters. Atm variable ticktime also impacts the height calculations. Potentially should add a height smoother together with reduced trace frequency.

Navigation Path:

Currently navigation is done through NavMesh path finding from UE5, I use a StateTreeTask which generates the path points upfront, so we dont query paths all the time, and then it simply follows each point until it reaches its target, with a custom navigation processor.

State Tree:

StateTree Tasks are not ticked every frame, they tick once their state is active after EnterState() and then need to be signaled again to receive another tick.
For example a Wait Task can schedule delay signals itself, to receive a second tick where it checks for the time.

image

In cases where you have a Move Player Task and need to wait for the movement to be finished,
you would just have the Task set the location and have a Processor do the calculations and once the processor is done,
it can send a Signal to the StateTree again for the Task to receive another tick when it is done.

For example moving to a POI location, you can have a seperate task which checks for a new POI location on EnterState,
setting the Move fragment’s Center location and it’s other parametners, which are automatically Processed by a Movement Processor.

image

In a seperate task or just the same tasks’s Tick function you can thecn check if we have reached the location:

image

The tasks itself doesnt process it every frame so we let our Processor Signal them when the movement is done:

image

Here an example for those task in use:

image

UDN Developer message about StateTrees:

image

Showcase:

Simple Park Testscene - 2k agents https://user-images.githubusercontent.com/8298923/181391571-799067ff-9d67-4d27-a87c-bf8bf0aabcae.mp4

7k Agents close https://user-images.githubusercontent.com/8298923/181391734-6fc8be5d-acff-4c9d-96ac-4f3290322be8.mp4

7k Agents far https://user-images.githubusercontent.com/8298923/181391798-0f143902-d865-4548-a2f8-c52ccc9c517c.mp4

ue5masstest's People

Contributors

sleicreider avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.