Render in main pass AR (Android)

Hi! I’m trying to do invisible occluder in my Handheld AR project. When I disable “Render in main pass” and enable “Render in Depth pass” I expect the cube become transparent and it will occlude the red objects but it only works when I enable Custom depth too, more over it’s only works in editor, when i hit play button it stop working.How should I hide object but still use it as occluder for oter actors?

[Images][1]Imgur: The magic of the Internet

Ok, I solved this problem myself. There is ARCoreOcclusionMaterial in GoogleARCore Content that helps occlude objects in vitrtual space. But it needs some improvements to work clear, you can’t just put this material to the object and have fun.

First you need to add Custon sRGB to linear convrersion in this material to fit camera image with unreal tonemapped image. Code of this node (or just node) you can find in GoogleARCorePassthroughCameraMaterial.

After this you have to update parameters from material parameter collection. In ARCoreUtils function library you can find UpdateARCoreOcclusionMaterialInstance that you need to call every frame. Just for test I did it in my Static mesh actor.

Now I finally have invisible occluders in my android mobile project.

1 Like

Hey, Can you share a small demo of this project through Git or something else, I am not able to understand this segment at all about How to use Google Passthrough Camera Mat and how does that tie-in with ARcore functionality
Any help is appreciated.

Hello, where to find ARCoreOcclusionMaterial in GoogleARCore Content? GitHub or where?

Still waiting for this

for 5.1.1 I find these 3:

I dont know wich one was the one faulty one

I just modify them and after “apply” the changes rollback them this seems to force the material to be build correctly.

know I have the doubt of how many other material need to be “modified” to fix them

to find them you need to change the setting of the content bowser



This worked for me, I just moved the nodes around a bit, so it would be marked as dirty and I could hit the ‘Apply’ button. And then repackaged everything.

1 Like