Physics improvement

Everything about development and the OpenMW source code.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Physics improvement

Post by Zini »

Do we have determined yet how to handle the walking speed of NPCs? In MW it can vary widely and as I see it, this parameter is tightly coupled with the stuff you are planning to work on. Or is that already implemented?
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Physics improvement

Post by jhooks1 »

Tried different values for gravity, still having the falling problem. I need to look more at aedra's physics.
User avatar
ElderTroll
Posts: 499
Joined: 25 Jan 2012, 07:01

Re: Physics improvement

Post by ElderTroll »

Being someone who often goes for the easiest solution I have some suggestions, 1) google the basic problems you are having to see if others have encountered/solved them, 2) check Aedra change logs to see if there are major differences in the implementation of bullet, 3) ask Tom lopes from Aedra for his advice, and 4) post on the ogre or bullet forums.

I'm a lazy man Jhooks. Good luck!
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Physics improvement

Post by gus »

Tried different values for gravity, still having the falling problem. I need to look more at aedra's physics.
It's normal. But I think we should determine gravity by the fall velocity in morrowind (we cannot set the gravity we want, we have to pick up the right one so that the PC fall at the same speed than in morrowind).

Edit: I prefer to "finish" the Dialogue task before starting again with bullet, so for the moment, i won't code anything.
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Physics improvement

Post by sirherrbatka »

@GUS

Do you want me to try measure falling velocity in MW? I can do this so we will be able to calculate acceleration.
User avatar
gus
Posts: 390
Joined: 11 Aug 2011, 15:41

Re: Physics improvement

Post by gus »

That would be cool! Be aware that there might be some speed cap.
User avatar
ElderTroll
Posts: 499
Joined: 25 Jan 2012, 07:01

Re: Physics improvement

Post by ElderTroll »

Here's Tom's Aedra post on the bullet physics forums from last year.
Versions of Project Aedra prior to r110 use purely raycasted collision detection without Bullet. Versions r110 and greater use *a modified version of* Bullet Collision and Linear Math.
http://bulletphysics.org/Bullet/phpBB3/ ... =17&t=6353

and here's OpenMW's in case you want to update it (it's like 3 and a half years old).

http://bulletphysics.org/Bullet/phpBB3/ ... lit=openmw
User avatar
sirherrbatka
Posts: 2159
Joined: 07 Aug 2011, 17:21

Re: Physics improvement

Post by sirherrbatka »

I'm aware of the speed cap gus, I will just try to use fall long enough to have a good time but not too long. The cap seems to be quite high anyway. Going to do the job right now ;-)


Three attempts and get something like 650 u/s^2 but it's flawed. I will make bigger (like 6 times bigger) jumps and calculate proper value both with cap.


9,8 m/s^2 is around 690 u/s^2
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Physics improvement

Post by raevol »

Elder- Starting a new thread to discuss the bullet forum post.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Physics improvement

Post by jhooks1 »

Woot!! I think I got rid of the falling bug. :P

internalCollisionShape = new btBoxShape(btVector3(14.64f * 2.0f, 33.25f * 2.0f, 14.24f * 2.0f)); (From Project Aedra)

Doing it this way instead of btCapsuleShapeZ seems to get rid of the falls.

mCharacter = new btKinematicCharacterController( internalGhostObject,internalGhostObject,btScalar( 40 ),1,4,20,9.8,0.2 );

I don't know anything about external and internal capsule shapes (or bullet in general), but setting them both to the same thing is probably wrong. It works though.

There are slight npc collision problems, I am still testing things on the animation2 branch. I know I need to make a new branch from master, and that will probably solve these problems. Will make the new branch soon.
Post Reply