找回密码
 立即注册
查看: 255|回复: 0

unity 面部捕捉

[复制链接]
发表于 2022-12-26 17:42 | 显示全部楼层 |阅读模式
github        VTuber-Python-Unity                                                                               
unity        Server-Start-Waiting for a connection..                                                                               
python        python main.py --connect                                                                                                                               
No module named 'cv2'                                                                                       
国内镜像pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple                                                                                       
                                                                                       
pip install opencv-python                                                                                       
                                                                                       
ModuleNotFoundError: No module named 'mediapipe'                                                                                       
Segmentation fault                                                                                       
                                                                                       
pip install mediapipe                                                                                       
                                                                                       
File "main.py", line 86, in main                                                                                       
    pose_estimator = PoseEstimator((img.shape[0], img.shape[1]))                                                                                       
AttributeError: 'NoneType' object has no attribute 'shape'                                                                                       
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.                                                                                       
                                                                                       
电脑没摄像头                                                                                        unity        start        TCPServer.InitTCP()                                                                       
                TCPServer.SetUIInteractables                                设置按钮是否可点击                                       
public void InitTCP() {                                                                                       
    try {                                                                                       
        // local host                                                                                       
        server = new TcpListener(IPAddress.Parse("127.0.0.1"), port);                                                                                       
        server.Start();                                                                                       
                                                                                       
        serverUp = true;                                                                                       
                                                                                       
        // create a thread to accept client                                                                                       
        receiveThread = new Thread(new ThreadStart(ReceiveData));                                                                                       
        receiveThread.IsBackground = true;                                                                                       
        receiveThread.Start();                                                                                       
                                                                                               
    } catch(Exception e) {                                                                                       
        // usually error occurs if the port is used by other program.                                                                                       
        // a "SocketException: Address already in use" error will show up here                                                                                       
        print(e.ToString());                                                                                       
    }                                                                                               
}                                                                                       
                                                                                       
private void ReceiveData() {                                                                                       
    try {                                                                                       
        // Buffer                                                                                       
        Byte[] bytes = new Byte[1024];                                                                                       
                                                                                       
        while(true) {                                                                                       
            print("Waiting for a connection...");                                                                                       
                                                                                       
            client = server.AcceptTcpClient();                                                                                       
            print("Connected!");                                                                                       
                                                                                       
            // I/O Stream for sending/ receiving to/ from client                                                                                       
            NetworkStream stream = client.GetStream();                                                                                       
                                                                                       
            int length;                                                                                       
                                                                                       
                while ((length = stream.Read(bytes, 0, bytes.Length)) != 0) {                                                                                       
                var incommingData = new byte[length];                                                                                       
                Array.Copy(bytes, 0, incommingData, 0, length);                                                                                       
                string clientMessage = Encoding.ASCII.GetString(incommingData);                                                                                       
                                                                                       
                // call Hiyori Controller to update values                                                                                       
                hiyoriController.parseMessage(clientMessage);                                                                                       
                                                                                       
                print("Received message: " + clientMessage);                                                                                       
                                                                                       
                // SendData(client);                                                                                       
                                                                                       
            }                                                                                       
        }                                                                                       
    }                                                                                       
    catch(Exception e) {                                                                                       
        print(e.ToString());                                                                                       
    }                                                                                       
}                                                                                       
                                                                                       
hiyoriController = GameObject.FindWithTag("Player").GetComponent<HiyoriController>();                                                                                        Steam       
VUP        面部捕捉        动作捕捉        全身捕捉(含手指)                leapmotion        Hi5手指捕捉        青瞳光学捕捉        声音捕捉               
                摄像头        Noitom        虚拟动力                                                       
                                                                                       
                云端化        多人同屏        弹幕互动                低精度        动漫                               
                                                                                       
                                                                                       
facerig        面部追踪软件                                高精度                                       
一些工具                                                                                                                                                                               
live2d                制作虚拟形象的网站                                                                       
arkit        苹果52个blendshape                                                                               
faceit        blender的blendshape生成插件,faceit不知道怎么用,照着视频操作,报错了                                                                               
readyplayer                自动生成角色模型                                                                       
animation rigging                unity里程序化动画绑定IK插件                                                                       
final ik插件                unity里骨骼控制插件                                                                       
                                                                                       
shadertoy                学习以及写shader的网站                                                                       
timeline                复杂动作,电影级分镜的过场动画。                                                                       
                资源右键create-timeline,赋值给场景空物体。                                                                       
                多个物体联合动画,场景创建物体cube然后拖动到上面创建的空物体timeline编辑器里。                                                                       
                选择Add Animation Track,开启红点Start recording,移动物体即保存该帧,移动到其他帧,再移动物体完成另一帧,再点击红点可完成动画。                                                                       
                右键片段Convert To Clip Track可转换成可拖动块。
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-4-30 10:33 , Processed in 0.098160 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表