Physics improvement

Everything about development and the OpenMW source code.
Post Reply
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Physics improvement

Post by jhooks1 »

OpenMW physics are kinda bad, constantly falling through floors and other problems. I have been looking into our physics system a little trying to understand it for the past 2 days. Mainly physic.hpp/cpp, physicsystem, and bullet_nif_loader. I plan on looking into Project Aedra to see what they are doing differently, hopefully whatever it is can be applied to openmw.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Physics improvement

Post by Zini »

Okay, but wasn't gus planning to do the same? If so, you probably should coordinate with him.
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Physics improvement

Post by gus »

Here are some important paramters:
*setMargin() in collision shape
*gravity
*the whole btKinematicController stuff

IMO, you should check first which kinematicController aedra use.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Physics improvement

Post by jhooks1 »

Gus, we can work together on this if you want 8-)
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Physics improvement

Post by gus »

sure ;)
btw, i'm often in the irc channel.

but for now, i'm focusing on the crash related to the physic system. Which version of bullet do you have btw? Because i've a strange bug with bullet 2.76 (basically i can't use the debug mode... very annoying)
User avatar
psi29a
Posts: 5362
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Physics improvement

Post by psi29a »

gus wrote:but for now, i'm focusing on the crash related to the physic system. Which version of bullet do you have btw? Because i've a strange bug with bullet 2.76 (basically i can't use the debug mode... very annoying)
The latest stable (and trusted) release of libbullet is 2.77, almost all of our releases packages are based on this as well.

We will not be upgraded until 2.80 is released as versions in between have a horribly crippling performance bug.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Physics improvement

Post by jhooks1 »

Got the latest Project Aedra from the svn. It doesn't use btKinematicController.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Physics improvement

Post by jhooks1 »

Changing our capsule width seems to eliminate the falling bug. But areas where we should fall now don't always work correctly.
User avatar
Rhys
Posts: 113
Joined: 06 Aug 2011, 01:51
Location: Australia

Re: Physics improvement

Post by Rhys »

I remember using blender game engine (bullet physics) lots of people would make their player code cast rays (from the previous location to current location) to test if the base of the player object had glitched through and if so, place the player back at the previous tick position. Otherwise I would find it always falling through, especially through edges that border changes in surface direction.
This might be too 'hackish' for openmw though.
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Physics improvement

Post by gus »

I remember using blender game engine (bullet physics) lots of people would make their player code cast rays (from the previous location to current location) to test if the base of the player object had glitched through and if so, place the player back at the previous tick position. Otherwise I would find it always falling through, especially through edges that border changes in surface direction.
This might be too 'hackish' for openmw though.
Why not? If other stuff do not work, we might try that, thanks ;)

jhooks1: I think we should first determine the right gravity to apply, because many other parameters depends on the gravity. With a small gravity, you don't go through the floor etc.
Post Reply