Simulink Toolbox for Real-time Virtual Character Control
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.SimulinkProject
AUsFemaleBML.cpp
AUsFemaleBML_wrapper.cpp
AUsMaleBML.cpp
AUsMaleBML_wrapper.cpp
INSTALL.txt
README.md
VCTlbx.slx
VirtualCharacterSimulinkToolbox.prj
compile.bat
compile_64bit.bat
encStr2Arr.m
example_startup.m
faceString.cpp
faceString_wrapper.cpp
gazeString.cpp
gazeString_wrapper.cpp
install.bat
install_64bit.bat
pawnPos.c
pawnPos_wrapper.c
slblocks.m

README.md

VCSimulinkTlbx

Simulink Toolbox for Real-time Virtual Character Control

Installation

We install the library in %USERPROFILE%\Documents\MATLAB\VCSimulinkTlbx

For the library to load you have to add addpath '<%USERPROFILE%>\Documents\MATLAB\VCSimulinkTlbx' %use the full path e.g. c:\users\ulysses\documents\matlab\VCSimulinkTlbx to the file startup.m in %USERPROFILE%\Documents\MATLAB

Adding a Simulink library to the browser

  • At the MATLAB® command prompt, enable the model property EnableLBRepository. Your library appears in the library browser only if this property is on when you save your library. set_param(gcs,'EnableLBRepository','on');

  • Save the library in a folder in the MATLAB path

  • In MATLAB, right-click the folder you saved the library to and select New File > Script. Name the file slblocks.m.

  • Open slblocks.m and add this function to it and save.

      function blkStruct = slblocks
          Browser.Library = 'mylib'; 
      	Browser.Name = 'My Library'; 
      	blkStruct.Browser = Browser;
    
  • In the Library Browser, refresh to see the new library. Right-click the library list and select Refresh Library Browser.

Documentation for Blocks

Gaze controller

  • Uses the SmartBody specific "" to set the gaze point in 3D
  • Resetting the gaze is not implemented yet
  • "Extent" controls what joints are involved in the gaze behavior (potentially SmartBody specific)
    • 0.00 ... 0.25: EYES
    • 0.25 ... 0.50: EYES, NECK
    • 0.50 ... 0.75: EYES, NECK, CHEST
    • 0.75 ... 1.00: EYES, NECK, CHEST, BACK