NumesSanguis / FACSvatar

An Open Source Modular Framework From Face to FACS Based Avatar Animation (Unity3D / Blender)
GNU Lesser General Public License v3.0
430 stars 97 forks source link

Background rotation in visualizing pose angles #32

Open MonikaGahalawat11 opened 3 years ago

MonikaGahalawat11 commented 3 years ago

I am trying to visualize videos from Openface using pose angles. The issue I'm having is that the background also rotates along the character's face. How can I stop the background rotation and visualize only character head motion? I'd be thankful for any help in this regard.

deepsurbhi8 commented 3 years ago

Hi, I was also trying to do the same as mentioned in @MonikaGahalawat11 comment. Same problem is with me as well. I only want to rotate the pose angles of characters not the world coordinates of the scene. Kindly helo.

NumesSanguis commented 3 years ago

Hey, thank you for trying out FACSvatar. I haven't come across this problem myself (check on YouTube for "FACSvatar"), so I need some more details.

Can you also make a screen capture of what is happening (e.g. using OBS studio)?

deepsurbhi8 commented 3 years ago

Hi,

In your video as well at time 10-13 minutes when character is animating then background is also animating it is not static. I am using Unity3D which I downloaded from the mentioned link.

I followed the mentioned steps as:

  1. By setting docker in the FACSvatar/modules
  2. I am doing 2 things for my project: one is animating only AUs and 2nd rotating only pose values with the help of Pose Rx, Ry and Rz generated from openface.
  3. I am replacing my own csv file by copying it to the docker and making its image.
  4. Then I am running main.py for my own file
  5. I followed all the steps mentioned on the github page. Nothing from myside.

I have not modified anything. The main problem is, I need to see head motion only for 2 sec data and if I see side view it is ok as background is static and when i am using frontal view it is a complete mess as background is not static. I am also attaching the screen capture for both side and front view.

What I want is, in the frontal view only character should animate while background should be static. I hope I am clear now with the problem statement.

If you could help me out, I shall be very thankful to you.

https://user-images.githubusercontent.com/60603102/115540543-c2758d80-a2bb-11eb-8c31-265537a0f3c2.mp4

https://user-images.githubusercontent.com/60603102/115540551-c43f5100-a2bb-11eb-8bd8-7942b4f241e8.mp4

NumesSanguis commented 3 years ago

I understand your problem now. This happens because the 1st-person camera is attached to the head of the character.

In my own research experiment, the user was the avatar, so if the user moved his/her head, the avatar should move.

In your case you should detach the camera from the avatar's head and just put it somewhere fixed in the scene (like the 3rd-person view / side view camera). I'm not an expert with Unity3D and camera positioning is just something related to Unity3D in general and not this project in particular, so I won't be able to help you with this aspect (Google will do a better job).

Hope it works out for you!

deepsurbhi8 commented 3 years ago

Actually I am using FACSvatar Unity provided by this project only and not by Unity3D editor. I am also not a person from animation background. There is no settings option given in FACSvatar_Unity3D. Is there any other way to do that? Like by changing any code of rotation.

NumesSanguis commented 3 years ago

To change the camera behavior, you need to open the project in Unity3D editor. This cannot be done with Python code. FACSvatar_Unity3D is just a compiled version that is intended as a demo to try it out. To make any modifications, you either need to do it yourself or find someone who can do it for you.

Before I started this project, I never used Unity3D as well. The change you describe is a fairly simple change, so with a bit of learning Unity3D you will be able to do this.