- Видео 17
- Просмотров 56 072
Erin Catto
Добавлен 11 сен 2013
Box2D and game physics
Is it Centripetal or Centrifugal?
I was testing Box2D and found this pleasant effect.
Details:
- the outer circle is static
- the spinner is a motorize dynamic rigid body on a revolute joint
- the spinner has 4 times higher density than the small rigid bodies
- the motor torque limit is quite high
- continuous collision is needed to keep bodies from leaking through the outer circle
- friction is very low to keep the spinner from jamming
box2d.org/
Details:
- the outer circle is static
- the spinner is a motorize dynamic rigid body on a revolute joint
- the spinner has 4 times higher density than the small rigid bodies
- the motor torque limit is quite high
- continuous collision is needed to keep bodies from leaking through the outer circle
- friction is very low to keep the spinner from jamming
box2d.org/
Просмотров: 3 210
Видео
Projected explosion
Просмотров 3002 месяца назад
Testing explosions that use projected area (perimeter in 2D). Gravity is zero and the bodies are connected to ground using soft weld joints.
Box2D Version 3.0 Release Demo
Просмотров 11 тыс.4 месяца назад
I made these demos to celebrate the launch of Box2D version 3.0. All demos run in real time using an 8 core Ryzen CPU and maintain 60fps or better. All moving objects are fully simulated rigid bodies. You can get the Box2D version 3.0 code here: github.com/erincatto/box2d Read more about the release here: box2d.org/posts/2024/08/releasing-box2d-3.0/ Thanks to Lisa Catto for editing this video!
Card House
Просмотров 1,9 тыс.9 месяцев назад
Card House rigid body simulation using Solver2D. github.com/erincatto/solver2d box2d.org/
Large pyramid with balanced iterations
Просмотров 3,5 тыс.10 месяцев назад
Extra iterations for solvers that have fewer constraint loops, so all solvers loop over constraints the same number of times. Follow up to: ruclips.net/video/sKHf_o_UCzI/видео.html Blog post: box2d.org/posts/2024/02/solver2d/
Solver2D Results
Просмотров 23 тыс.10 месяцев назад
In this video I go over Solver2D results in detail. Find the blog post here: box2d.org/posts/ Github repo: github.com/erincatto/solver2d 00:00 - Intro 00:31 - Parabolic Arch 03:56 - Confined Circles 07:44 - Double Domino Effect 09:41 - Friction Ramp 13:13 - High Mass Ratio 1 17:34 - High Mass Ratio 2 20:18 - Overlap Recovery 24:17 - Large Pyramid 27:57 - Ball and Chain 32:54 - Joint Grid 37:48 ...
Large Pyramid Solver Comparison
Просмотров 1,4 тыс.10 месяцев назад
This compares seven constraint solvers on a pyramid with a base of 100 boxes. A small number of iterations are allowed: 4 primary iterations and 1 secondary iteration.
Tumbler constraint coloring
Просмотров 733Год назад
Incremental greedy edge coloring to identify independent sets of constraints. There is a limit of 12 colors, starting with ROYGBIV. The outer box has many constraints, so these go into an overflow color (black dots).
Box2D 3.0 Bounding Volume Hierarchy Testing
Просмотров 939Год назад
Added a dedicated test for the dynamic tree. This will help with future optimization work.
Distance Joint
Просмотров 4454 года назад
New distance joint: - separate minimum and maximum lengths - spring/damper - limits are predictive
Skinny Staff
Просмотров 6124 года назад
This shows the unrealistic motion you can get when leaving out gyroscopic terms from the rotational equations of motion.
Ghost Collision
Просмотров 3,7 тыс.4 года назад
The top box hits the backside of the vertical edge. The bottom box uses smooth edge chain collision to avoid tripping.
Convex Decomposition
Просмотров 1,9 тыс.4 года назад
Concave objects can be split into multiple convex shapes and attached to a single rigid body. The technique used to decompose the concave shape can have a big impact on behavior. box2d.org/posts/2020/04/stuck-inside
Congratulations on an incredible achievement! It's inspiring to see a project that's been going strong for nearly 20 years. Your dedication, passion, and hard work have not only contributed to the open-source community but have also created a lasting impact that continues to benefit so many. Thank you for all the time and effort you've put into it-your work truly stands the test of time!
How do I iterate through shapes/bodies from world in v3? I'd like to retrieve their info to render them in my game. I could easily find solution online for older version but not for the latest one
I added a more efficient event system so you don't have to loop over every body. I may add that back because it might be more convenient when getting started. box2d.org/documentation/md_simulation.html#autotoc_md72
This force points towards the center of rotation, UTTER, UTTER BS.
Washingmachine Simulator
This is how some rowing exercise machines work - google "water resistance rowing machine". They simulate quite well how pulling the 'oar' quickly gives high resistance at low speed, but vice-versa at a higher speed, just like it is when rowing a boat.
It's both, but you have to understand where each applies. The walls will exert a centripetal force on the particles. This force points towards the center of rotation and without it the particles would all fly away in a straight line. This is what you get if you analyze the system in an inertial reference frame. If you analyze the system in a rotating frame, such as one that rotates with the particles, then you see there's a centrifugal force pushing everything outwards. This force applies to every object and without it the particles would fly away radially (from your rotating perspective), but they are stopped by the walls. Both perspectives are fine, correct, and consistent. Just don't confuse them (e.g. don't say "centripetal force" when you really mean "centrifugal force" but heard from some confused person that centrifugal forces don't exist) and you'll be fine.
Of course centrifugal forces don't exist, they are a fictitious force. You said it yourself, it only "appears" in a rotating frame of reference.
@@ThePiones "Of course they don't exist, I am using the word "fictitious" to describe them, see?" That's not a real argument. Physics only beyond this point, please. " You said it yourself, it only "appears" in a rotating frame of reference." Which means... it exists. It's not a debate. Want to describe physics in a non-inertial frame, and don't include centrifugal forces, coriolis forces, and their friends? You'll get it wrong. "But non-inertial frames are WORSE than inertial frames!" Can you point to a signed affidavit where God says that?
This force points towards the center of rotation, UTTER, UTTER BS.
@@tinyear926 Please get an education.
@@tinyear926 Please obtain an education.
Just did a physics exam past paper about this The centrifugal force of the particles is the normal reaction acted by the wall. Meanwhile, centrifugal force is when you use a rotating reference frame, a centrifugal force will be needed to explain the movements of the particles.
fix your comment
to. be more helpful than sheerun. You said centripetal for both. the second "imaginary" force is centrifugal, which is present in the rotating reference frame.
@@sheerun thx for reminding!
@@Thriron 🤣 thx for reminding me 🙏🏻
This would make a great tool for a physics class. Not just the circular motions and forces but also the build-up of momentum and transfer of forces through groups of particles.
why centripetal of course!
Nice work. Can't imagine the amount of math and software engineering to achieve this.
This is awesome. I cant wait to transition to 3.0. Will this 3.0 version be added to VCPKG? Thanks again!
This is fucking amazing, thank you!
Awesome work! Is v3 cross-platform deterministic? Would be superb for multiplayer games :)
Yes, cross platform determinism is now available on the main branch and will be released in version 3.1.
@@erin_catto honestly I didnt expect this. That is huge! Congratulations on the work! Is it cross-deterministic even while multi-threaded?
@@Kuptofity yes and multithreading was already deterministic
Wow nice work🎉
One of the titans of gamedev, hodling 2d sky on his, now rounded, shoulders
That’s beautiful!
Is segment-segment collision now possible?
These are very thin boxes. I don't recommend boxes this thin for general usage. And no, segment-vs-segment collision doesn't work. In Box2D v3 I would use capsules with a small radius.
Nice work!
Why limit this amazing work to 2D only?
There are lots of 3D physics engines already. Huge companies are tackling that problem. 2D physics doesn't get as much attention, so it's good to specialise there.
It's alive!
would be cool if we could have llamafile be able to express concepts as box2d scenes ..
ah. back when flash was cool
i didn't know that box2d can still be improved
It's been a long time since I tried Box2D. Now that it's written in C I want to try it again. Nice release
boxtoodeeveethree
Awesome work! It would be great if someone ported this to JavaScript or TypeScript, perhaps with the help of a transpiler? I might have a go at it myself if I find the time. Ninja is still running on a modified and very old JavaScript port of an ActionScript port of Box2D.
awesome!
Can't wait to implement into my 2d game engine!!
Amazing effort! This will roll in another era of 2d games!
Great
Awesome!
Amazing, great work Erin - i hope to one day see Godot have Box2d 3.0
So true
Amazing. Thank you for all your hard work 🙏🙏
omg. you're back. I love those videos.
Congratulations! A more than worthy replacement for v2.
Very awesome! The code being in C makes it very simple to grasp whats going on inside, serving as a great educational resource too!
I Love TestBed !!
Thank you for your decades of hard work Erin!
Congratulations!
Awesome!! Congrats!!!
Awesome looking forward to play around with it!
very excite! will probably update once someone makes java bindings for libgdx. thank you so much for all your hard work and such a great library!
Well done Sir, loving the demo...git clone as I type 🙂
GOAT
PGS 5.5 / 13 PGS_NGS 8 / 13 PGS_NGS_BLOCK 9 / 13 PGS_Soft 10.5 / 13 TGS_Sticky 7 / 13 TGS_Soft 12 / 13 <--- Best TGS_NGS 9 / 13 XPBD 1.5 / 13 Thank you for this video, it was really informative :)
RIP XPBD
Hey Eric, what solver and stabilisation methods did you use here? Also seems friction is modelled?
This is PGS_Soft as described here: box2d.org/posts/2024/02/solver2d/
44:29 what circus classes look like in middle school
Running your audio through OBS and using the filters can reduce a lot of the mouth noise and background humming. Was a game changer for me doing voiceovers. There's tons of good tutorials online explaining how to get it set up
I use OBS but I haven't played with the filters. I have a pretty good mic, Elgato Wave 3. Thanks for the advice. I'll look into filtering.
cdpr game engine devs should watch this. cp2077 jittery collisions are laughable