#Face Occlusion with 3D models?

23 messages · Page 1 of 1 (latest)

opaque inlet
#

I was playing in Lens Studio and while face occlusion seems to work with face meshes, I couldn't get it to work with a 3D model. Does anyone have guidance for achieving this?

opaque inlet
#

I’m new to Lens Studio and have hardly done anything in this space at all. Not sure what head banding is. Is there documentation or a tutorial on various face occlusion implementations?

hard sage
#

You can benefit from this tutorial
https://www.youtube.com/watch?v=RyQ-cZfFGNg

Learn how to create a shoe try-on filter with Lens Studio's footwear try-on template. This workshop covers the essentials of working with the template and how to incorporate your own shoe designs, including customization with various materials. Ideal for anyone interested in developing Snapchat filters and augmented reality footwear design. #Sna...

▶ Play video
opaque inlet
#

I can't seem to get it to work. The facemorph 3D example already has a head binder. when I click + and search face occluder, it doesn't show up. So I add a head binder and drag the face occluder inside the existing head binder in the project and that just breaks the facemoph example. It doesn't work at all.

I tried the 3D object example file, and that already has a face occluder. But if I cover the object even partially it goes away.

Lastly, in that same 3D object example file, I imported the Face Occlusion Camera from the face occlusion example file, set the face occlusion as the top render order, set the object cameras mask texture to "face occlusion render target" and the occlusion works, but the 3d object becomes like a face mesh. So I really don't know how to use occlusion properly and there seem to be no examples anywhere for what I need.

chilly fiber
#

you should be able to add an occluder material to any 3d object to turn it into an occluder

opaque inlet
#

Do you have instructions on how to do this?

ionic grotto
#

In the Resources panel, select + -> Material -> Occluder.
Then apply it to your 3d object mesh visual

opaque inlet
#

I realized I wasn't clear enough. I am looking to be able to move objects in front of my face without the mesh disappearing. I tried adding an occluder to the facemorph example and i even set the mesh to "head" and that didn't seem to work. Lens Studio has a face occlusion example project where you can place part of your hand in front of your face, but I can't seem to get the parts of that project to work with the 3D Face morph example.

#

So I can get a face occlusion camera to work like I said in my first message, but it cuts off the 3D model to fit the outline of my face.

opaque inlet
#

Can someone shed some light?

static heart
opaque inlet
#

I tried adding a separate "render mesh visual" with occluder under the 3d model, I tried using "add component" on the model and adding an occluder, and then i tried adding an occluder on the headbinding as well. For some reason I can't upload a screenshot

#

when I added an occluder in the same layer as 3d model, i tried made the occluder smaller and larger and neither worked.

static heart
#

Isn't character face occluding any object around it? Why do you need an occluder at same place when the character face serves that purpose itself. I am confused by your requirement

opaque inlet
#

I want hands or other objects to be composited in front of my face without the character model disappearing. So my hand for example can partially cover my face, and the character model will still render.

static heart
#

If your hand hides the face enough such that it's no longer tracked then nothing face tracked will be visible. On the other hand if you want your palm to hide objects attached to your face and render on top, you can render hand segmentation on one camera with separate render target, then use this render target as mask texture for camera which renders your objects like the face tracked one. If you wish to do it for entire hand, then that's more complex to implement.

opaque inlet
#

Right but there’s a face occlusion template that works with masks that allows the hands to partially occlude the face. I want to get that working with 3D models as well, which I haven’t been able to achieve.

opaque inlet
#

https://imgur.com/a/MYiErj5

So the second screenshot has my hand occluding the face as well, without the model disappearing. But obviously it's applying it as a texture. I need to basically use the 3D model as the face occlusion render target (i think) but i don't know how to do that. Maybe it's not possible?

static heart
opaque inlet
#

Thank you for that example! That's very close to what I'm looking for, but I would like all objects (like a cup, an instrument, etc.) and both hands to be able to pass in front of the face.

Question: With your example, the main camera's mask texture is set to Hand Mask RT, and the 3D model is preserved. If I try the face occlusion render target as the mask texture (that allows all kinds of objects to occlude the model) it wraps the 3D model around my face. I'm not sure why. https://imgur.com/a/zgFRmpJ

The end result of what I'm eventually hoping to achieve is a more realistic (but exaggerated character face), that blends with my skin tones and beard, has full facial expressions, has really tight tracking, and will allow any object to partially occlude the scene.

opaque inlet
#

here's a real simple version of what I'm talking about https://imgur.com/a/gwbkcjM

In the pic above you see objects can occlude, the eyes/nose/cheeks are exaggerated, but it still has the problem above where the geometry isn't quite preserved when turning my head. Another problem is the reprojection texture unfortunately mirrors the objects that are occluding the scene back onto my face (it's hard to see in the picture).