Search Unity

Unity Bullet Physics Plugin Demo

Discussion in 'Assets and Asset Store' started by chbfiv, May 9, 2012.

  1. chbfiv

    chbfiv

    Joined:
    Dec 2, 2010
    Posts:
    22
    See the Youtube post in the facebook page feed.

    Facebook - Unity Bullet Physics

    Youtube - Unity 3D Bullet Physics (Performance Box Rigidbody Tests)

    Youtube - Basic Demo - Unity Bullet Physics

    I'm currently planning on releasing an asset in a few months at the latest. I'm also curious on how much the community is interested in Bullet Physics as an option to PhysX.

    Current Plan:
    Release v1.0.0 around July.

    v1.0.0 core
    -win32 support for Rigidbodies and Softbodies for the new Bullet Physics 2.8.0
    -full access to all c++ library classes
    -helper classes for Unity 3D workflow
    -Gizmos and Debug support for core library

    v1.0.0 features
    -performance at least as good or better than PhysX
    -port all applicable c++ Bullet Physics demos to Unity scenes

    Future Goals:
    I don't see why I can't support all the platforms that Unity already supports with enough time

    Barriers to a full product:
    I would like to work on this full time, but I currently already have work doing 3D simulations. If enough interest is out there I would love to make this a perfect product with much better tools than PhysX is currently providing to the Unity community. I'm also interested in what you all think is a fair price as I am more interested in getting Bullet in the hands of the community because of it's amazing performance and tools.

    Lastly, I've been actively using and following the community and I really appreciate the great tools and support other developers have provided myself.

    Best of luck,
    ~chbfiv
     
    Last edited: May 16, 2012
  2. liverolA

    liverolA

    Joined:
    Feb 10, 2009
    Posts:
    347
    Best if this support cloth!!
    u3d's cloth is .....
     
  3. chbfiv

    chbfiv

    Joined:
    Dec 2, 2010
    Posts:
    22
    Cloth is in the works =)

    For those whom are interested I currently have these notes on the project.

    see Bulletphysics.org for more.

    1. I'm seeing a 20% improvement in performance for standard rigidbody simulations vs PhysX running off of the CPU.
    2. "Bullet 2.80 includes a preview of the GPU rigid body pipeline by Takahiro Harada, running 100% on the GPU using OpenCL. A new AMD Radeon 7970 Tahiti can simulate 110k objects in real-time between 15-30 frames/second. It also works on recent NVIDIA GPUs with latest drivers." -bulletphysics.org; I can't make the same claim yet, but I intend on looking into this.
    3. Bullet Physics supports Motors out of the box for constraints. So you can create crazy motor simulations (think AI spider, ...) by just using the properties of the constraints themselves. One of the Bullet Physics demos illistrates this and I plan to include as a unity scene.
    4. Unity Bullet Physics seems significantly more stable at the point you start simulating ridiculousness compared to PhysX.
    5. Bullet Physics is open source so you can use my c# wrapper or the c++ lib to create a server to simulate for multiplayer physics. Since both the client side and server side physics are using Bullet Physics you can accurately approve client side actions. I'm currently unaware of a similar option for PhysX, but feel free to enlighten me!
    6. Bullet has lots of destruction options.
    7. Bullet was Ranked 2nd for middleware use by casual developers over PhysX by Game Developer Magazine in 2011
     
  4. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I'll be watching this development with interest. Please also post a direct link to the youtube video, if you would, so those of us who don't use FaceBook and see it.
     
  5. runonthespot

    runonthespot

    Joined:
    Sep 29, 2010
    Posts:
    305
    Would be interested in the server side option mentioned above- especially if there is some sensible way of syncing (faster) rigidbodies with a server.
     
  6. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    Cool initiative. Out of curiosity, supposing you intend to run it multi-threaded, how would you sync that to Unity?
     
  7. chbfiv

    chbfiv

    Joined:
    Dec 2, 2010
    Posts:
    22
    Last edited: May 16, 2012
  8. chbfiv

    chbfiv

    Joined:
    Dec 2, 2010
    Posts:
    22
    I don't plan on providing this feature for v1 myself. The c# wrapper or c++ library can be used with Sockets or a webservice to provide the required functionality. I am pondering this however for future releases on App Engine or a Node.js backend.
     
  9. chbfiv

    chbfiv

    Joined:
    Dec 2, 2010
    Posts:
    22
    Good question =) I need to investigate this further. Bullet Physics can be built with this support, but I'm currently unaware of any bottlenecks until I get to that Unity Demo.
     
  10. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    What about joints and ropes? Ropes made with PhysX joints run into issues with the joints stretching. Check out Jake's rope script thread for more info on the issue.
     
  11. Rapzid

    Rapzid

    Joined:
    Apr 25, 2009
    Posts:
    123
    It's been my opinion for a couple years now that Unity aught to replace the current Nvidia Physx with bullet. I mean, seriously. The current implementation is just too much of a black box and very stagnant.
     
  12. Sir-Tiddlesworth

    Sir-Tiddlesworth

    Joined:
    Oct 19, 2011
    Posts:
    908
    Damn, you beat me to it!
    I was just starting to integrate Bullet physics.
     
  13. dvochin2

    dvochin2

    Joined:
    Jul 14, 2012
    Posts:
    84
    Awesome work... very important you succeed. May I inquire on an ETA for a first release?
     
  14. bngames

    bngames

    Joined:
    Jul 3, 2012
    Posts:
    67
    Bullet Physics :) YES PLEASE
     
  15. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Or havok. How about that? Or even just improving physx to latest version. But I applaud op's initiative :)
     
    Last edited: Aug 25, 2012
  16. WonkyWooGames

    WonkyWooGames

    Joined:
    Dec 31, 2010
    Posts:
    63
    I for one would look forward to seeing Bullet Physics within Unity. I think it's a great free open source physics engine and more than a match for Havok and PhysX of which I have alot of experience.

    I actually coded my motorbike and car dynamics using Bullet, then made sure I could easily swap in any phyiscs engine, such as Havok and PhysX. Here are a couple of links to my motorbike and car dyamics using various physics engines Bullet/PhysX/Havok and Sony PhyreEngine/Ogre for rendering.

    Bike
    Car
    car in San Fran

    I then seen the light and ported to Unity c#, you can play the motorbike here, or the car here and the forum thread here.

    PhysX is nicely integrated into Unity and takes care of a hell of alot of setup (not a problem for game professionals), so any other physics implementation needs to match this, whether it is Bullet, Havok, or even Box 2d.
     
  17. gonzorob

    gonzorob

    Joined:
    Dec 1, 2011
    Posts:
    96
    Hello,

    This looks excellent. I'm currently working on a project that's beyond the scope of Unity's PhysX engine - would it be possible to test the alpha?
     
  18. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Very interesting!
    You stated that you would release 1.0 around July, any new ETA on this?
    Or is this project already abandoned?

    Edit: Saw your other post, i hope its possible to solve this and get 1.0 released.
     
    Last edited: Sep 12, 2012
  19. LS16BMX

    LS16BMX

    Joined:
    Nov 11, 2011
    Posts:
    94
    would this support cylinder colliders ?
     
  20. chbfiv

    chbfiv

    Joined:
    Dec 2, 2010
    Posts:
    22
    Hippocoder,
    Havok will not work because of their licensing models unless they team up with Unity in some way. I doubt it though, they have their own visualization and various other products that directly compete with Unity.
     
  21. chbfiv

    chbfiv

    Joined:
    Dec 2, 2010
    Posts:
    22
    Gonzorob,
    I'll get back to you on this after the final plan is in place =)
     
  22. chbfiv

    chbfiv

    Joined:
    Dec 2, 2010
    Posts:
    22
    LS16BMX,
    Yes, all of the shapes that come with Bullet Physics including cylinders and custom shapes.
     
  23. chbfiv

    chbfiv

    Joined:
    Dec 2, 2010
    Posts:
    22
    Virror,
    I'm working on a plan with the Bullet Physics team to make this project come to life =) no ETA, but I'll have something soon to update the ETA.
     
  24. rozgo

    rozgo

    Joined:
    Feb 7, 2008
    Posts:
    158
    We started integrating Bullet in our game, but if you guys have done something better, would be great to know. Keep us posted.

    Our game is 400% physics, and our initial Bullet test was overwhelmingly better than Unity's.
     
  25. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,643
    how hard do you think the integration will be, how can you make it work with all the unity components (you know rigid bodies and stuff)
     
  26. LS16BMX

    LS16BMX

    Joined:
    Nov 11, 2011
    Posts:
    94
    I would love to know hw to incorporate bullet into unity, any clues much appreciated for sure !
     
  27. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Not trying to rush you or anything but this would be a nice addition ..since currently im trying to make destructible objects in Unity 3D for a fully destructible map... after about 5 cubes (with 150 parts) break apart the computer slows down to about 2FPS ..im on an AMD system with these specs..

    FX-8150 8-Core @3.6GHz(auto-turbo of 3.9 and 4.2)
    16gigs of DDR3 1866mhz ram
    HD7870 2gig GDDR5 stock OCed graphics card

    We all know physX hates AMD systems...except the Untiy devs it seems ..haha ...so im not trying to rush you or anything but I cant wait for you to release this Bullet physics option... nice work ...I clicked on "like" on facebook also.
     
  28. Z-Ling

    Z-Ling

    Joined:
    Jan 19, 2013
    Posts:
    2
    unity is a great engine, bullet is a great physics engine, I love bullet because it is open source.

    I'm looking forward to it.
     
  29. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    Any progress?
     
  30. Foam

    Foam

    Joined:
    Jun 13, 2012
    Posts:
    322
    Yeah, any news? I'm in need of this and I'd hate to reinvent the wheel. if its not ready yet for the Store, post it on github with a PayPal link and I'll send you a couple hundred.
     
  31. Green-Dog

    Green-Dog

    Joined:
    May 7, 2013
    Posts:
    4
    Good job! I am interested too!

    how can we test this?

    .
     
  32. mrbdrm

    mrbdrm

    Joined:
    Mar 22, 2009
    Posts:
    510
    Interested indeed :)
    Cloth is my main interest, paying if needed.
    Keep it up.
     
  33. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Don't bother unless it's cross platform though. Those windows-only assets aren't the biggest money makers.
     
  34. WVlad

    WVlad

    Joined:
    Apr 5, 2013
    Posts:
    68
    How can it be cross platform if bullet is written as a native win32 library?

    Also I'd like to test bullet in Unity too. I've tested BEPUPhysics and it showed really bad performance in Unity so I seek for a replacement.

    Added. I found ready bullet example for unity and tested it. It's really fast! I'm going to use it for my server instead of bepu.
     
    Last edited: Nov 9, 2013
  35. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Umm.. you found it but not sharing? ..PM me if you don't want to post the link here..
     
  36. alexzzzz

    alexzzzz

    Joined:
    Nov 20, 2010
    Posts:
    1,447
  37. WVlad

    WVlad

    Joined:
    Apr 5, 2013
    Posts:
    68
  38. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Would this physics system be completely deterministic?

    Multiplayer rts in mind.
     
  39. JovanD

    JovanD

    Joined:
    Jan 5, 2014
    Posts:
    205
    Any updates?
     
  40. Megamind

    Megamind

    Joined:
    Jan 31, 2013
    Posts:
    5
    Share the love rozgo and Rawbots team and make a free plugin for the community. I hear Erwin Coumans himself helped so time to give back. There are two I found but are very early in development and you guys must have found a way to make all the constraints and many features in Bullet work so maybe add to one or create your own.
    https://code.google.com/p/unity-bullet/

    https://github.com/speps/UnityBullet
     
    Last edited: Feb 7, 2014
  41. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    781
    Would be good if they sold it on the Asset Store even, that way they could make some money back for their time. It'd be better than the nothing we have now.
     
  42. alexzzzz

    alexzzzz

    Joined:
    Nov 20, 2010
    Posts:
    1,447
    There's a huge amount of work to integrate a third-party physics engine into Unity. And it's not just about writing a bunch of components for different kinds of shapes and joints, it's also about materials, trigger and collision events, thread synchronization, terrains, character controllers, messing with object meshes for soft bodies, various custom editors, visualization, user API for raycasts, collision detection, etc.

    Until you have all this stuff up and running, you would probably prefer to use PhysX. And even when you have it running, you may realize it's not worth the effort. PhysX is not as bad after all.
     
    Last edited: Feb 9, 2014
    Xtro likes this.
  43. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,074
    This.

    You can't do lockstep networking with Physx.
    You also can't do replays that use physics.
     
  44. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Also asking: Any ETA on this?

    Also would be good if an android version is in the works.

    But also, would this be unity free compatible? o_O
     
  45. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Guys, just no. What are you clamouring for Bullet for? it's literally ten times slower than the physics in Unity 5.

    The only advantages to bullet are probably in the movie industry where they can code parts of it in a bespoke fashion or if you really really need deterministic physics and are willing to take some pain.
     
  46. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    What's with the stability tests showing PhysX is less stable then!? :confused:
    And we can't evaluate the claim Unity 5 has fast physics until I actually see it running in a game of my own. (A YouTube clip won't count here, as that's using Unity's own code, of which would probably be completely different from mine)
     
  47. Slight0

    Slight0

    Joined:
    Dec 6, 2013
    Posts:
    28
    How about the fact that you can thread bullet physics whereas you cannot with Unity's implementation? Expensive things like static mesh creation can now be offloaded to another thread. Physics simulation can also be threaded.

    I highly doubt Unity 5's physics is even 50% faster.
     
  48. Yash987654321

    Yash987654321

    Joined:
    Oct 22, 2014
    Posts:
    729
    Exactly! That's the reason why GTA 4 and
    5 uses bullet or it could be that they were
    making RAGE so awesome in all things
    that they forgot to include a physics
    engine in it
     
  49. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Looks like this is dead... :(

    EDIT: Removed user reference, didn't make sense... :D
     
    Last edited: Mar 24, 2015
  50. Yash987654321

    Yash987654321

    Joined:
    Oct 22, 2014
    Posts:
    729