Page 1 of 1

What can OMW physics do?

Posted: 04 Feb 2017, 22:55
by johndh
I've heard mention that OMW incorporates Bullet as its physics engine, but what does that entail? Does this enable the kind of physics interactions/puzzles that we see in adventure games? Can it be done where a player can, for example:
Push an object out of the way of a door?
Push an object onto a switch to activate it?
Push an object onto one end of a lever to lift the opposite end?
Push an object off a ledge and drop it on someone to cause damage?
Pick up and throw an object that is not a throwing weapon?
Cut a rope to drop a hanging object?
Stack boxes to make a staircase?

As I understand it, Bullet can do a lot more than that, but how would a content creator work with these things in OMW (i.e. through scripting, OMW-CS, etc)?

Re: What can OMW physics do?

Posted: 05 Feb 2017, 00:19
by wareya
"Physics engine" is the wrong term here. In how OpenMW is set up (because it's trying to copy morrowind, not make a unique game) the way interactions work is the domain of game logic, not bullet. Bullet makes it a lot easier for the game logic to do the "look for collisions, decide what to do" part.

Re: What can OMW physics do?

Posted: 05 Feb 2017, 00:42
by johndh
Does that mean there's not really a physics system in the way most people would think of it (dynamic interactions between objects and forces), and that it's basically just for things like hit detection and keeping you from walking through walls or falling through the floor?

Re: What can OMW physics do?

Posted: 05 Feb 2017, 09:07
by psi29a
Currently, yes... the physics 'engine' is mostly used for collisions detection. We've not spent more time on it because for Morrowind is that good enough.

Post-1.0 physics involves things like ragdoll physics. This is in the pipe-line, for example cc99cii has a working branch that allows loading of Oblivion assets like a hanging lamp in a room where you push it and it swings around. There is a video of this in the forum somewhere.

Re: What can OMW physics do?

Posted: 05 Feb 2017, 09:08
by Chris
johndh wrote:Does that mean there's not really a physics system in the way most people would think of it (dynamic interactions between objects and forces), and that it's basically just for things like hit detection and keeping you from walking through walls or falling through the floor?
Essentially, yeah. Bullet does allow for more dynamic continuous interactions between objects and forces, but OpenMW doesn't leverage that capability yet.

Re: What can OMW physics do?

Posted: 05 Feb 2017, 11:12
by Pherim
You'd probably have to edit most meshes and (possibly) game objects to make "real" physics work, anyway. You can't just make the engine capable of doing something and expect the game to do it by itself. But it seems you are aware of that.

Re: What can OMW physics do?

Posted: 05 Feb 2017, 18:25
by silentthief
johndh wrote: Push an object out of the way of a door?
Push an object onto a switch to activate it?
Push an object onto one end of a lever to lift the opposite end?
Push an object off a ledge and drop it on someone to cause damage?
Pick up and throw an object that is not a throwing weapon?
Cut a rope to drop a hanging object?
Stack boxes to make a staircase?

Would be awesome to be able to do these kind of things. You may be able to do creative scripting to do some of these (such as have the "Push an object onto a switch to activate it" example be a movable activator, or have a destructible object, like an invisible NPC that can register damage or onhit scripts be paralized in place where the rope from "Cut a rope to drop a hanging object" is -- and the hit on the NPC would activate the rope cut animation), but most of these if you can make them work is going to be creative work arounds such as this.

These are the same things that the original MW scripting engine could do, so at this time, afaict, openmw has no advantages in this area yet

you can do a lot with the scripting engine, but the physics is pretty mundane at this point afaict

ST the mundane

(edited a few times for clarity)

Re: What can OMW physics do?

Posted: 05 Feb 2017, 22:09
by johndh
Cool. Thanks for the clarification, everybody. I'll keep an eye out for post-1.0 developments.

Re: What can OMW physics do?

Posted: 06 Feb 2017, 09:33
by Pop000100
This in fact one of the things on my evergrowing wishlist i do hope that we can retain the organiztion power of the staticiness, like making pillow forts with the stacking mechanic.
psi29a wrote:......example cc99cii has a working branch ..............
The Thread

Re: What can OMW physics do?

Posted: 27 Nov 2020, 04:10
by JeroMiya
Pherim wrote: 05 Feb 2017, 11:12 You'd probably have to edit most meshes and (possibly) game objects to make "real" physics work, anyway. You can't just make the engine capable of doing something and expect the game to do it by itself. But it seems you are aware of that.
Yeah practically speaking this is true. If one were to be truly ambitious, then theoretically this could be possible through automation: first auto-generating collision meshes, and then estimating mass and other properties (friction, etc...) by taking a rough estimate of mesh size and looking up object density and other properties based on textures with a hand-chosen table mapping textures to density and other properties. This wouldn't work for new content, though.

Without automation, the only way to do it would be brute force hand-mapping objects to physics collision meshes and properties for every object in the original game (again would not work for new content).