Search Unity

Bullet Ballistics 2 [UPDATED]

Discussion in 'Assets and Asset Store' started by ChristianSchott, Oct 16, 2016.

  1. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33


    Bullet Ballistics
    combines the accuracy of hit-scan based systems, with the realistic bullet drop of rigidbody based projectiles, and additionally includes air resistance in its ballistics simulation.

    It has been built from the ground up with performance in mind, making full use of multithreading utilizing unity's job system and burst compiler.
    While also minimizing runtime garbage collection allocations wherever possible.

    Another main development goal was creating customizable interfaces to the core ballistics simulation, allowing for custom bullet rendering, material interactions, and impact handling.

    All together, Bullet Ballistics empowers you to simulate hundreds to thousands of physically accurate projectiles in your games simultaneously without a hustle.

    Asset Store

    Links

    Features
    • Ballistics Simulation
      • Gravity / Bullet Drop
      • Air Resistance
      • Wind
      • Weapon Zeroing + Reticle Generation
    • Material Interactions
      • Object Penetration
      • Ricochets
    • High Performance
      • Multi-Threading
      • Minimal Runtime GC Allocations
      • Batched Projectile Rendering
      • Object Pooling
    • Customizability
      • Bullet Rendering
      • Impact Handling
      • Material Interactions
    • Clear Custom Inspectors
      • Physical Unit Selection (metric/imperial)
    Required Unity Packages
    • Unity.Burst
    • Unity.Mathematics

    Technical Details

    The ballistics simulation is completely independent of the visual projectiles in the game.
    This allows for a lot of customizability in the way the bullets are rendered: basic prefab instances, GPU instancing, custom renderer? Your choice!
    This also makes Bullet Ballistics inherently independent of the Rendering Pipeline you target.

    Internally, Bullet Ballistics uses a numerical approximation to simulate the ballistic trajectory.
    For collision detection, a raycast is fired between the last two simulated positions of a given projectile.
    All ballistics processing is automatically batched using unity's RaycastCommand API and job system for optimal performance.

    Limitations
    Bullet Ballistics does (currently) not support ballistic effects like spin drift, coriolis force, magnus effect, or similar, as they only affect very long range projectiles, and are usually negligible for normal game scenarios.
    Feel free to contact me with any feature requests!

    ballistic_materials.png wind+drag.png cinematic.png performance.png ricochet.png
     
    Last edited: Oct 7, 2022
  2. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33
    Hi SkyCod8 ,
    thanks for you fast response! :)

    There will definitely be Updates to further improve performance etc. ..

    Do you have a special aspect in mind for further development?

    edit: I don`t know what happend to SkyCod8`s reply.
     
    Last edited: Dec 10, 2016
  3. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33
    Hi,
    i know that this is my first ever post on this forum.
    But the main reason for this is that i`m usually active in german Unity-Forums.
    ( http://forum.unity-community.de/user/2869-mr-3d/ ) :)

    To the second point im not too sure..
    in the process of writing this promotion i accidentally clicked the "post" button too early.
    I actually have added a showcase video and screenshots afterwards.
    ( additionally i have two introduction-tutorials on my channel HERE )

    But you are right.. i will add additional information to the main post soon! :)

    Christian
     
  4. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33
    Yes ^^

    so i have added some more information and screenshots. :)

    You like it more now?
     
    julianr likes this.
  5. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33
    I also want to point out to these two videos i made when you want a closer look at how the asset works behinde the scenes. :)





    btw. what happened to SkyCod8`s replys?
     
    Last edited: Oct 20, 2016
  6. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33
    Hi,

    i have just realized that the WebGL demo-export ran in debugging mode.

    If you have experienced stuttering it should be gone now.
    And general performance will be a lot better! :)

    Demo: https://misterdreid.itch.io/bulletballistics
     
  7. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33
    Hey everyone,

    Update 1.01 is out now! :)

    It fixes a few small problems of the first Version and also features a reworked methode for handeling your weapon-input.
    Performance will be a bit better too!

    I have also created new models for the demo scene. ( they are pretty bad though.. ^^ )

    I hope you like it!

    >Click<

    Christian
     
  8. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33
  9. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    Hey! First off, this is a super cool asset! I've been having a lot of fun with it and experimenting with it quite a bit.

    One question I have though is that bullets appear to penetrate surfaces but are destroyed the frame immediately after. It's like their physics overshoots where it was suppose to stop. Have you ever noticed this?
     
  10. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33
    Hey local306,
    I am very glad you like it!

    I believe you mean something similar to this:
    img.PNG

    .. it is just an inaccuracy of the bulletpath -visualization.

    I could fix it, but it would have a small impact in performance.
    Please let me know if you need the accurate visualisation, then I will sent it to you! :)

    Greetings,
    Christian
     
  11. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    I see, so it's purely the visualization part then?

    If it's not too much trouble for you, I wouldn't mind checking out a build with more accurate visualization. My current idea doesn't require a tonne of bullets flying everywhere, so overhead shouldn't be too much of a problem.
     
  12. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33
    I have sent you a pm :)

    I will propably include this the next time I update the package.
    If anyone else needs this before the update, just contact me through pm or mail ( mr3d.cs@gmail.com )

    Greetings,
    Christian
     
  13. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Can this be used for large caliber systems, and not just small caliber bullets eg up to 16inch shells used in large battleship turrets.
    Also does this simulate rifling where the shell spins as it exits the barrel for stability in flight, which also causes the shell to travel to the right in flight.
     
  14. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33
    Hey John-G,

    yes, you should be able to use pretty much every type of bullet.
    You just have to figure out your speed and drag values etc.

    Rifling is something that I have ignored sofar. Because there is nothing that would cause instability in the flight, apart from wind, and it is very unlikely anyone playing the game would notice the difference.

    The bulletdrift to the right on the other hand is something what could be noticed..
    As far as I understand it, it is pretty much only a small force applied perpendicular to the flightdirection ( and gravity )
    If you know that your bullet moves for example 10cm right per 1000m flight, you can approximately calculate this drift force. Of course this solution is not 100% perfect, but I doubt anyone will every notice the difference.
    To implement this force in the calculations should be very easy. Just contact me through pm or mail ( mr3d.cs@gmail.com ) if you need this.

    Greetings,
    Christian
     
    John-G likes this.
  15. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    loving this package but i have problems using it in the package
    as it conflicts with other packages that use unity.tools (or tool)
    whats the best way to namespace the scripts?
     
  16. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33
    Hey Arganth,

    I am not 100% sure which kind of conflict you mean.

    I guess your problem is, that you are having two 'tools.cs' scripts in your project?

    The easiest way to solve this would be to remove my 'tools.cs' script. It pretty much only contains one method wich can be moved to the 'WeaponCustomInspector.cs' .

    I will send you an updated package through pm.

    Please let me know if this did not solve the problem.

    Greetings,
    Christian
     
  17. giraffe1

    giraffe1

    Joined:
    Nov 1, 2014
    Posts:
    301
    Will this work in HDRP?
     
  18. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33
    I dont see any reason, why it should not work with HDRP.
    HDRP only changes the rendering and nothing about the physics as far as I know.
     
  19. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33
    Hello!

    Bullet Ballistics has just received a major update to version 2!

    >Asset Store<

    Version 2 has a big focus on improving performance using Jobs, Burst compiler, Object Pooling, etc.

    Christian
     
    Willbkool_FPCS likes this.
  20. Gray_FoxWare

    Gray_FoxWare

    Joined:
    Jan 31, 2019
    Posts:
    16
    Hey thanks Christian,its a great Asset!

    Do you have a discord channel?
     
  21. ChristianSchott

    ChristianSchott

    Joined:
    Sep 19, 2015
    Posts:
    33
    I am glad to hear that you like it :)
    No, currently I don't have a support discord channel, though I am thinking about creating one as I have received multiple requests already..
    Though, I don't really like having discord open in the background all the time, so you can probably reach me better via email anyway.

    If you have any questions, you can contact me here, or via mr3d.cs@gmail.com

    Christian