-
Notifications
You must be signed in to change notification settings - Fork 1
How to Setup a Virtual Human in Unity
Setup a custom virtual human using an imported Character Creator asset in the SampleScene of the VHUnityHDRP or VHUnityURP project.
- Latest VHToolkit release with Unity VHUnityHDRP or VHUnityURP project.
- Completed all Unity import steps for the character, including the building of materials and prefab generation, from the How to Create and Integrate a Customized Character from Character Creator tutorial.
- Setup of any cloud-based services not included with the provided project that will be necessary for a customized use case.
-
Open the SampleScene of the respective project.
-
Select the prefab of the imported CC character.
-
Animator, set Controller to CCMaleAnimationController or CCFemaleAnimationController and set Avatar to the default associated with the .fbx.
-
Add the following components:
- VH Character Profile, add voice(s), NonverbalBehaviorGeneratorSystemCCFemale or Male, and custom prompt
- Mecanim Character, set Starting Posture and Voice Name
- Gaze Controller_IK
- Facial Animation Player_BlendShape; ensure Viseme Modifiers and Viseme To Blend Shape Mapping values filled out completely. Refer to captures in the following section.
- Head Controller, set Neck Transform Name to current CC prefab transform; e.g. CC_Base_Head; Nod Amplifer as 10
- Blink Value Provider, set Eye Lid Controller Params values according to current CC; e.g., 045_blink_lf and 045_blink_rf
- Eyelid Controller_Blend Shapes, set Dependencies Blink Controller and Gaze Provider values to current CC prefab. Ensure Eyelid Blend Shape Mapping values filled out completely. Refer to captures in the following section.
- Saccade Controller, set Eye Transform Names according to current CC, e.g., CC_Base_L_Eye and CC_Base_R_Eye; Mode -> Listen, Magnitude Scalar as 0.6; expand and ensure Eye Transform Name, Is Inverted -> Off
- Generic Male Adult Gesture Map
- BML Event Handler, set Character Controller to MechanimManager (in scene) and Cutscene Prefab to Cutscene01; Trim BML Timing When Parsing -> Off
Optional:
- Animator Messenger
- Listening Controller (set Head Controller to current CC)
- Mirroring Controller (set Character to current CC)
-
Add SoundNode as child object to CC prefab.
Note: Refer to values used for the component fields in the reference images that follow of an example CC virtual human.
-
In the CC prefab Animator component, select the Avatar to find it within the Project pane and select it.
- Click Configure Avatar
- Under Mapping, select Head
- Select the Jaw field and clear the transform by selecting None
- Click Apply then Done to exit the configuration screen
Note: These steps are necessary to ensure the jaw remains closed by default for idle animations.
-
Ensure all changes saved.
-
Drag CC prefab into scene at approximate location of Civilian Kevin; disable Civilian Kevin object in scene.
-
Play scene and test the CC virtual human's capabilities and dialogue.
Refer to the components and their values in the reference images below for successful setup of an example CC virtual human prefab.