question:
for example,
mesh A /box scale(70,30,10),position(0,0,0),not transparent at all;
mesh B/ box scale(10,10,10),position(0,0,0),transparent material
how can i make it looks like i cut a hole(shape like B) in A
solution:
i solved it。
let transparent mesh (B) slightly thicker than A
let B render before A(set renderorder)
set transparent material depthWrite=true;
const transparentMaterial = new THREE.MeshStandardMaterial({transparent:true,opacity:0.1,envMapIntensity:0,depthWrite:true})
Look at what @drcmda replied to you!
That’s the way to go if you need to do it dynamically.
If you just need it once in a model, you want to do it in a 3d modeller, like Blender and use boolean modifiers to cut the objects, export the scene as GLB and load in back threejs.)