Advertisement

Applying Explosion Force/Damage from Visibility Triangles

Started by July 22, 2015 09:10 PM
1 comment, last by sufficientreason 9 years, 6 months ago

Hi again,

I'm working on a system for applying explosion force to the exposed surface area of target using 2D visibility polygon techniques. The result is that I get visibility triangles that look like this (see orange/red triangles):

ghJC3ot.png

Just looking for ideas on how to determine how much force to apply based on these triangles, and more importantly, at what point?

I know the area of the triangle, the length of the sides, the height of the triangle, etc. How much force should I be applying? Probably some percentage of the explosion circle's full arc, modulated somehow by impact distance. Should I apply force at the vertices? At the midpoint of the surface face? I'd love a continuous way to apply force based on the shape's COM, mass, and inertia from the surface area, if you know one.

Any ideas?

Thanks!

Are you using a physics engine for this task? In general physics engines have support for applying impulses to specific locations of the object (they will internally decompose the force to parallel and perpendicular components and apply rotational and linear acceleration based on that), so my first most-simplest-possible(tm) attempt would probably be to walk through the visible edge segments in small fixed distance intervals, and apply an impulse to each location along the edge, to the direction that faces directly outwards from the explosion center.

Advertisement

I've written my own engine, and do have support for applying directional force at a point. The main goal of this approach was to find a more continuous solution than discrete intervals (otherwise I would be doing radial raycasts for my explosion rather than finding the visibility triangles).

What I'm thinking of doing is, for a given triangle, computing the area of that arc of the explosion circle (i.e. if there was no obstruction) and taking that over the area of the triangle (simulating the compression of that part of the explosion into the visibility triangle). Either just dividing it, or doing something nonlinear. This gives me an intensity value -- smaller triangles will have more "pressure" and should apply more force and damage.

What I'm not sure about is how to apply that force evenly across the surface area (the triangle edge that runs along the polygon's edge) without just sampling, and what normal to use for that force application.

This topic is closed to new replies.

Advertisement