Getting a large view range in 5.7

For people working on the C++ code.
Post Reply
User avatar
rubenwardy
Moderator
Posts: 6831
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

Getting a large view range in 5.7

by rubenwardy » Post

Minetest 5.7.0 is coming with an improved graphics pipeline. One of the improvements is the ability to use more of the GPU by batching together mapblock meshes. This can result in significant performance improvements on modern computers, especially those with dedicated GPUs.

One caveat is that it still takes a long time to fully load the map.

Settings

In order to benefit from this performance improvement, you'll need to change the "Client Mesh Chunksize" (client_mesh_chunk) setting to 4 or 8. To increase your view range, you'll also need to increase a few more settings:

Code: Select all

client_mesh_chunk = 4
# ^ also try 8 if you have a dedicated GPU
viewing_range = 1000
client_mapblock_limit = 50000

# Server-side settings.
# Only change the following on singleplayer or LAN servers, this will cause a lot of network/resource use 
max_block_generate_distance = 63
max_block_send_distance = 63
Note that the bottleneck now is very much loading the map. You can change some settings to load a large view range when playing singleplayer, but it takes a while and is not advised on multiplayer servers

to do:
lhofhansl wrote:Note that at large viewing_range you really need to increase max_simultaneous_block_sends_per_client or the server simply cannot send the blocks fast enough.
You also must either apply #13277, or increase server_unload_unused_data_timeout to 180 or 240. Otherwise the server will unload the close blocks, which makes distant culled blocks visible, which are then sent to the client, only to be culled there, slowing the entire process down (and sending 2-5x as many blocks).

Gallery

Image
1200 nodes render distance, shadows, bloom, FXAA, 4K display @ 15 FPS (kilbith)

Image
2000 view range with bloom, 4k @ 7fps (kilbith)
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
freshreplicant
Member
Posts: 201
Joined: Sun Aug 09, 2020 10:37
In-game: freshreplicant

Re: Getting a large view range in 5.7

by freshreplicant » Post

Wow, looks amazing. Will have to see how much of that my RX580 can handle.

Lars
Developer
Posts: 22
Joined: Fri Oct 13, 2017 21:12

Re: Getting a large view range in 5.7

by Lars » Post

You meant client_mapblock_limit = 50000? 5000 is way too small.

User avatar
rubenwardy
Moderator
Posts: 6831
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

Re: Getting a large view range in 5.7

by rubenwardy » Post

Lars wrote:
Sat Mar 11, 2023 20:18
You meant client_mapblock_limit = 50000? 5000 is way too small.
Yes, edited
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

ShadMOrdre
Member
Posts: 1022
Joined: Mon Dec 29, 2014 08:07
GitHub: ShadMOrdre
In-game: shadmordre
Location: USA

Re: Getting a large view range in 5.7

by ShadMOrdre » Post

These settings force the server to generate a 1km conical sphere in the direction the player is looking. This could easily be misused on a server, by errant players simlpy wandering around ungenerated areas of the world, forcing the server into an endless loop of generating such a large amount of terrain.

In previous versions, I set client_mapblock_limit to -1, and client_unload_unused_data_timeout to 3600, or 1 hour. With these two settings, I could generate a large area of the map, and could view the entirety of that generated area when disabling view distance. While loosing FPS, I could see all parts of the map that I had explored during this instance of playing. Once generated, the server was able to focus on other tasks, such as mobs.


In the new version, with these settings, the server seems to want to generate all terrain within the view distance. A view distance of 1km means the server is tied up until all the terrain in the direction the player is looking has been generated. If I simply turn, the server now has to generate the newly visible area.

This does not work.

I think that map gen distance should be a separate setting from view distance. While view distance can be set high, mapgen distance should not be. For lua mapgens, the problem is magnified.

This weird new behavior, and the disable draw distance bug, are cause enough to not release anything until this is resolved.

Server owners beware, the above settings will lag your server until or unless you've generated all desired terrain.

Shad
cdb_6230aa87cda1
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.

User avatar
Blockhead
Member
Posts: 933
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under

Re: Getting a large view range in 5.7

by Blockhead » Post

While I think this advice clearly is bad advice for a server operator, I thought it was really only intended for singleplayer. That could be made clearer. I definitely agree though that mapgen and view distances should be decoupled. Lastly, the view distance bug is already solved in 3e148e281.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️

User avatar
Walker
Member
Posts: 1543
Joined: Tue Oct 03, 2017 09:22
In-game: Walker

Re: Getting a large view range in 5.7

by Walker » Post

wooow

lets see what i can reach with my RX 6600 XT at 4K ;)

once 5.7.0 is out i will post FPS for 4K and 3x4k (wall)

User avatar
rubenwardy
Moderator
Posts: 6831
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

Re: Getting a large view range in 5.7

by rubenwardy » Post

ShadMOrdre wrote:
Fri Mar 17, 2023 05:02
I think that map gen distance should be a separate setting from view distance. While view distance can be set high, mapgen distance should not be. For lua mapgens, the problem is magnified.
It is already - `max_block_generate_distance` is a server-side setting that sets how far the map is generated for clients.
ShadMOrdre wrote:
Fri Mar 17, 2023 05:02
Server owners beware, the above settings will lag your server until or unless you've generated all desired terrain.
This guide is intended for singleplayer, not for servers. I've edited the first post to make this clearer
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

ShadMOrdre
Member
Posts: 1022
Joined: Mon Dec 29, 2014 08:07
GitHub: ShadMOrdre
In-game: shadmordre
Location: USA

Re: Getting a large view range in 5.7

by ShadMOrdre » Post

@rubenwardy,

Thank you for the clarification.

Can you please trigger a Windows daily dev build with the latest commits for further testing please? Or is there a newer compiled RC somewhere?

Thanks again, in advance.


Shad
cdb_6230aa87cda1
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.

ShadMOrdre
Member
Posts: 1022
Joined: Mon Dec 29, 2014 08:07
GitHub: ShadMOrdre
In-game: shadmordre
Location: USA

Re: Getting a large view range in 5.7

by ShadMOrdre » Post

Just a thought, but MT is a client server application. The client is the server, in a manner of speaking, and all MT games require the server part of the application to "host" the world so that the client part of the application can connect to the "served" world.

So, while these settings were meant for single player, I would argue that there is no difference, and the user experience will suffer, regardless of singleplayer server or hosted multiplayer server.

Still, it is nice to have clarification on what settings have what effect.



Shad
cdb_6230aa87cda1
MY MODS: lib_ecology lib_materials lib_clouds lib_node_shapes ---- Inspired By: Open Source Virtual World Simulator Opensimulator.

User avatar
Walker
Member
Posts: 1543
Joined: Tue Oct 03, 2017 09:22
In-game: Walker

Re: Getting a large view range in 5.7

by Walker » Post

THIS IS A GAME CHANGER !!!

really, this is unbelievable

first things first:
- OS: Kubunut 22.04 LTS
- Minetest: 5.7.0-dev-6cd2eea48 ( from today 5am UTC+2)

- GPU: RX 6600 XT
- CPU: Ryzen 9 5950x
- RAM: 128GB ( 3200MT/s dual channel; dual rank )

and now ...

woooooooooow

( all setting from first post merged )
client_mesh_chunk = 1 / 1x4K / 1000 viewdist. = 14fps
client_mesh_chunk = 8 / 1x4K / 1000 viewdist. = 61fps+ (max display refreshrate )
client_mesh_chunk = 8 / 3x4K / 1000 viewdist. = 61fps+ (max display refreshrate )
client_mesh_chunk = 8 / 1x8K / 1000 viewdist. = 61fps+ (max display refreshrate )

scene are:
- flat map gen
- camera at cloud level
- many trees ( jungle, pine and "normal" )

User avatar
初音 ミク
Member
Posts: 103
Joined: Wed Mar 03, 2021 07:17

Re: Getting a large view range in 5.7

by 初音 ミク » Post

On a laptop with Ryzen 2200U (integrated GPU) I can now play at 50+ fps on Walkers German-Creative-server with a viewing range of 400

50+ was determined in the spawn area with lots of trees @ 1280x720p windowed @ Kubuntu 22.04
初音 ミク = Hatsune Miku --- my page on Wikipedia > https://en.wikipedia.org/wiki/Hatsune_Miku

and now Walker's official mistress

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest