# Animated Crowd

## Configuration <a href="#configuration" id="configuration"></a>

### Via the Morpheus Actor

{% hint style="warning" %}
NOTE: This section is available from release v40 onwards.
{% endhint %}

In your Morpheus Actor's details panel, you are able to configure its render targets using our simplified configuration - see `Morpheus Render Target Settings`

{% hint style="info" %}
NOTE: The animated crowd currently assumes you are using the [Avatars](/platform-documentation/creation/unreal-development/features-and-tutorials/avatars.md)system, which handles informing the crowd which mesh to use.
{% endhint %}

* If you tick `Crowd Enabled`, then your morpheus actor will use the animated crowd.
  * By default, the crowd will be configured automatically for you, deriving its fields from the render target actor used. If you want more specialist configuration, you can configure it in the [#advanced-configuration](#advanced-configuration "mention").
  * NOTE: For regular player characters using our [Avatars](/platform-documentation/creation/unreal-development/features-and-tutorials/avatars.md) system,
* You can toggle this live using `MorpheusActorRenderTargetComponent::SetUsingCrowd` (will need to be called on every client)

<figure><img src="/files/DxOdSM4Ft8dHNiM0l6KE" alt=""><figcaption><p>In this example, we are using the default pawn as your LOD0 render target actor, and have the animated crowd enabled, with a raycastable crowd (see <a data-mention href="/pages/90EbJiPa567px3PSwlTW">/pages/90EbJiPa567px3PSwlTW</a>). Without specifying any advanced Crowd Details, the raycastable crowd will be obtained from your settings, and your crowd details will be obtained from your LOD0 render target actor.</p></figcaption></figure>

#### Advanced configuration

In the `Advanced` section, you can provide overrides to the `Crowd Details`:

<figure><img src="/files/QCOdTF89I0VXugE9H2BC" alt=""><figcaption></figcaption></figure>

* `IsmActorType` defaults to the `DefaultInstancedMeshActorClass` defined in `Project Settings -> Morpheus Platform -> Animated Crowd Settings`. We do not advise changing this in most use cases.
* `Raycastable Crowd Class` defaults to the `DefaultRaycastableCrowdClass` in the same project settings. This can freely be configured to suit your project.
  * You can also modify the class using `SetRaycastableCrowdClass` or `ResetRaycastableCrowdClass`.
  * For more details, see [Raycastable Crowd](/platform-documentation/creation/unreal-development/features-and-tutorials/enabling-raytracing-for-crowd-members.md)

For details on the other settings, see [Morpheus Render Targets](/platform-documentation/creation/unreal-development/getting-started/networking/morpheus-render-targets.md).

### Via the Pawn Set Asset

The "Pawn set asset" (see [Character Configuration](/platform-documentation/creation/unreal-development/getting-started/differences-in-unreal-development-workflow/msquared-character-configuration.md#pawn-sets)) 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.

<figure><img src="/files/0Ry6OQuaxJdcrUi2bK8w" alt=""><figcaption></figcaption></figure>

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:

#### Via [Live Config](/platform-documentation/creation/unreal-development/features-and-tutorials/live-config.md)

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).

<figure><img src="/files/voVqEkIU6fLg4wOACq9H" alt=""><figcaption><p>By default there are 35 entities in the first LOD Level for the <code>PlayerClient</code> lod group (the non-crowd level)</p></figcaption></figure>

{% hint style="info" %}
NOTE: By default, we assume that players are in the `PlayerClient` LOD Group. This can be configured if you want further flexibility.
{% endhint %}

#### Via BP

{% hint style="warning" %}
NOTE: This section contains features that were added for release version v29. Some functionality described here won't be present in earlier versions.
{% endhint %}

* 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.

<figure><img src="/files/JU61PJq5YtqEzqs5SFD8" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.otherside.xyz/platform-documentation/creation/unreal-development/features-and-tutorials/the-animated-crowd/legacy-animated-crowd.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
