Dynamic destruction of walls (Shader)

Hi everyone,

Yay, I though I had lost this playground :o Just found it in a code comment. Better share this asap!

The original intention was to implement what they did in Radio Viscera. Unfortunately, as far as I could figure out, to get the full approach working you need Geometry Shaders (or proper knowledge/skills in GLSL, lol).

So as it stands the effect is more like punching a hole through a metal wall or something.

Please note that I abandoned this code. The effect does not really work well with turn/tile-based games. So when I left the code my known todos were:

  • Shader for display, Havok thin instances for collision detection
  • Need to take care of floating wall pieces
  • Probably/Likely require a Material extension not ShaderMaterial
  • Solve depth problem with a box instead of a plane? But performance :frowning:

Best wishes
Joe

4 Likes

Nice playground !

Shameless plug of something that may interest you : Mesh shattering with baked physics | by Babylon.js | Medium

3 Likes

It’s a pretty cool effect :slight_smile: I LOL’ed at the “Wall” texture :rofl:

Yes, this is a very useful one too! But - fingers crossed since I havent tested it for too long - this seems to work in real time now with Havok. If you use thin instances and activate physics dynamically on impact, I get zero FPS hit. :open_mouth: