-
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 CCMaleAvatarController or CCFemaleAvatarController (refer to steps in the next section for "Override" controller) and set Avatar to CC_Default_AvatarAvatar
-
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_Animator (not currently working; however, set Animator to the current CC prefab)
- Head Controller (set Neck Transform Name to current CC prefab transform, e.g. CC_Base_Head; Nod Amplifer as 10)
- Blink Controller (set Eye Lid Controller Params values according to current CC, e.g., 045_blink_lf and 045_blink_rf)
- 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.
-
Ensure changes saved.
-
Drag prefab into scene at approximate location of Civilian Kevin; disable Civilian Kevin object in scene.
-
Play scene and test the virtual human's capabilities and dialogue.
New CC5 characters may have additional brow, eye lash and facial hair child layers inside the FBX which include blend shapes but do not animate by default with the corresponding Animator Controller. Instead, an "Override" Animator Controller with specific assets must be setup for the character.
- Top menu, select Ride > Visemes
- In the Visemes window, drag the desired CC5 asset prefab to the Character Root field (e.g. ccJohn)
- Ensure Output Folder path is correct to save generated assets
- Drag the associated base Animator Controller to the window (e.g. CCMaleAnimatorController)
- Click Generate All to generate all the face shapes specific to this character, using all the skinned mesh renderers present on this character (attachments, beards, etc.)
- Click Create Override Controller to generate the override mentioned above and assign it to the prefab.
Refer to the components and their values in the reference images below for successful setup of an example CC virtual human prefab.