I want to create a project where I want to scan the user’s face and depending on that I want to show a 3d model behind my user (in the camera feedback). I also want one of the 3d model’s hands to be seen in front of the user but every other part of the 3d model to be seen from behind the user (for example one of his hands can be around the user’s neck, hence it should be seen in front of the user’s body). Can I achieve something like that using 8th wall? If so, can you please guide me or suggest me resources for this?
Can you share a photo of what you are trying to accomplish? More informaiton would be helpful.
You can certainly use hider materials on meshes to hide them as shown in the face effects example project here
<a-entity gltf-model="#head-occluder" position="0 0 0.02" xrextras-hider-material></a-entity>
Keep in mind that you need to have anything you want to be “hidden” to come after the hider material in the DOM order. So place it in your code after the entity with the hider material.
We also have a custom hider material component as well if you need for custom meshes
Hello Ian, thanks for the quick response. Here is a visual representation of what I want to achieve. Please have a look and let me know if you understand it better now.
8th Wall currently doesn’t support body tracking, so tracking the body and adding a hider material isn’t possible right now.
However, You could certainly try to set the 3D model as an offset of an anchor point on the head. Just note that it will move via the anchor point. I’d suggest testing this first.
Thanks for this suggestion. Although my plan was also the same regarding moving the model maintaining an offset with respect to the face anchor or something. But my main concern is not about this tracking. My main concern is how can I show some part of that model seem behind of the user except its hand(as shown in the image I provided?) Suppose I have an almost fitting 3d model of my user’s shape(head to chest level height only) and I have applied the hider material on that. Now when my other model will appear it will seem to be in front of my user, right? Because in the camera feedback everything will get rendered over our real world objects. So in that case I need to have a material which will be attached to my user’s model and which will determine to occlude the things if they are getting rendered in front of that. For example, the user starts the experience and then 3d model appear in the screen. But it was supposed to look like that the 3d model is over the user(camera feed). but as our user model(attached to the faceAnchor of the user with hidermaterial) will now occlude that 3d model’s certain portion that comes in front of him, it should look like that the user is actually in front and the 3d model is in the back. As far as I have understood, xrExtras’ hider material does hide the things rendering in the back of an object having the hider material. But you can see I need a totally opposite kinda material here. Its been a very long text. Sorry about that.