当前位置:网站首页>Unity | 实现面部驱动的两种方式
Unity | 实现面部驱动的两种方式
2022-07-06 01:08:00 【烫青菜】
目录
一、运用unity Live Capture插件与iphone Unity Face Capture软件
(2)创建一个空物体(命名:Recorder),添加Take Recorder组件。
(3)将模型拖入场景,并添加ARKit Face Actor组件,将该模型制作成Prefab。
(4)设置模型ARKit Face Actor组件中的mapper。
(5)设置New FaceDevice的ARKit Face Device组件的Actor值。
3. iphone下载Unity Face Capture软件
一、运用unity Live Capture插件与iphone Unity Face Capture软件
1. 版本要求
- unity版本:Unity Editor 2020.3.16f1 or later version
- iphone版本:iOS 14.6 or higher
- 参考文档:About Live Capture | Live Capture | 1.0.1 (unity3d.com)
2. unity中操作:
(1)引入Live Capture Package
Live Capture在Package Manager中通过git url的方式进行添加:

(2)创建一个空物体(命名:Recorder),添加Take Recorder组件。
在该组件下添加ARKit Face Device:此时会在Recorder物体下自动创建New FaceDevice,该物体上有个ARKit Face Device组件。

(3)将模型拖入场景,并添加ARKit Face Actor组件,将该模型制作成Prefab。
注意模型导入Unity时要勾选Import BlendShapes(检查一下即可,unity默认勾选)。
在Project中创建一个mapper(右键/Create/Live Capture / ARKit Face Capture / Mapper),设置mapper相关属性(RigPrefab指定为上一步生成的prefab,LeftEye、RightEye、Head要选择对应的关节。这一步目的是映射BlendShape,如果我们的模型BlendShape名称符合苹果的ARKit要求,则AddRender操作会自动映射,否则需要我们手动设置)。

(4)设置模型ARKit Face Actor组件中的mapper。
(5)设置New FaceDevice的ARKit Face Device组件的Actor值。
(6)创建服务器。
点击Window/Live Capture/Connections,点击Configure FireWall。点击Create Server/Companion App Server,点击Start开启服务。

3. iphone下载Unity Face Capture软件
打开软件(该软件在iphone 12 Pro Max 15.4.1上亲测稳定,在iphone X上会发热闪退),输入IP及Port,连接之后就可以驱动了~(如果连不上,可能unity版本不符合或者网络不符合,可参考官方文档:About Live Capture | Live Capture | 1.0.1 (unity3d.com))
二、通过算法数据来控制BlendShape数值。
1.相关函数
- 获取BlendShape数量及对应名称。
public sealed class Mesh : Object
{
public int blendShapeCount { get; }
public string GetBlendShapeName(int shapeIndex);
}- 设置BlendShape权重
public class SkinnedMeshRenderer : Renderer{
public void SetBlendShapeWeight(int index, float value);
}2.实现
可能算法提供的数据值范围为0-1,所以在SetBlendShapeWeight时要*100。
Dictionary<string, int> bs_map;//模型上的bs名称-索引
skinnedMeshRenderer.SetBlendShapeWeight(bs_map["eyebrow_BS.Eyebrows_Sad_L"], 20);边栏推荐
- JMeter BeanShell的基本用法 一下语法只能在beanshell中使用
- The value of applet containers
- 朝招金安全吗 会不会亏损本金
- Logstash clear sincedb_ Path upload records and retransmit log data
- Xunrui CMS plug-in automatically collects fake original free plug-ins
- I'm interested in watching Tiktok live beyond concert
- The population logic of the request to read product data on the sap Spartacus home page
- ADS-NPU芯片架构设计的五大挑战
- Idea remotely submits spark tasks to the yarn cluster
- Getting started with devkit
猜你喜欢

For a deadline, the IT fellow graduated from Tsinghua suddenly died on the toilet

测试/开发程序员的成长路线,全局思考问题的问题......

Ubantu check cudnn and CUDA versions

esxi的安装和使用

cf:D. Insert a Progression【关于数组中的插入 + 绝对值的性质 + 贪心一头一尾最值】
![[groovy] compile time meta programming (compile time method interception | method interception in myasttransformation visit method)](/img/e4/a41fe26efe389351780b322917d721.jpg)
[groovy] compile time meta programming (compile time method interception | method interception in myasttransformation visit method)

I'm interested in watching Tiktok live beyond concert

1791. Find the central node of the star diagram / 1790 Can two strings be equal by performing string exchange only once

Some features of ECMAScript

关于softmax函数的见解
随机推荐
A preliminary study of geojson
1791. Find the central node of the star diagram / 1790 Can two strings be equal by performing string exchange only once
Cve-2017-11882 reappearance
curlpost-php
Curlpost PHP
Free chat robot API
The value of applet containers
After Luke zettlemoyer, head of meta AI Seattle research | trillion parameters, will the large model continue to grow?
cf:D. Insert a Progression【关于数组中的插入 + 绝对值的性质 + 贪心一头一尾最值】
Beginner redis
毕设-基于SSM高校学生社团管理系统
直播系统代码,自定义软键盘样式:字母、数字、标点三种切换
[groovy] XML serialization (use markupbuilder to generate XML data | set XML tag content | set XML tag attributes)
可恢复保险丝特性测试
有谁知道 达梦数据库表的列的数据类型 精度怎么修改呀
从 1.5 开始搭建一个微服务框架——调用链追踪 traceId
Cf:d. insert a progression [about the insert in the array + the nature of absolute value + greedy top-down]
面试必刷算法TOP101之回溯篇 TOP34
Leetcode daily question solution: 1189 Maximum number of "balloons"
vSphere实现虚拟机迁移