{"action":"created","issue":{"url":"https://api.github.com/repos/OpenMW/openmw/issues/1931","repository_url":"https://api.github.com/repos/OpenMW/openmw","labels_url":"https://api.github.com/repos/OpenMW/openmw/issues/1931/labels{/name}","comments_url":"https://api.github.com/repos/OpenMW/openmw/issues/1931/comments","events_url":"https://api.github.com/repos/OpenMW/openmw/issues/1931/events","html_url":"https://github.com/OpenMW/openmw/pull/1931","id":362606210,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3Mjc3MjM5","number":1931,"title":"[Discussion] Rework actors update","user":{"login":"akortunov","id":26434804,"node_id":"MDQ6VXNlcjI2NDM0ODA0","avatar_url":"https://avatars2.githubusercontent.com/u/26434804?v=4","gravatar_id":"","url":"https://api.github.com/users/akortunov","html_url":"https://github.com/akortunov","followers_url":"https://api.github.com/users/akortunov/followers","following_url":"https://api.github.com/users/akortunov/following{/other_user}","gists_url":"https://api.github.com/users/akortunov/gists{/gist_id}","starred_url":"https://api.github.com/users/akortunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akortunov/subscriptions","organizations_url":"https://api.github.com/users/akortunov/orgs","repos_url":"https://api.github.com/users/akortunov/repos","events_url":"https://api.github.com/users/akortunov/events{/privacy}","received_events_url":"https://api.github.com/users/akortunov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":25,"created_at":"2018-09-21T13:04:04Z","updated_at":"2018-10-19T05:46:18Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/OpenMW/openmw/pulls/1931","html_url":"https://github.com/OpenMW/openmw/pull/1931","diff_url":"https://github.com/OpenMW/openmw/pull/1931.diff","patch_url":"https://github.com/OpenMW/openmw/pull/1931.patch"},"body":"Related to [bug #4647](https://gitlab.com/OpenMW/openmw/issues/4647).\r\nDo we really need to render all actors in scene indifferently from distance, and for flying creatures update physics too?\r\n\r\nI tried to do not render actors outside of AI processing range, and here is result of my experiments.\r\nComparison in Caldera on i7-7700, with processing distance 7168:\r\n\r\n|ECLD| Master  |   PR  |\r\n|---| ------------- | ------------- |\r\n|4| 15 FPS | 40 FPS |\r\n|3| 30 FPS | 65 FPS |\r\n|2| 65 FPS | 95 FPS |\r\n|1| 110 FPS | 120 FPS |\r\n\r\nECLD is an \"exterior cell loading distance\".\r\n\r\nFor now amount of changes in this PR:\r\n1. De-hardcode actor's processing range (including AI, animations and physics stuff)\r\nNote: we handle scripts and stats (drowning, rest and magic effects, for example) outside of this range.\r\n2. Hide actors outside that distance. Flying actors too, instead of animating them and updating physics for them indifferently from distance.\r\n3. Apply alpha to actors near that border instead of just make them appear/disappear.\r\n\r\nCan anyone test how it affects performance?\r\nAlso I wonder if we can apply fog for actors near processing border.\r\n@AnyOldName3, @wareya, what do you think?\r\n\r\nWays to improve this feature: \r\n1. Disable collisions for hidden actors to do not allow player to hit them with ranged weapons (or just limit projectile range by AI processing distance).\r\n2. Find a better way to apply transparency for such actors - for now we call recreateShaders() every time we change actor's transparency a bit.\r\n3. Implement a dithering shader rather than just apply alpha."},"comment":{"url":"https://api.github.com/repos/OpenMW/openmw/issues/comments/431251674","html_url":"https://github.com/OpenMW/openmw/pull/1931#issuecomment-431251674","issue_url":"https://api.github.com/repos/OpenMW/openmw/issues/1931","id":431251674,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTI1MTY3NA==","user":{"login":"akortunov","id":26434804,"node_id":"MDQ6VXNlcjI2NDM0ODA0","avatar_url":"https://avatars2.githubusercontent.com/u/26434804?v=4","gravatar_id":"","url":"https://api.github.com/users/akortunov","html_url":"https://github.com/akortunov","followers_url":"https://api.github.com/users/akortunov/followers","following_url":"https://api.github.com/users/akortunov/following{/other_user}","gists_url":"https://api.github.com/users/akortunov/gists{/gist_id}","starred_url":"https://api.github.com/users/akortunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akortunov/subscriptions","organizations_url":"https://api.github.com/users/akortunov/orgs","repos_url":"https://api.github.com/users/akortunov/repos","events_url":"https://api.github.com/users/akortunov/events{/privacy}","received_events_url":"https://api.github.com/users/akortunov/received_events","type":"User","site_admin":false},"created_at":"2018-10-19T05:46:18Z","updated_at":"2018-10-19T05:46:18Z","author_association":"CONTRIBUTOR","body":"Ok, I re-use the existing material for now."}}
{"actor":{"display_login":"akortunov"}}