{"action":"created","issue":{"url":"https://api.github.com/repos/minetest/minetest/issues/4724","repository_url":"https://api.github.com/repos/minetest/minetest","labels_url":"https://api.github.com/repos/minetest/minetest/issues/4724/labels{/name}","comments_url":"https://api.github.com/repos/minetest/minetest/issues/4724/comments","events_url":"https://api.github.com/repos/minetest/minetest/issues/4724/events","html_url":"https://github.com/minetest/minetest/pull/4724","id":187259986,"number":4724,"title":"Improve number of blocks sent and occlusion culling.","user":{"login":"lhofhansl","id":446130,"avatar_url":"https://avatars.githubusercontent.com/u/446130?v=3","gravatar_id":"","url":"https://api.github.com/users/lhofhansl","html_url":"https://github.com/lhofhansl","followers_url":"https://api.github.com/users/lhofhansl/followers","following_url":"https://api.github.com/users/lhofhansl/following{/other_user}","gists_url":"https://api.github.com/users/lhofhansl/gists{/gist_id}","starred_url":"https://api.github.com/users/lhofhansl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhofhansl/subscriptions","organizations_url":"https://api.github.com/users/lhofhansl/orgs","repos_url":"https://api.github.com/users/lhofhansl/repos","events_url":"https://api.github.com/users/lhofhansl/events{/privacy}","received_events_url":"https://api.github.com/users/lhofhansl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-11-04T06:02:31Z","updated_at":"2016-11-04T17:05:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/minetest/minetest/pulls/4724","html_url":"https://github.com/minetest/minetest/pull/4724","diff_url":"https://github.com/minetest/minetest/pull/4724.diff","patch_url":"https://github.com/minetest/minetest/pull/4724.patch"},"body":"This should be an interesting one.\r\n\r\n(1) When blocks are retrieved from the server we retrieve a square (or a cube rather). We should retrieve a circle instead (or a sphere specifically).\r\nIt does not add to the visual experience to retrieve the corners of the cube, those blocks are mostly useless. As I was looking into improving this I noticed that isBlockInSight already checks the distance, we just need to pass in the correct range.\r\nWith this we're retrieving blocks up to the same distance in all directions - and no extra blocks in the corners of the cube. No extra comparison or work, fewer blocks shipped to the server, slightly better experience if the fog is set too far (the distance will still look rounded).\r\n\r\n(2) I think we were too conservative in the occlusion culling. The margin of error is MAP_BLOCKSIZE/2*SQRT(2)*SQRT(2) (= MAP_BLOCKSIZE) rather then MAP_BLOCKSIZE*SQRT(2)*SQRT(2) (= MAP_BLOCKSIZE * 2) as we have it now.\r\nThis change allows us to consider slightly more blocks and hence a higher chance to consider a block occluded. I've been playing with this for a while (ground, air, under water, caves, etc) with no rendering problems so far.\r\n\r\nI assume #2 will illicit some more discussion, #1 should be fairly uncontroversial.\r\n"},"comment":{"url":"https://api.github.com/repos/minetest/minetest/issues/comments/258489826","html_url":"https://github.com/minetest/minetest/pull/4724#issuecomment-258489826","issue_url":"https://api.github.com/repos/minetest/minetest/issues/4724","id":258489826,"user":{"login":"Fixer-007","id":16494741,"avatar_url":"https://avatars.githubusercontent.com/u/16494741?v=3","gravatar_id":"","url":"https://api.github.com/users/Fixer-007","html_url":"https://github.com/Fixer-007","followers_url":"https://api.github.com/users/Fixer-007/followers","following_url":"https://api.github.com/users/Fixer-007/following{/other_user}","gists_url":"https://api.github.com/users/Fixer-007/gists{/gist_id}","starred_url":"https://api.github.com/users/Fixer-007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fixer-007/subscriptions","organizations_url":"https://api.github.com/users/Fixer-007/orgs","repos_url":"https://api.github.com/users/Fixer-007/repos","events_url":"https://api.github.com/users/Fixer-007/events{/privacy}","received_events_url":"https://api.github.com/users/Fixer-007/received_events","type":"User","site_admin":false},"created_at":"2016-11-04T17:05:04Z","updated_at":"2016-11-04T17:05:04Z","body":"Another downside I noticed is on Liberty Land going down the stairs into the mine there was appearing/disappearing of farther part of tunnel, pics:\r\nstanding\r\n![lb-land1](https://cloud.githubusercontent.com/assets/16494741/20014860/83beba34-a2c1-11e6-8e72-01b4f4e5fd63.png)\r\nin jump\r\n![lb-land2](https://cloud.githubusercontent.com/assets/16494741/20014865/8dab5bf6-a2c1-11e6-8be4-e57847d2826c.png)"}}
{"actor":{"display_login":"Fixer-007"}}