Update SocialGroups authored by Daniel Rupp's avatar Daniel Rupp
Our character plugin provides a simple way to set up Social Groups. Social Groups are freestanding conversational groups.
Our character plugin provides a simple way to set up Social Groups. Social Groups are freestanding conversational groups, with 2-10 participants. In theory, groups bigger than 10 are possible, but have not been tested.
[[_TOC_]]
......@@ -22,54 +22,54 @@ Instead of placing VHs into the scene and adding them to the Social Group, it is
## Social Group Actor
The Social Group actor will show up in the scene as blue ball and will not be visible during the game. Move the Actor to the position, where the center of the group should be.
In the details panel under the category "Social Group", the following properties can be changed:
In the details panel under the category **Social Group**, the following properties can be changed:
| Parameter| Details |
|----------|---------|
|Agents in Group|Only available to edit, if Spawn as Group is turned off. Allows the user to specify the agents, that should form a group.|
|Spawn as Group|If this is set to true, the Agents will spawn automatically.|
|Group Size|The amount of agents that shall be spawned, if Spawn as Group is set to true.|
|VH Types|A list containing different VH types, that will be spawned. Ideally, the amount of entries should be equal to the group size, otherwise, the same agent might get spawned twice.|
|Agents in Group|Only available to edit, if ``Spawn as Group`` is turned off. Allows the user to specify the agents, that should form a group.|
|Spawn as Group|If this is set to true, the agents will spawn automatically.|
|Group Size|The amount of agents that shall be spawned, if ``Spawn as Group`` is set to true.|
|VH Types|The different types of VHs that will be spawned. If ``Spawn as Group`` is set to true, provide at least one entry here, otherwise no agent will be spawned. Ideally, the amount of entries should be equal to the group size, otherwise, the same agent might get spawned twice.|
|Conversation Distance|Default: 140. Specifies the distance between each VH.|
|Gaze Distance|Default: 220. The Euclidean distance between a non group actor (e.g. the user) and a group member. Below this distance, the agent in the group will gaze at the outsider. See [State Machine](#social-group-behavior).|
|Still Standing Variance|Default: 100. The radius in which the user is allowed to move, before a leave is detected.|
|Join Distance|Default: 100. The distance to the outside of the group, before a leave is detected.|
|Still Standing Variance|Default: 100. The radius in which the user is allowed to move, before a leave is detected. See [State Machine](#social-group-behavior).|
|Join Distance|Default: 100. The Euclidean distance to the group, before a leave is detected. See [State Machine](#social-group-behavior).|
When tinkering around with these values, make sure the following relationship is preserved:
Gaze Distance > Join Distance >= Still Standing Variance.
Under the Subcategory _Dialogue_, parameters can be found for setting up the dialogue system of the social group.
Under the Subcategory **Dialogue**, parameters can be found for setting up the dialogue system of the Social Group.
|Parameter|Details|
|---------|-------|
|Dialogues|A list of Dialogues, that will be distributed among the group members.|
|Start Dialogue|If true, the dialogue system will start with the game|
|Number of Agents in Conversation|Specifies, on how many group members, the Dialogues will be distributed.|
|Number of Agents in Conversation|Specifies, on how many group members, the ``Dialogues`` will be distributed.|
|Loop Dialogue|If true, dialogue is replayed again.|
Dialogues is a list containing parameters necessary to make agents speak and includes:
``Dialogues`` is a list containing parameters necessary to make agents speak and includes:
|Parameter|Details|
|---------|-------|
|Dialogue Anim Montage|The Animation Montage containing the Lip Sync Animation. See [Face Animation](Components/FaceAnimation)|
|Audiofile|The Path to the Audiofile. This path will be used by the Virtual Acoustic Plugin.|
|Audiofile|The Path to the Audiofile. This path will be used by the [Virtual Acoustic Plugin](https://devhub.vr.rwth-aachen.de/VR-Group/unreal-development/plugins/unreal-va-plugin/-/wikis/Home).|
|Gender|The Gender of the group member, this dialogue should be assigned to.|
## Social Group Behavior
The "behavior" of the social group is programmed as a state machine. The following state machine provides an overview of the behavior.
The "behavior" of the Social Group is programmed as a state machine. The following state machine provides an overview of the behavior.
![SocialGroupStateMachine_v1.0](uploads/191bd75cc07a15fa2addf48eb17937f7/SocialGroupStateMachine_v1.0.png)
Because the group forms a circular arrangement, we specify D as the distance between the user and the group center minus the group radius, i.e. the distance between the user and the perimeter of the circle. We start in the Idle state. If D is smaller than the Gaze Distance, the group changes to the gazing state.
### Gazing
The two agents closest to the user add the user to their gazing pattern. If the distance increases to D > _GazeDistance_ + R/3, we go back to the Idle state. To not jump around sates, R/3 was added (R = Group Radius). If the distance decreases to D < _JoinDistance_ and if the user is oriented towards the group center, a join is detected and the state changes to In Group.
The two agents closest to the user, add the user to their gazing pattern. If the distance increases to D > _GazeDistance_ + R/3, we go back to the **Idle **state. To not jump around sates, R/3 was added (R = Group Radius). If the distance decreases to D < _JoinDistance_ and if the user is oriented towards the group center, a join is detected and the state changes to **In Group**.
### In Group
If the user is in the group, he is added to the agents gazing pattern. If the distance to the group center increases to D > _JoinDistance_+ _StillStandingVariance_ and if the user is not oriented to the group center anymore, a leave is detected and the state is changed to Leaving.
If the user is in the group, he is added to the agents gazing pattern. If the distance to the group center increases to D > _JoinDistance_ + _StillStandingVariance_ and if the user is not oriented to the group center anymore, a leave is detected and the state is changed to **Leaving**.
### Leaving
The Leaving state, ensures, that the user needs to increase his distance to D > _GazeDistance_ + R/3 in order for a new Join to be detected.
The **Leaving ** state, ensures, that the user needs to increase his distance to D > _GazeDistance_ + R/3 in order for a new Join to be detected.
......@@ -79,6 +79,6 @@ The **VHSocialGroups** component introduces the following functions:
* ``LeaveGroup()`` Removes the agent from its current Social Group. After this call a movement call should follow, otherwise, the agent will not move away from the group.
The **Social Group** actor introduces the following functions:
* ``StartDialogue(float InitialDelay)`` If the dialogue did not start with begin play, because bStartDialogue was turned off, use this function to start the dialogue at a later point in time. The dialogue will start after the given initial delay.
* ``JoinGroup(AVirtualHuman* VH)`` Makes the given agent walk towards the Social Group. If close enough, the agetn will join the group.
* ``StartDialogue(float InitialDelay)`` If the dialogue did not start with begin play, because ``Start Dialogue`` was turned off, use this function to start the dialogue at a later point in time. The dialogue will start after the given initial delay.
* ``JoinGroup(AVirtualHuman* VH)`` Makes the given agent walk towards the Social Group. If close enough, the agent will join the group.
* ``LeaveGroup(AVirtualHuman* VH)`` Removes the given agent from the Social Group. After this call a movement call should follow, otherwise, the agent will not move away from the group.