Action Units
Effect example: ActionunitsGrout
#
Action UnitsTo use the Action Units feature the input .fbx file should have blend shape targets with the names corresponding to the supported Action Units:
Name | Support Status |
---|---|
BrowDownRight | OK |
BrowDownLeft | OK |
BrowInnerUp | OK |
BrowOuterUpRight | OK |
BrowOuterUpLeft | OK |
CheekPuff | - |
CheekSquintRight | OK |
CheekSquintLeft | OK |
JawForward | - |
JawRight | OK |
JawLeft | OK |
JawOpen | OK |
MouthClose | - |
MouthFunnel | - |
MouthPucker | - |
MouthRight | OK |
MouthLeft | OK |
MouthSmileRight | OK |
MouthSmileLeft | OK |
MouthDimpleRight | - |
MouthDimpleLeft | - |
MouthRollUpper | - |
MouthShrugUpper | - |
MouthShrugLower | OK |
MouthRollLower | - |
MouthFrownRight | - |
MouthFrownLeft | - |
MouthUpperUpRight | - |
MouthUpperUpLeft | - |
MouthLowerDownRight | - |
MouthLowerDownLeft | - |
NoseSneerRight | OK |
NoseSneerLeft | OK |
MouthPressRight | - |
MouthPressLeft | - |
MouthStretchRight | OK |
MouthStretchLeft | OK |
EyeBlinkRight | - |
EyeBlinkLeft | - |
EyeWideRight | - |
EyeWideLeft | - |
EyeSquintRight | OK |
EyeSquintLeft | OK |
EyeLookDownRight | - |
EyeLookInRight | - |
EyeLookOutRight | - |
EyeLookUpRight | - |
EyeLookDownLeft | - |
EyeLookInLeft | - |
EyeLookOutLeft | - |
EyeLookUpLeft | - |
For more details about these targets refer to the ARKit documentation
note
It's not necessary to provide the blend shapes for all supported Action Units.
#
Effect buildCreate your Action Unit effect following the steps described in the section Animated 3d mask.
Convert the .fbx file with action units blend shapes manually into .bsm2 mesh and .ktx texture with blend shapes data:
The command above produces groot.bsm2 and bs_groot_nomip_point.ktx files and writes to console the list of the blend shape names:
Filter Editor supports models with action units and puts groot.bsm2 and bs_groot_nomip_point.ktx files to the effect folder after converting.
Open effect config.json and add the action units array with its names listed in the same order as in the console output of fbx_bsm2, and add recognizer: ["action_units"] property.
Filter Editor generates action_units property if model contains action units data.
Copy the created bs_groot_nomip_point.ktx file to the effect folder and assign it to tex_blend_shapes sampler for all materials from this .fbx in cfg.toml.
note
tex_blend_shapes is the name of 2DArray samlper in vertex shader. If you use custom shader make sure that the name of 2DArray samlper in shader and the name of the sampler in cfg.toml are the same.
Change the vertex shaders of all materials from this .fbx to: