Table of Contents | ||
---|---|---|
|
...
- Open Unity
- File->New Project
- You need 2 Unity Packages to start with. You'll find all packages here: <VHToolkit>\bin\vhtoolkitUnity. Copy them to <your project>\Assets.
- First, is the vhAssets package. This contains common scripts and libraries used in various Virtual Humans applications. There is a different .unitypackage file for each platform.
- vhAssetsPackage.unityPackage (Windows)
- vhAssetsPackageOSX.unityPackage
- vhAssetsPackageIOS.unityPackage
- vhAssetsPackageAndroid.unityPackage
- Second, is the vhAssets Test Scene. This contains assets and scripts that will initialize a very basic test scene environment. This file is: vhAssetsTestScenePackage.unityPackage
- Copy the 2 Unity Packages to this new project.
- In Unity, in the 'Project' column, double click on the 2 Unity Packages.
- Open Scenes->vhAssetsTestScene
- Click Play. The virtual human should be animating in an idle pose. Hit 'C' to show a debug menu. You should be able to control him via the buttons on the debug menu.
<outdated>
These instructions are for both Unity Pro and Unity Free. When there are specific instructions for a particular version, they have been marked as such.
...
- .
...
Steps:
- You now have to create a Prefab for the character.
- In the Project column, click Create -> Prefab
- Drag 'New Prefab' to the Resources folder
- Click on 'New Prefab' to rename it to 'BradPrefab'
- Drag 'Brad' onto 'BradPrefab' to create a prefab of Brad
- Still in the Project column, open up vhAssets\sbm
- Drag UnitySmartbodyCharacter to BradPrefab
- Create a SoundNode for the character:
Select BradPrefab. In the Inspector, change 'Bone Parent Name' to CharacterRoot1/AccumulationRoot since that's how the hierarchy is set up in our current character. That points to the 'top' of the skeleton hierarchy.- Go to GameObject->Create Empty
- In the Hierarchy, rename GameObject to SoundNode
- With SoundNode selected, go to Component->Audio->Audio Source
- In the Project column, drag BradPrefab to the Hierarchy
- Drag SoundNode to BradPrefab in the Hierarchy. A dialog will pop up saying that this will lose the prefab connection. Click Continue.
- In the Hierarchy, drag BradPrefab onto the BradPrefab in the Project column.
- Remove BradPrefab from Hierarchy
- <todo> <set the position of the SoundNode to the character's mouth>
- Still in the Inspector, select the checkbox 'Is Face Bone Driven'. Turn that on.
- Now we are ready to test
- In Unity, hit Play button
- (Unity Free) Launch Smartbody as a separate process. Run <VHToolkit>\tools\launch-scripts\run-toolkit-sbm.bat
- Brad should appear and animating with his idle animation.
- Try and play an animation
- Open the Unity debug console by hitting tilde (~)
- Type the following command: vhmsg sbm bml char brad anim HandsAtSide_Arms_Chop
...
Creating your own Virtual Human
...