Point Attributes for Facial Capture?

   2011   7   0
User Avatar
Member
236 posts
Joined: March 2015
Offline
Hi, I'm working on a model to be used in Unity and have a question regarding attributes.

As a quick overview:

- A 3d face will be used with facial capture via Unity.
- I'm creating and exporting the face as an FBX with "Morph" blendshapes.
- There's been a change of plan and the developer now wants me to also create blendshapes of facial expressions.
- I've suggested using Point Attributes instead of blendshapes but the developer doesn't understand what Point Attributes are and I don't use Unity or know how he is doing the facial capture. (language/software barrier)

The question is... Can point attributes be used for facial capture in Unity? ie. Can a "Mouth_Corner" attribute be "linked" to the corner of a mouth on a human face via Unity for facial capture? If so, can anyone provide any information/links I can send to the developer to help explain?

Note: Due to licensing, FBX is the method of choice. I've posted this in the Engine forum as I think asking Houdini+Unity users is more relevant than just asking one or the other.

Rob
User Avatar
Member
100 posts
Joined: Dec. 2020
Offline
The Houdini Unity plugin currently doesn't have any integrations with blendshapes or even SkinnedMeshRenderer(rigs) from Houdini. The more common workflow is to export it as an FBX, and then import it as normal into Unity.

Another option you might be thinking is to just export a static mesh in your HDA, and try to "get the points with the point attributes in Unity", and link it with your facial capture program. This might be possible, but it would require a complex custom integration which might be pretty difficult because HoudiniEngine splits the outputs into parts. In other words, the point attribute exists, but we don't really have a one to one mapping from point attribute to a vertex in Unity like in Houdini. Also, the Unity plugin has no concept of point outputs.

TL;DR I don't know of a way to use point attributes to achieve what you're looking to do. I recommend just doing everything in an FBX file, which is not specific to Houdini Engine so you might get better advice on how to do that elsewhere.
User Avatar
Member
236 posts
Joined: March 2015
Offline
Thanks for your response, I appreciate your time. There is only so much information I can share so I may have been a bit too vague with my description.

To clarify, I can't use HDA or Houdini Engine because of Indie Licensing so everything has to be in FBX anyway. My question is related to Houdini+Unity, rather than Houdini Engine itself.

I'm assuming there are two main methods of driving facial animation via tracking in Unity;
1) Bone rig
2) Blendshapes

I'm guessing that what I've suggested is a 3rd method which doesn't exist (yet?) and will need "complex custom integration".

Can Unity read Point Attributes from a FBX file and if so, where are they displayed in Unity? If I can show the developer the Point Attributes in Unity, maybe they can use it as a starting point to figure out the "complex custom integration".

Rob
User Avatar
Member
100 posts
Joined: Dec. 2020
Offline
Point attributes are specific to Houdini and are not exported as part of the FBX file, so I think what you are suggesting is not possible. The only way to "export point attributes" is through use of an HDA, which as mentioned previously, is divided into its own parts and doesn't have easily accessible point per vertex attributes in Unity as you do in Houdini.
User Avatar
Member
236 posts
Joined: March 2015
Offline
That's a bit confusing, I assumed that the point attributes were exported as part of the FBX file. ie. If I export as FBX and re-import the FBX into Houdini, the point attributes are still there.
User Avatar
Member
236 posts
Joined: March 2015
Offline
I've attached an example that shows Point Attributes on a FBX import. I maybe misunderstanding something but it seems like the Point Attributes are saved to FBX but Unity (and perhaps anything other than Houdini) can't read them from a FBX?

Attachments:
Point_Attribute_Test.jpg (96.0 KB)
Point_Attribute_Test.hiplc (320.7 KB)
Point_Attribute_Test.fbx (25.9 KB)

User Avatar
Member
100 posts
Joined: Dec. 2020
Offline
I looked into your files, and turns out that I was mistaken. Point attributes are exported as "LayerElementUserData". There's a Unity post with a sample project that reads UserData that might help: https://forum.unity.com/threads/how-to-import-user-defined-attributes-from-fbx-files.409877/ [forum.unity.com] . However, I tested this briefly, and it seems like Unity couldn't find the LayerElementUserData given the sample project. You might get better help posting your FBX in the official Unity forums.
Edited by anthonyt2 - June 24, 2021 10:49:19
User Avatar
Member
236 posts
Joined: March 2015
Offline
Thanks for your help and the link. It's a starting point that I can pass on to the developer.
  • Quick Links