Physics for non-moving actors

Everything about development and the OpenMW source code.
User avatar
psi29a
Posts: 4193
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: Physics for non-moving actors

Post by psi29a » 08 May 2018, 09:34

What is: ~1.5, ~1.75, ~2, is that the number of actors with gravity as apposed to 4, 5 and 7?

Yes, it is very much worth looking into. We've heard from many people that OpenMW is 'slow' in busier areas in the game.

User avatar
akortunov
Posts: 392
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation
Github profile: https://github.com/akortunov

Re: Physics for non-moving actors

Post by akortunov » 08 May 2018, 09:46

psi29a wrote:
08 May 2018, 09:34
What is: ~1.5, ~1.75, ~2, is that the number of actors with gravity as apposed to 4, 5 and 7?
It is a profilier output:
Screenshot_20180508_124342.png

User avatar
psi29a
Posts: 4193
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: Physics for non-moving actors

Post by psi29a » 08 May 2018, 10:15

Ah, OK... even then, the profiler doesn't make it specific what those numbers mean. What kind of load is that? Smurfs per second? ;)

raven
Posts: 65
Joined: 26 May 2016, 09:54

Re: Physics for non-moving actors

Post by raven » 08 May 2018, 10:59

The unit is milliseconds I guess.

User avatar
akortunov
Posts: 392
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation
Github profile: https://github.com/akortunov

Re: Physics for non-moving actors

Post by akortunov » 08 May 2018, 11:13

psi29a wrote:
08 May 2018, 10:15
Ah, OK... even then, the profiler doesn't make it specific what those numbers mean. What kind of load is that? Smurfs per second? ;)
Well, according to code, it is a time interval between end of physics calculation and start of physics calculation in milliseconds, measured by osg::Timer.
So 7 units roughly means 7ms spent for physics update in every frame, 2 units means 2ms in every frame.

User avatar
psi29a
Posts: 4193
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: Physics for non-moving actors

Post by psi29a » 08 May 2018, 12:19

That is a great improvement then... and certainly worth the effort investigating before 1.0

User avatar
akortunov
Posts: 392
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation
Github profile: https://github.com/akortunov

Re: Physics for non-moving actors

Post by akortunov » 25 May 2018, 06:37

Should be mostly fixed now, but I encountered a weird case - when mod developers place actor in the air.
The example is a Redguard beggar near Ra'Virr shop in Animated Morrowind: expanded (ID: AM_Beggar2).
This character has 513 Z position in ESP file, but has 503 Z position in Morrowind in-game for some reason.

It seems vanilla uses a some kind of tracing durings initial placement, but do not touch standing actors afterwards.
Interesting, but ResetAll console command in Morrowind does not use tracing - actors will take position exactly from ESM/ESP file.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests