Search Unity

[RELEASED] Impact Interaction System

Discussion in 'Assets and Asset Store' started by Cramonky, Feb 12, 2020.

  1. Cramonky

    Cramonky

    Joined:
    Apr 1, 2013
    Posts:
    186
    IMPACT - PHYSICS INTERACTION SYSTEM IS BEING DEPRECATED
    Impact has been superseded by Impact CFX - Collision Effects System. It provides better results, performance, and configurability in many cases, and will recieve continued updates and support for the forseeable future.

    Support will continue to be provided for existing Impact - Physics Interaction System customers for a time, but it is strongly recommended that new users use Impact CFX instead!

    What Is Impact?
    Impact is an all-purpose, material-based interaction system that allows you to create audio, particle, and decal interaction effects for physics interactions, footsteps, weapon impacts, and more!

    Here are a few examples of what is possible with Impact:

    Physics Interactions
    • Play audio when physics objects collide based on the collision velocity and the objects' materials.
    • Play sliding and rolling sounds.
    • Emit particles on collision.
    • Leave decals behind on collision.
    • Works great with Rigidbodies connected by joints and ragdolls.

    Footsteps
    • Utilize Impact to play different footstep sounds based on the material a character is walking over.
    • Easily integrate with any character movement system.

    Weapon Impacts
    • Use Impact to play sounds, emit particles, and place decals for bullet impacts.
    • Easily integrate with any weapon or projectile system.

    Extendability
    • Impact was designed with extendability as a key goal. You can create your own part for just about any part of the system from custom triggers to custom objects to custom interactions!
    Full source code is included!

    Demo Walthrough Video

    Here's a video walkthrough I made of the web demo showcasing Impact's capabilities.


    To-Do List
    Here's a list of features that I would like to add in future versions (in no particular order). I'll add suggestions from you guys here too. I'll cross these off as I complete them:
    • Trigger contact modes (i.e. Single Contact, Multiple Contacts, Average)
    • Triggers for trigger colliders.
    • Triggers for kinematic rigidbodies
    • Ragdoll wizard to make setting up ragdolls easier
    Any and all feedback is appreciated and I would be happy to answer any questions!
     
    Last edited: Mar 23, 2023
  2. Cramonky

    Cramonky

    Joined:
    Apr 1, 2013
    Posts:
    186
    Impact is now available on the Asset Store! https://assetstore.unity.com/packages/slug/161617

    Tutorial Videos




    At the end of the 3rd tutorial I mention an upcoming tutorial about extending Impact. I have not yet created this tutorial but I will be working on it in the near future.
     
    digiross likes this.
  3. Cramonky

    Cramonky

    Joined:
    Apr 1, 2013
    Posts:
    186
    Just wanted to give an update on Impact's pricing.

    Some of you may have already purchased PhysSound, which essentially is Impact's precursor that I deprecated from the asset store and made open source.

    I did not consider that I could make an upgrade discount for PhysSound customers until just now, but I have just made it so now those who have purchased PhysSound can upgrade to Impact for 50% off.

    Note, however, that there is no real upgrade path from PhysSound to Impact since the systems are so vastly different from a technical standpoint, so if you do want to convert your project from PhysSound to Impact you will need to replace all of the assets and components manually.
     
    AntonioModer likes this.
  4. AntonioModer

    AntonioModer

    Joined:
    Jul 29, 2014
    Posts:
    65
    @crazymonkay, how about performance?
    Need to see Impact in stress-test, with 20 and more rigidbodies collision same time, example: stack of cubes.
    PhysSound has very low performance
     
    Last edited: Apr 22, 2020
  5. Cramonky

    Cramonky

    Joined:
    Apr 1, 2013
    Posts:
    186
    While I have not specifically compared PhysSound's performance to Impact, I am pretty confident that Impact has better performance for a couple of reasons.
    1. Impact's trigger system is modular, so you only need to add components for the kinds of collision messages you want to deal with. PhysSound had a single component containing all collision and trigger messages which could create unnecessary overhead.
    2. I made sure to be very careful with arrays and lists, making sure any methods that needed them were set up in a non-allocating way.
    That being said, I ran some performance tests with 2 stacks of 32 cube rigidbodies for a total of 64 objects. The cubes had the Impact 3D Collision Trigger and their material was only set to play audio interactions. Here is a screenshot of the profiler with Impact-related entries highlighted:


    As you can see there is some GC allocation going on that I need to address. I already looked into it and the majority of it comes from string concatenation.

    Adding additional triggers like the Slide and Roll trigger or adding additional interactions like a particle interaction will of course cause the processing time to increase.

    Hopefully this gave you some insight into Impact's performance.
     
    Iman_col and AntonioModer like this.
  6. Cramonky

    Cramonky

    Joined:
    Apr 1, 2013
    Posts:
    186
    Impact Version 1.1.0 is now live!

    You can check out the change log here: https://roadturtlegames.com/impact-interaction-system/documentation/change-logs

    You can also check out this video going over the major new features:


    Note: there have been some API changes that could cause compile errors, so I would recommend backing up your project before updating if you've used the API a lot or added significant extensions.
     
    AntonioModer likes this.
  7. EpicMcDude

    EpicMcDude

    Joined:
    Apr 15, 2013
    Posts:
    117
    Would you consider making some Playmaker actions if it's not too much trouble? Or do you think it could work with PM without them?
     
  8. Artini

    Artini

    Joined:
    Jan 29, 2016
    Posts:
    181
    Does it work with HDRP in Unity 2020.03.2 LTS?
     
  9. theishiopian

    theishiopian

    Joined:
    Oct 23, 2015
    Posts:
    16
    Question: How do you make static objects play interactions? I have some crates that can be thrown around, and i want the static concrete walls to emit particles when hit hard enough. It was working briefly but I changed something and it stopped working.
     
  10. Cramonky

    Cramonky

    Joined:
    Apr 1, 2013
    Posts:
    186
    Sorry for the very late replies on some of these, I really don't check this thread as often as I should (but I usually respond quickly on Discord and Email).

    I don't really know much about Playmaker, but I may do some research to see if adding Playmaker actions would be useful.

    Most things will work on any render pipeline, but the only thing that will not work with HDRP is the decal projector shader I include with the demo. You will need to find an HDRP-compatible decal renderer.

    All you should need on your wall objects are
    Impact Object Single Material
    and
    Impact Collision Trigger
    components, the same as if you were setting up a dynamic object.
     
  11. theishiopian

    theishiopian

    Joined:
    Oct 23, 2015
    Posts:
    16
    I tried this, it doesn't work as expected. I am trying to make the concrete wall segments in my level emit dust when hit. I am using the demo dust effect. I can provide pics of parts of my settup if needed.
     
  12. Cramonky

    Cramonky

    Joined:
    Apr 1, 2013
    Posts:
    186
    Yeah, pictures of your wall object and the Impact material you are using for your walls will be helpful.
     
  13. theishiopian

    theishiopian

    Joined:
    Oct 23, 2015
    Posts:
    16
    Sure thing!

    This is the setup of a wall panel (all the wall objects have this setup):
    upload_2021-5-11_18-3-19.png


    This is the impact material for the crates:
    upload_2021-5-11_18-4-38.png
     
  14. Cramonky

    Cramonky

    Joined:
    Apr 1, 2013
    Posts:
    186
    Hmm, you probably want to use the "Impact Collision Trigger 3D" component instead of the "Impact Simple Collision Trigger 3D" component on your walls.

    The simple collision trigger doesn't get any information about the contact point and so won't emit particles where you would expect.

    If that doesn't work, could I see your "Concrete" Impact Material?
     
  15. theishiopian

    theishiopian

    Joined:
    Oct 23, 2015
    Posts:
    16
    Using the Better trigger seems to have fixed the problem, thank you!
     
    hopeful likes this.
  16. ge01f

    ge01f

    Joined:
    Nov 28, 2014
    Posts:
    121
  17. hrohibil

    hrohibil

    Joined:
    Apr 17, 2021
    Posts:
    280
    Does this work in 2D?
    Like the footsteps for my 2D top Down shooter
     
    EvanBindz likes this.
  18. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    Hi there,

    I'm using impact in my project and i'm currently trying to setup a footstep impact interaction for my characters. I'm having some trouble to do that. Could you tell me what components are the basic needs forr the system to work? Rigidbody? Could be kinematic? Collider of any kind? I have a raycast event on both feet to trigger the interaction like the one in the tutorial and the demo, but no sound, and with a simple cube it is working fine. I think it has the same components the demo has.

    Thanks a lot!
     
  19. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    548
    I found that the problem was on where the interactions were set up. If you have a terrain and a character, which material should have interactions and which one only a tag? Or maybe all of them should have interactions for each other?

    thanks!
     
  20. Necron99

    Necron99

    Joined:
    Dec 18, 2016
    Posts:
    11
    Hi, minor detail but in DemoCharacterController.cs line 95, I think

    if (Input.GetKeyDown(KeyCode.Space))
    characterRigidbody.AddForce(Vector3.up * jumpForce);

    should be moved to FixedUpdate(). This prevents stuttering in the jump.
     
  21. Doomchecker

    Doomchecker

    Joined:
    Apr 5, 2021
    Posts:
    109
    Hi there,
    thanks for this great tool!

    I have a quick question, not sure what I am missing.

    I have a big ball rolling over terrain. The ball has concrete material and I want it to have different interactions when rolling over the terrain grass/dirt etc. textures.
    But always only the concrete interactions are playing, no matter where it is rolling over.
    Could you give me a hint on how to accomplish that?

    My setup:
    Terrain:
    upload_2022-3-21_17-27-57.png

    Rolling ball:
    upload_2022-3-21_17-28-22.png

    Thanks a lot in advance!
     
  22. umair21

    umair21

    Joined:
    Mar 4, 2016
    Posts:
    147
    Hi there, before I go ahead and buy this asset, I want to ask if this asset is suitable for mobile phones? Our main target is mobile devices.
     
  23. MattyAce

    MattyAce

    Joined:
    Oct 24, 2017
    Posts:
    2
    I did googling and came across the free Physound demo, more digging and came across Impact. Thanks so much for you work.