From d41654b469fa51870b5952c836c04d9da17f32d3 Mon Sep 17 00:00:00 2001 From: Anton Novoselov Date: Tue, 8 Aug 2017 20:14:22 +0300 Subject: Updated to CL 22627414: * docs updates * authoring fixes * stress solver crash fixes --- docs/api_docs/files/pageextstress.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'docs/api_docs/files/pageextstress.html') diff --git a/docs/api_docs/files/pageextstress.html b/docs/api_docs/files/pageextstress.html index a082f9d..5f2c878 100644 --- a/docs/api_docs/files/pageextstress.html +++ b/docs/api_docs/files/pageextstress.html @@ -20,34 +20,34 @@
-

Stress Solver Extension (NvBlastExtStress)

The Blast™ stress solver extension provides implementation of quite fast and easy to use stress solver which works directly with bond graph. It simulates more complex damage model on support graph by allowing to apply forces on nodes of support graph (on chunks). The most common usage is just applying gravity force on a static construction so that it will fall apart at some point when carcass can't hold anymore. Dynamic actors are also supported, you could for example add centrifugal force so that rotating object fast enough will break bonds.

-It is also can be used as an another way to apply impact damage, which can give visually pleasant result of breaking actor in a weak place instead of the place of contact.

+

Stress Solver Extension (NvBlastExtStress)

The Blast™ stress solver extension provides an implementation of a quite fast and easy to use stress solver which works directly with the bond graph. It simulates more complex damage model on support graph by allowing to apply forces on nodes of the support graph (on chunks). The most common usage is just applying gravity force on a static construction so that it will fall apart at some point when the carcass cannot hold anymore. Dynamic actors are also supported, you could for example add centrifugal force so that rotating an object fast enough will break bonds.

+It also can be used as another way to apply impact damage, which can give the visually pleasant result of an actor breaking in a weak place instead of the place of contact.


Features

+
  • Requires only core NvBlast
  • Supports both static and dynamic actors
  • Propagates both linear and angular momentum
  • Graph complexity selection (reduces support graph to smaller size to trade-off speed for quality)
  • Apply stress damage on Blast™ actor
  • Debug Render

  • -

    +

    Settings Tuning

    -Computational time is linearly proprtional to bondIterationsPerFrame setting. To fine tune look for balance between bondIterationsPerFrame and graphReductionLevel . The more bond iterations are set the more precise computation will be. The smaller graph allows to make higher fidelity computations witihing the same bond iterations per frame (same time spent), but actual cracks (damaged bonds) will be more sparsed as the result.

    -Debug render could help a lot with that, consider using stressSolver->fillDebugRender(...) for that.

    +Computational time is linearly proportional to the bondIterationsPerFrame setting. To fine tune, look for balance between bondIterationsPerFrame and graphReductionLevel . The more bond iterations are set, the more precise the computation will be. The smaller graph allows to make higher fidelity computations within the same bond iterations per frame (same time spent), but actual cracks (damaged bonds) will be more sparse as the result.

    +Debug render can help a lot for tuning, consider using stressSolver->fillDebugRender(...) for that.


    Usage

    -In order to use it create an instance with ExtStressSolver::create(...).

    +In order to use the stress solver, create an instance with ExtStressSolver::create(...).

    ExtStressSolver* stressSolver = ExtStressSolver::create(family, settings);
     

    ExtStressSolverSettings are passed in create function, but also can be changed at any time with stressSolver->setSettings(...).

    -It fully utilizes the fact that it knows initial support graph structure and does maximum of processing in create(...) method calls. After that all actors split calls are synced internally quite fast and only the actual stress propagation takes most of computational time.

    -Then you need to provide physics specific information (mass, volume, position, static) for every node in support graph since Blast itself is physics agnostic. There are two ways to do it, you can call stressSolver->setNodeInfo(...) for every graph node. Another was is to call stressSolver->setAllNodesInfoFromLL() once all the data will be populated using NvBlastAsset chunk's data, in particular volume and centroid are used. All nodes connected to 'world' chunk are marked as static.

    +It fully utilizes the fact that it knows the initial support graph structure and does a maximum of processing in the create(...) method call. After that, all actor split calls are synchronized internally and efficiently so only the actual stress propagation takes most of computational time.

    +You need to provide physics specific information (mass, volume, position, static) for every node in support graph since Blast™ itself is physics agnostic. There are two ways to do it. One way is to call stressSolver->setNodeInfo(...) for every graph node. The other way is to call stressSolver->setAllNodesInfoFromLL() once: all the data will be populated using NvBlastAsset chunk's data, in particular volume and centroid. All nodes connected to 'world' chunk are marked as static.

    stressSolver->setAllNodesInfoFromLL();
     

    -Stress solver needs to keep track for actor create/destroy events in order to update it's internal stress graph accordingly. So you need to call stressSolver->notifyActorCreated(actor) and stressSolver->notifyActorDestroyed(actor) every time actor is created or destroyed including the initial actor family had when stress solver were created. There is no need to track actors which contain only one or lesser graph nodes in that case notifyActorCreated(actor) returns 'false' as a hint, it means that stress solver will ignore them. For those actors applying forces is also doesn't make any sense.

    -Typical update loop would can look like this:

    +Stress solver needs to keep track for actor create/destroy events in order to update its internal stress graph accordingly. So you need to call stressSolver->notifyActorCreated(actor) and stressSolver->notifyActorDestroyed(actor) every time an actor is created or destroyed, including the initial actor the family had when the stress solver was created. There is no need to track actors which contain only one or less graph nodes. In that case notifyActorCreated(actor) returns 'false' as a hint. It means that the stress solver will ignore them, as for those actors applying forces does not make any sense.

    +A typical update loop looks like this:

      -
    1. If split happend call relevant stressSolver->notifyActorCreated(actor) and stressSolver->notifyActorDestroyed(actor)
    2. Apply all forces, use stressSolver->addForce(...), stressSolver->addGravityForce(...), stressSolver->addAngularVelocity(...)
    3. Call stressSolver->update(). This is where all expensive computation happens.
    4. If stressSolver->getOverstressedBondCount() > 0 use one of stressSolver->generateFractureCommands() methods to get bond fracture commands and apply on them actors.
    +
  • If split happened, call relevant stressSolver->notifyActorCreated(actor) and stressSolver->notifyActorDestroyed(actor)
  • Apply all forces, use stressSolver->addForce(...), stressSolver->addGravityForce(...), stressSolver->addAngularVelocity(...)
  • Call stressSolver->update(). This is where all expensive computation takes place.
  • If stressSolver->getOverstressedBondCount() > 0, use one of stressSolver->generateFractureCommands() methods to get bond fracture commands and apply them on actors.
  • Example code from ExtPxStressSolverImpl:

    void ExtPxStressSolverImpl::onActorCreated(ExtPxFamily& /*family*/, ExtPxActor& actor)
    @@ -100,7 +100,7 @@ Example code from ExtPxStressSolverImpl:

    } }

    -Have a look at ExtPxStressSolver implementation code, which is basically high level wrapper on NvBlastExtStress to couple it with PhysX™ and NvBlatExtPx extension (see ExtPxStressSolver).

    +Have a look at ExtPxStressSolver implementation code, which is basically a high level wrapper on NvBlastExtStress to couple it with PhysX™ and NvBlastExtPx extension (see ExtPxStressSolver).


    -- cgit v1.2.3