Physics for non-moving actors

Everything about development and the OpenMW source code.
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Physics for non-moving actors

Post by psi29a »

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: 899
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Physics for non-moving actors

Post by akortunov »

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: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Physics for non-moving actors

Post by psi29a »

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: 66
Joined: 26 May 2016, 09:54

Re: Physics for non-moving actors

Post by raven »

The unit is milliseconds I guess.
User avatar
akortunov
Posts: 899
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Physics for non-moving actors

Post by akortunov »

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: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Physics for non-moving actors

Post by psi29a »

That is a great improvement then... and certainly worth the effort investigating before 1.0
User avatar
akortunov
Posts: 899
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Physics for non-moving actors

Post by akortunov »

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