Replies: 12 comments 45 replies
-
Moved to discussion, as the proposal doesn't contain a concrete technical implementation. Jolt can be integrated as a third-party extension, but it won't be tackled in core. The reason is the same as Bullet: we don't want to rely on third parties to maintain a physics engine. If we do this, we are reliant on any decision they make (including stopping the maintenance of the engine, shifting the focus towards non-game use cases, etc). Jolt is a physics engine that was designed for a single AAA engine, so it's easy for it to become unmaintained over time – probably even more so than Bullet. This is especially the case if its maintainers aren't interested in building a community, which is unfortunately quite common in libraries like this.
There are still many things that will be fixed/improved in GodotPhysics before 4.0 is released, so I wouldn't use its current state to judge how it will behave in the stable release. |
Beta Was this translation helpful? Give feedback.
-
I did not know Guerrilla physics engine was open source. I find this very interesting. I understand why the Godot physics team does not want to be dependent on some external library maintainers, but I would love to know what speaks against forking Jolt and using it as starting point for Godot's own physics system. I mean Jolt already has way more features (lovely constraints, animated ragdolls!) than we might even have in years to come, but much more importantly: Jolt went through AAA QA and a world famous release. It went through hundred thousands of play testers. Even when Godot Physics finally is able to replace Bullet, how long will it take to get it to a point where it has this feature set, and more importantly: when will it ever get this much testing? |
Beta Was this translation helpful? Give feedback.
-
I'm kind of thinking it over... the double precision thing looks supper important for Godot 4.0. I could work on adding Jolt as a third party extension for Godot 3.x but ultimately it wouldn't be added to Godot 4.0 or atleast anytime soon... Jrouwe mentioned they would work on adding doubles eventually but it seems Jolt runs better on floats for now... I could lend a hand at adding doubles to Jolt to add it to Godot 4.0 but this will take time. From what I saw most of Godot 4's inhouse physics engine is based off of Bullet already... Some features still need to be implemented like the joint constraints solver. Work already started on the other parts of Godot's inhouse physics engine but Im not really sure if it's based on Bullet too... The way I see it, Jolt needs a major revamp (mostly get double precision support) to base the inhouse engine off of it AT LEAST. Not to mention writing over a lot of what people already worked on... At best we could have it as a third party library like Bullet for 3.x And Linietsky did say we would be able to add other physics engines via GDExtensions in 4.0... |
Beta Was this translation helpful? Give feedback.
-
A physics engine needs to be perfect, that's essentially its purpose is to be 99.9% guaranteed not to break unless the most incredibly remote situations occur; Doom from 1993 has proven its robustness by just how ridiculous the situation the player must get in to cause any kind of game breaking issues (and even mostly these don't break the game, merely cause clipping errors). At present, the player merely has to walk over or under geometry that is slightly unusually (ie: not a 90degree box) and you'll get stuck... and I don't mean glitch, I mean hard reset the level stuck, which is one of the golden rules of physics engines, never to get in a situation that is impossible to get out of. I'm not criticising the work on GP, quite the contrary, I think it is incredible that such an undertaking was attempted as most physics engines are brought in from road-worn external sources that have complete focus on the development. But, I can't possibly imagine all the bugs that currently plague GP could be fixed before 4.0 RC (going on the current pace of development) and I would suggest an official implementation of a fully working physics engine so as there doesn't need to be only one broken solution available. |
Beta Was this translation helpful? Give feedback.
-
For the record, Jolt does now support double physics (and does it with loosing barely any performance compared to float). |
Beta Was this translation helpful? Give feedback.
-
I was messing around with adding a Jolt-based physics server to Godot as an engine module a few months back, with the intention of moving it to a GDExtension once that API was more fleshed out. Once godotengine/godot#65427 was merged I started working on getting it running on the major desktop platforms (Windows, Linux, macOS) as a GDExtension, and it seems to work well with the very small subset of features I have, which is essentially just boxes and spheres right now. You can find it over at godot-jolt/godot-jolt. Here's a short teaser I shared on the contributors chat a few weeks back: Jolt.mp4I'll be implementing more of the exposed GDExtension API in the coming weeks/months, assuming no major obstacles, with the hopes of getting as close to feature parity with Godot Physics as possible. I'll admit I haven't done much research on what the feature overlap is between Godot Physics and Jolt, so I can't say where there will be large gaps in functionality, besides the obvious lack of soft-body physics. So far I've only run into small things, like collision priority not being a thing in Jolt. I'm very happy to see Jolt adding double-precision, since the lack of such a thing would have been a pretty big asterisk on the feature set of this extension. I'll see about adding that to this extension once he merges it into |
Beta Was this translation helpful? Give feedback.
-
So based on a recent tweet, it seems the reason for not wanting Jolt (aside from relying on a 3rd party library) is that it uses GJK, like bullet, and isn't precise. Seems Jolt has double precision support now, so that's not an argument against it any longer. I realize there's a desire for precision, but with so many physics libraries going this route, I wonder if we're wishing for something impossible: Generic, precise, and performant. If you look at something like Quake, which uses more precise collision (not an iterative approximation algorithm), it has collision hulls baked into the levels, which limits your collision shapes to predefined boxes, so it's nice and fast, but not generic. I feel like this might be a "pick 2" type of scenario. |
Beta Was this translation helpful? Give feedback.
-
Hello everybody! I realize this discussion is largely about wanting to get Jolt into Godot as a first-party physics server, so I won't make this too regular of a thing, but I figured I would share some of the progress I've made on my GDExtension since I posted my announcement here. With that said... I've managed to add support for all the "standard shapes", meaning I've also just finished up all the joints, meaning Besides that, I've also added support for a bunch of properties/methods on The big items going forward are likely going to be If you're interested in a more detailed overview of the progress I encourage you to check out the "meta" issues I created in the repository, which you can find here: godot-jolt/godot-jolt#117. Feel free to drop any questions you might have in the repository's Discussions. I leave you with some clips showcasing all the above mentioned shapes and joints. Note that the rotating slider joint is done using a "motored" Shapes.mp4Joints.mp4 |
Beta Was this translation helpful? Give feedback.
-
Hello, lovely people! A lot has happened since my previous update here, but I'll try to keep this (likely final) update somewhat brief. Just to get this out of the way, you can now try out Godot Jolt yourself by downloading the release I just published here on GitHub. Be sure to skim through the README there to get a better sense of the compromises involved. Also, C# support for GDExtension is not in a great place right now, so you might run into trouble if you're using that. See this issue for more details. Since we last spoke I've managed to more or less complete what I (unofficially) dubbed as the first phase of my Jolt extension, where I tried to implement as much of Godot's physics API as possible, without resorting to adding any custom nodes. This was the "Godot Physics feature parity" issue that I linked in my previous update. The end result of that has been pretty good, I think. Coverage isn't exactly 100%, and probably closer to something like 90%, but I'm overall pleased with how well Jolt has meshed with Godot's physics API. I've tried my best to document any missing pieces or other discrepancies in the project's README, but if you happen to run into some that aren't mentioned, please create an issue for it. To finish up I'd just like to say thank you to everyone here who showed their support. It's funny what power a couple of reaction emojis can have, but this thread alone gave me a much needed morale boost, and I'm not sure I would have gotten to this point without it. I leave you once and for all with this video of a slightly modified version of GDQuest's RoboBlast demo, being powered by the Jolt physics engine: RoboBlast.mp4 |
Beta Was this translation helpful? Give feedback.
-
hi, have been a bit out of Godot 4 |
Beta Was this translation helpful? Give feedback.
-
Using Godot Jolt means a massive performance improvement compared to Godot Physics when spawning CharacterBody3Ds: godotengine/godot#78761. Godot Physics by comparison seems completely unuseable, even to Bullet Physics in Godot 3.5.2. Slideshow appears at |
Beta Was this translation helpful? Give feedback.
-
For future reference, it's planned to officially endorse using Jolt with Godot: #7308 |
Beta Was this translation helpful? Give feedback.
-
Describe the project you are working on
3D Retro FPS.
Describe the problem or limitation you are having in your project
I know Bullet had a number of issues, but the Godot physics engine has a lot of shortcomings as it currently stands and may require significant engineering efforts before it becomes viable for 3D games. Issues range from game breaking problems like getting stuck in/teleporting through geometry to rigid bodies just looking weird/not behaving physically accurately.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Ideally a physics engine developed for a AAA game (Horizon Forbidden West) will be a bit more robust and battle tested. I haven't actually looked into it in depth, but it sounds like it has more precision and deterministic behavior than Bullet, so it might be worth looking into.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
This would be an optional physics engine alternative users could select from, like with Bullet was in 3.x.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No, this is core functionality.
Is there a reason why this should be core and not an add-on in the asset library?
It might be possible to make it an add-on. Not 100% sure how 4.x handles physics libraries. I do think it might be useful as a core feature, though, for people running into issues with the Godot physics engine.
Might, at the very least, be worth looking into for reference.
Beta Was this translation helpful? Give feedback.
All reactions