i need delete some vertices :
in the image, vertices intersected by the white mesh :
i need show panels damaged :
** i tried with decals but it fails*
i used different values :
mat_damageddecal.zOffset = -4; //-4,-2,1,0
i need delete some vertices :
in the image, vertices intersected by the white mesh :
i need show panels damaged :
** i tried with decals but it fails*
mat_damageddecal.zOffset = -4; //-4,-2,1,0
Please clarify: do you want an actual hole or a decal (=damage texture)?
hole
Couple of options:
a) Use Blender only. You have the satelitte mesh with holes. And then you have the indivdiual parts that fill the holes as separate meshes. Then in-game, on damage, just set the “hole mesh” to invisible.
b) If the satelitte is low poly enough, try CSG: Babylon.js docs. If not…
c) You could try like here*. If the vertex flag has a certain value, the shader discards it. In order to know which vertices belong to the panels, you can use vertex colors in Blender.
d) Decal maps: Texture decals: use different channel? - #2 by Evgeni_Popov
*N.B. I made this playground a while ago. Needs performance update, i.e. see if ‘discarding’ can be moved to vertex shader. …meanwhile…
**This should be better for perf (needs loose parts): https://playground.babylonjs.com/#GC63G5#91