๐Ÿ˜๏ธThe Animated Crowd

Overview

The animated crowd is our solution to handle rendering massive scales of players in an experience in a performant way. Instead of using a full "Unreal Actor" per player in the world, we replace distant actors with a highly optimized "animated crowd member", and swap out players between real actors (LoD 0) and the crowd as they move closer or further away.

Limitations of the crowd

Crowd members do not have a real skeletal mesh in the world like a full actor would. This means you cannot add things to the Skeletal Mesh such as collisions, attached UI, sound emitters etc. This means if your project is configured to use 30 full actors and 10k crowd members, things like collision checks, raycasts etc. would only be possible on the closest 30 players. This should be considered whenever designing gameplay features that rely on players having a full actor representation.

Configuration

Via the Pawn Set Asset

The "Pawn set asset" per role (see Game Roles) defines the LOD levels for the character, including what render targets they use for each. Typically, we have the first LOD level be an actor target type, and the second be the animated crowd.

You can configure the crowd data from here, e.g. using a different type of crowd, or modify the configuration/data associated with it. This flow can be very complex to modify - if you do think that you need to do so, please get in touch!

At Runtime

You can configure some settings regarding e.g. how many entities are rendered at which fidelity level, at runtime, using the following approaches:

The max number of characters that can be represented with real non-crowd actors is controlled by the PlayerClient.Rendering.NumInLOD0 live config flag (in the game config).

NOTE: By default, we assume that players are in the PlayerClient LOD Group. This can be configured if you want further flexibility.

Via BP

NOTE: This section contains features that were added for release version v29. Some functionality described here won't be present in earlier versions.

  • Via the RenderTargetManager (obtained from the authoritative Morpheus Actor via GetRenderTargetManagerFromAuthMorpheusActor), you can modify at runtime the max number of entities in a given LOD Level. e.g. to modify the number of non-crowd actors representing players, you can modify the max in LODGroupName = PlayerClient, LODLevel = 0.

  • For any MorpheusActor, you can modify its LOD Group live using UpdateClientLODGroup. If you want it to be rendered at a higher priority (e.g. for presenters that you want all players to be able to see at the highest fidelity at all times), you can set it to e.g. the Priority bucket within the PlayerClient group.

Last updated