sadmeat / sadmeat.github.io

5 stars 0 forks source link

Face Tracking Feature #1

Open duke1102 opened 6 years ago

duke1102 commented 6 years ago

Hey there! You probably know about the software FaceRig, which can use your webcam to track your face and map that onto the model.

I think Meat would benefit from such a feature and it should certainly be possible to do with web technologies. A quick search brought up https://github.com/auduno/clmtrackr - which is a JavaScript library for exactly that.

If you want I can play around a bit with integrating it and let you know once it works.

sadmeat commented 6 years ago

Hey Duke, Thanks for your interest in implementing this feature but there are a couple things that could make this a little bit problematic:

1) This project was made during one day. While programming it I didn't had in mind to expand it any further. Thus everything is pretty much hard coded and the code is not set up to be expanded. The programming style I used isn't that pretty too. The code might need to have to be rewritten in order to implement this feature.

2) The model I created isn't fully rigged. You can move the neck and the head, open and close the mouth and move the eye lids a little bit. For a proper facerig you need a better rigged model but I am not capable of doing it. I never was good at rigging ^^''' But even if someome made a better rig this would mean to rewrite the code because everything is hard coded.

3) The HTML-Javascript implementation isn't running that great. Vinny barely can use it with his streaming setup. He did mention that the program is "leaking" and can't use it for too long. Adding clmtrackr to it would increase the resource usage even further. I tried the tracker out and I had a CPU usage of 20%. I don't know how great this would work.

Because of the "leaking" I made a C++ port (MeatCam V4) which runs at much better performance. But still it's a port of this version which means that it is as messy as this project.

I can upload the C++ port too if you want to look into it but my hopes are not high for this to happen with this code base.

An other possibility would be to rig the model better and then export it directly to FaceRig. Why reimplement the wheel if everybody else is using a proper wheel?

This project was meant to be just a little joke that Vinny and chat can giggle about.

Besides that: Would Vinny even want to use it? He would have to set up a cam, align himself properly, add some lighting and so on... I honestly think that it is too much work for him for just a little gag. Now it is just a little program that he starts when he is feeling funny but with a face tacker its much more work for him.

I too thought about this feature but I don't think that it is worth the effort.

I won't hold you back if you still want to implement it. You are free to what ever you want with this project.

duke1102 commented 6 years ago

Hey!

Yea, I'm always up to look at the C++ base. Actually I'd be satisfied with the 3D model alone, might be able to use it as a base to hook it up with FaceRig.

sadmeat commented 6 years ago

I made a new repository for the C++ port and here is the link to the models: https://drive.google.com/drive/folders/1lLvqxXqfHm2srwHUN-MqtF0-85gE98vB