Sceneform-android-sdk: Sceneform 1.15 occlusion

Created on 12 Nov 2019  路  8Comments  路  Source: google-ar/sceneform-android-sdk

Hello,

like i already mentioned in the ticket #167 the occlusion is not working on android 10 devices. But now i have also noticed that this is not a Android 10 problem. I have also the same bad results on One Plus 6T. On all other devices that i have tested the occlusion is working.

I am using this material for the occlusion:

material {
    name : "Occlusion material",
    shadingModel : unlit,
    colorWrite : false,
    depthWrite : true
}

fragment {
    void material(inout MaterialInputs material) {
        prepareMaterial(material);
        material.baseColor = vec4(0.0);
    }
}

I have modified the example project so far to be able to show what happens (sceneform version 1.13). What i have done is to place a plane with the occlusion material in front of the andy object. In Addition i set the camera render priority to:

arFragment.getArSceneView().setCameraStreamRenderPriority(Renderable.RENDER_PRIORITY_FIRST);

The render priority of the plane (with the occlusion material) is set to:

occluder.setRenderPriority(ModelRenderable.RENDER_PRIORITY_DEFAULT - 1)

This is the result on all other devices that i have tested (Samsung S7, Nokia 7.1, Huawei P20):
working

And this is look like on pixel and on plus:
not_working

It would be nice if someone from the people in charge (or someone who has an idea) would post something. I have the feeling that this repo is no longer noticed. That would be a damn shame because the framework works fine otherwise.

Ps. The augmented face demo is working fine also on the pixel. There is also an occluder material used. I also tested it by getting the material from the SFB (sceneform_face_mesh_occluder.sfb) but the result was the same like posted above.

Most helpful comment

@nvictornvictor @tpsiaki
Guys any news?

All 8 comments

It seems to be a 1.13 issue because the same code is working on the version 1.12

@nvictornvictor @tpsiaki
Still not working on Scenefrom 1.14 ... c'mon guys :(

After some tests i can say this happen only if you try to occlude gltf's. Thats why the AugmentedFaces example is working. The faceFox mesh is a FXB File.

In 1.13 you mention this BugFix:
Fixed masked materials when using Sceneform assets package to load a glTF.

Does it have something to do with this problem here? I thought you just adjusted the mapping from "MASKED" to "MASK".

@nvictornvictor @tpsiaki
Guys any news?

@nvictornvictor @tpsiaki
Still the same error also on 1.15 ... wow

@nvictornvictor @tpsiaki
The bug must be in this module -> com.google.ar.sceneform:filament-android:1.12.0
This seems to be the filament dependency. But according to the ticket from the filament repo it is a sceneform bug. Please take a look on.

//For those who want to use the rest as 1.15.0 I recommend the following gradle config:
implementation "com.google.ar:core:1.15.0"
implementation ("com.google.ar.sceneform:core:1.15.0") {
        exclude group: 'com.google.ar.sceneform', module: 'filament-android'
}
implementation "com.google.ar.sceneform:assets:1.15.0"
implementation group: 'com.google.ar.sceneform', name: 'filament-android', version: '1.12.0'

//for those who use the ux dependency
implementation ("com.google.ar.sceneform.ux:sceneform-ux:1.15.0") {
        exclude group: 'com.google.ar.sceneform', module: 'core'
}

Do you still have this problem? I am also looking to create an occluding material

How would one go about making an occluding material in 1.16? Now that support for SFB & the SFB Sceneform Android Studio plugin is deprecated

Was this page helpful?
0 / 5 - 0 ratings