ThreeJS Material.ColorWrite

Hey guys… (ping the usuals @sebavan - @Deltakosh - @nasimiasl - @Wingnut )

I am trying to make a an AR scene using the Third Party 8th Wall AR SDK. Most of the examples for for 8th Wall are using AFRAME/THREEJS

They one an example that is using Three.js Material.ColorWrite that can be used to occlude models behind it.

In this example they are putting a plane on the floor and occluding models that go behind it.

Screenshot 2023-06-16 at 11.37.14 AM

It looks like kinda works like the ShadowOnlyMaterial except it also occludes the models that extend beneath the ground plane

How can i do this with BabylonJS Materials ?

I got it working using 2 separate planes. A ground plane for occlusion using material.disableColorWrite and a shadow plane with a BABYLON.ShadowOnlyMaterial

3 Likes

Glad you worked it out! :smiley: