Overview
vhToolkitUnity is the Unity3D rendered version of the Virtual Human Toolkit. This project integrates several research systems together in order for the user to interact with a virtual human character through usage of text to speech and language understanding. Some of the systems that are integrated into his project are the Smartbody animation system, text to speech engines, and AcquireSpeech . Unity is a 3rd party proprietary rendering engine and is provided as binary-only with the Virtual Human Toolkit. You can download the free version of Unity here. For changing art assets you need to purchase Unity Pro. vhtoolkitUnity was created using the vhAssets package as a starting point.
The Toolkit also contains an open source renderer Ogre which only serves as a proof-of-concept and is not fully supported.
Users
Launching Unity
In the Launcher, click the Launch button in the Renderer row (click the Advanced button if you don't see any rows). Be sure to have the Engine parameter set to 'Unity'. A small option screen pops up allowing you to select several graphical settings. The most important ones are:
- Screen resolution. The higher the resolution, the better the graphics look, but the slower they are.
- Graphics quality. The higher the quality, the better the graphics look, but the slower they are.
- Windowed. Check if you want the renderer to be windowed, uncheck if you want it to launch full screen.
Once you're happy with your settings, click 'Play!'. Unity should now continue loading.
Navigating Unity
You can use the W,A,S and D keys to move the camera, and Q and E to move it up and down. Hit J to toggle mouse look; this allows you to use the mouse to change the direction the camera is facing.
Interacting with Brad Using Text
Toggle the text box with L. Use the arrow keys to see suggested questions, or type in your own questions. Hit Say to ask Brad the question.
Interacting with Brad Using Speech
You can talk to Brad using a mouse and microphone when Unity is in full screen mode. Use the M key to turn this ability on and off. When the ability is on, click and hold the left mouse button while you are asking your question, and release when you're done talking.
Keyboard Commands
- W,A,S,D - camera movement. Q & E - camera up/down
- J - mouse visibility toggle - mouse look mode
- L - toggles the fake recognizer text box
- O - toggles the user's recognized text
- M - toggles speech recognition mode. When on, click and hold and talk in the mic. Release to quit talking.
- X - reset camera
- Z - show debug statistics
- I - Toggles sbm character subtitles
- P - Toggle entire GUI
- Alt-enter - toggle windowed / fullscreen
- Escape - quit
Accessing the Command Console
Use the ~ key to bring up the console.
Using SmartBody Bonebus Mode
Bonebus mode uses Smartbody as a separate process instead of integrated within Unity. This is useful if you have Unity Free since Smartbody uses Unity Plugins which is a Pro only feature.
- While the Toolkit is running, press 'C'
Click 'Launch SB Bonebus' and the SmartBody window will open
Click 'Bonebus Init Scene' and the Characters will re-initialize in bonebus mode
If Unity will not Play because you have Unity Free, then click the SmartbodyManager gameobject and disable it before playing.
Developers
Loading VHToolkit Scene
- Open Unity
- File->Open Project (this may already be done for you if this is the first time you've launched Unity)
- On the Open Project tab, click the Open Other button.
- Navigate to the VHToolkit Unity Project here: <VHToolkit>\core\vhtoolkitUnity
- Click Select Folder
- In the Project column, double click on vhtoolkitScene.
- Click Play
Creating your own Project using the VHToolkit Unity Package
- 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.
There are differences because Unity Pro uses an .dll version of smartbody, and runs within the process. For Unity Free, Smartbody is launched as a separate process and communicates to Unity via network traffic.
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:
- 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>
- 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.
- 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
</outdated>
Creating your own Virtual Human
Creating your own Virtual Human has different meanings to different groups. Some people want to use the existing characters that we supply, but only change certain features like giving them a different voice, or a different colored shirt. Others groups want to use a different character, but the character was created using a standard character package that we already support (Mixamo, etc). Others want to use a completely different character with a unique skeleton, etc. These instructions will attempt to explain the different features and how to customize based on your needs.
The easiest way to use your own Virtual Human is to create a Unity Project using the included .unitypackages as a starting point. From here, you can add/change features on the default character, or bring in your own and customize using the existing character for reference.
Using the Console
Hit the ~ key to bring up the console. Here you can see some debug information. Type 'help' for all available commands.
Overview of the main commands:
- q - quit
- play_intro - Play intro sequence
- vhmsg ... - Send vhmsg out to system. 'vhmsg sbm ...' for sending a smartbody command
- setresolution x y - Set resolution to 'x' x 'y'. Example 'setresolution 1024 768'
- toggle_fullscreen - toggle windowed / fullscreen
Message API
Receives:
Sends:
Known Issues
- ...
FAQ
See Main FAQ for frequently asked questions regarding the installer. Please use the Google Groups emailing list for unlisted questions.