SceneView / sceneform-android

Sceneform Maintained is an ARCore Android SDK with Google Filament as 3D engine. This is the continuation of the archived Sceneform
https://sceneview.github.io/sceneform-android/
Apache License 2.0
633 stars 145 forks source link

Issue with Face Model #445

Closed Amitdygon closed 11 months ago

Amitdygon commented 1 year ago

Hello

I have used you face augmented code and here My model is load on my face but the showing me my left and right ear part. Can you please help me out with this. Its the issue related with model or lighting effect in model. Here I have attached a demo what problem i am facing . Here the code where i am adding this model into my face. I've tried with scale but its still not working. But i IOS its working fine.

` private fun onAugmentedFaceTrackingUpdate(augmentedFace: AugmentedFace) { if (profileModel == null) { return }

    val existingFaceNode = facesNodes[augmentedFace]

    when (augmentedFace.trackingState) {
        TrackingState.TRACKING -> {
            try {
                val frame = arFragment?.arSceneView?.session?.update()
                arFragment?.arSceneView?.arFrame?.let {
                    mlKitFaceDetactor.tryAcquireCameraImage(
                        it
                    )
                }
            } catch (ex: Exception) {
                ex.printStackTrace()
            }

            // here code to track the face with animations
            if (existingFaceNode == null) {
                val faceNode = AugmentedFaceNode(augmentedFace)
                faceNode.localScale = Vector3(1.25f, 1.25f, 1.25f)
                val modelInstance = faceNode.setFaceRegionsRenderable(profileModel)
                arSceneView?.scene?.addChild(faceNode)
                facesNodes[augmentedFace] = faceNode

                mlKitFaceDetactor.setModelInstance(modelInstance, arSceneView)
            }

        }
        TrackingState.STOPPED -> {
            if (existingFaceNode != null) {
                arSceneView?.scene?.removeChild(existingFaceNode)
            }
            facesNodes.remove(augmentedFace)
        }
        else -> {}
    }
}

`

https://user-images.githubusercontent.com/45029280/233975242-0a3d243c-21ff-47dd-a4c6-2343cce6a95d.mp4

github-actions[bot] commented 1 year ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

Amitdygon commented 1 year ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

Hello Team

I am still facing this issue.

Any help or lead with help me alots. Let me know if you want the model details or other details for resolved this issue

Thanks

mr-sarsarabi commented 1 year ago

Hi @Amitdygon,

As far as I know there is a face layer implemented in the code which is responsible for hiding parts of the 3d model that go behind the face.

I haven't seen the source code myself but I can understand that because I was trying to fit a 3d glasses model and this library does hide the parts that go behind the face well.

In your case the model that you provided is simply colliding with that hidden face layer. you need to make your model bigger so that the transparent face is placed inside your model totally.

I hope this helps

github-actions[bot] commented 11 months ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 11 months ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.