Hey let's switch away from bullet to anything else (discussion)

Everything about development and the OpenMW source code.
imec
Posts: 37
Joined: 13 May 2012, 22:03

Re: Hey let's switch away from bullet to anything else (discussion)

Post by imec »

Aren't object physics and ragdolls a part of the longterm agenda to improve upon Morrowind/provide Oblivion support/make OpenMW attractive as a general purpose engine? Would those be too difficult to implement through a custom solution instead of Bullet?
User avatar
Stomy
Posts: 47
Joined: 11 Dec 2018, 02:55
Location: Fhloston Paradise!
Contact:

Re: Hey let's switch away from bullet to anything else (discussion)

Post by Stomy »

If you want ragdolls and physics objects to look halfway convincing and not slow framerate down to a crawl then you need the programmer to understand rigid body dynamics and how they work in video games. Getting those features to fit properly in any engine is not a matter of simply turning on rigid body dynamics, as I'm pretty sure was already mentioned by another developer trying exactly that in this thread. That said these concepts are not so difficult if you're capable of final-year high-school maths, this book for example covers physics objects in detail and introduces ragdolls and cloth simulation in about 60 pages in the final chapter and you can figure out the rest with some google-fu and trial-and-error, I would be really surprised if most developers here couldn't figure it out.

From personal experience, the added upfront effort of implementing a custom system ends up being less than the headaches of trying to adjust an existing implementation to fit an engine it was not specifically designed to accommodate after it has already been put into use. You have to wait longer to see initial results but in return you have better performance and stability down the line, not to mention you have one less dependency which is always a win.

I don't expect to convince anyone by simply stating this however, anyone can have a great idea but what matters is actual results. For now I'd recommend adjusting how OpenMW uses Bullet to better fit its ideal conditions as that's more likely to get dividends in the short term. Meanwhile I'll hunker down on my collision project and if it turns out to be a comparable solution (both performance- and maintainability-wise) to what Bullet currently offers in a few months time then that will be the time to decide whether to switch or not.
User avatar
lysol
Posts: 1513
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: Hey let's switch away from bullet to anything else (discussion)

Post by lysol »

Stomy wrote: 11 Dec 2018, 14:25 I don't expect to convince anyone by simply stating this however, anyone can have a great idea but what matters is actual results. For now I'd recommend adjusting how OpenMW uses Bullet to better fit its ideal conditions as that's more likely to get dividends in the short term. Meanwhile I'll hunker down on my collision project and if it turns out to be a comparable solution (both performance- and maintainability-wise) to what Bullet currently offers in a few months time then that will be the time to decide whether to switch or not.
Nice! Thanks for wanting to help out. It will be interesting to see what you can come up with.
User avatar
wareya
Posts: 338
Joined: 09 May 2015, 13:07

Re: Hey let's switch away from bullet to anything else (discussion)

Post by wareya »

I made my own custom collision system too, it's definitely not as hard as some projects think to get simple mesh-mesh tracing and testing, even if you throw in a small number of easily-definable primitives like cylinders or AABBs. What's hard is doing everything in a way that makes it so you can update it on the fly, is fast, and takes up a small amount of memory. I'm looking forward to what you come up with.

Rigid body and ragdoll dynamics can be given by having an actual physics engine for physics objects, and making kinematic objects mostly ignore them. Unless you want to be like Half-Life 2, but then, there's still a way to make them work well together.
User avatar
cc9cii
Posts: 523
Joined: 28 Mar 2013, 04:01

Re: Hey let's switch away from bullet to anything else (discussion)

Post by cc9cii »

Well, I for one am really excited to hear the possibility of a custom physics engine for OpenMW
User avatar
Sslaxx
Posts: 233
Joined: 12 Aug 2011, 18:59
Location: Malvern, UK
Contact:

Re: Hey let's switch away from bullet to anything else (discussion)

Post by Sslaxx »

Interesting there's talk of switching away from Bullet. A project I follow, Godot https://godotengine.org/ originally had its own 3D physics engine before switching to Bullet. It depends on what the project needs though.
User avatar
Stomy
Posts: 47
Joined: 11 Dec 2018, 02:55
Location: Fhloston Paradise!
Contact:

Re: Hey let's switch away from bullet to anything else (discussion)

Post by Stomy »

It's all a trade-off. Godot is attempting to be a general-purpose game engine and so a generic solution makes perfect sense as the developers can't make any reasonable predictions about what any given game will be doing.

With OpenMW we have a few more luxuries, such as knowing that the exterior world is divided into a 2D grid of a fixed size with each cell having a heightmap at a fixed resolution. That immediately gives us some direction as, for example we can ignore any comparisons with objects in other cells if a trace never crosses any cell borders. Neither Blender nor Godot can assume such a restriction and thus cannot exploit it, they have to prepare for every eventuality which means they can't be the optimal solution for any.
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Hey let's switch away from bullet to anything else (discussion)

Post by psi29a »

Keep in mind that OpenMW is not restricted to just Morrowind. Think of OpenMW as OpenGamebryo.
User avatar
Stomy
Posts: 47
Joined: 11 Dec 2018, 02:55
Location: Fhloston Paradise!
Contact:

Re: Hey let's switch away from bullet to anything else (discussion)

Post by Stomy »

I like to think of it as OpenImmerse, the model formats are still .nif after all and not .gbf or .cef :P

That said, in terms of collision detection there really isn't much difference between all of Bethesda's NetImmerse/Gamebryo/Creation Engine games. Active physics objects and ragdolling would be implemented on top of the regular collision system anyway (or integrated via an external API like @wareya mentioned) and work pretty much the same way in every game. The only significant change I can think of is adding skeletal hit detection for projectiles vs actors from Oblivion onwards, and even that is just a more specialized alternate trace used only by projectiles.
User avatar
silentthief
Posts: 456
Joined: 18 Apr 2013, 01:20
Location: Currently traversing the Ascadian Isles

Re: Hey let's switch away from bullet to anything else (discussion)

Post by silentthief »

Stomy wrote: 12 Dec 2018, 16:42 The only significant change I can think of is adding skeletal hit detection for projectiles vs actors from Oblivion onwards, and even that is just a more specialized alternate trace used only by projectiles.
Not much to say about physics/bullet, however I do hope that this is something that can be [post 1.0 feature request] done for use with both projectiles and for melee weapons as well

ST
Post Reply