Page 1 of 1

Minetest FPS

PostPosted: Tue Dec 30, 2014 17:08
by macabre222
Hello wasn't sure where to post this but was just wondering what all methods have been used or will be used to increase minetest performance?

example: Only loading textures for block faces visible to camera etc..

im sure that has been done and others becuase the performance is already very good, but if we all thought about it we could make it better.

have you tried reducing image quality based on distance from player, like 64x64 texture within 8 block, 32x32 for 8-12 all the way down to 2 tone block for far distances?, kinda like farcry 1 developers used for their engine.

Re: Minetest FPS

PostPosted: Tue Dec 30, 2014 17:32
by Krock
I'm not sure if it's Irrlicht's job to do such quality filters.

About the visible-face-only loading: It would take too much time to calculate it for each node.

Re: Minetest FPS

PostPosted: Tue Dec 30, 2014 17:38
by rubenwardy
All the nodes - you may call them blocks - are combined into a single mesh (either for the whole world, or for each mapblock, I can't remember). The faces that are up against another block are hidden. You can see this if you get your head stuck in a block.

Your texture size scaling thing sounds like Level of Detail (LOD). It is used in some games for terrain. I don't think it is used in Minetest. Minetest used to have a feature called Farmesh, which allowed you to see 1000s of blocks into the distance, but this was removed as it was buggy. (Additionally, it was designed for Mapgen v5, and didn't work well with Mapgen v6)

I am not a senior developer, I know this from reading forum posts and talking on IRC. Zeno is the one to talk to about general optimisation at the moment, RealBadAngel does graphics optimisations. He fixed node boxes.

Re: Minetest FPS

PostPosted: Tue Dec 30, 2014 18:34
by Calinou
macabre222 wrote:have you tried reducing image quality based on distance from player, like 64x64 texture within 8 block, 32x32 for 8-12 all the way down to 2 tone block for far distances?, kinda like farcry 1 developers used for their engine.


OpenGL does it for you, (called mip-mapping). However, it is disabled by default, you have to enable it in the options menu.

Occlusion culling is also already done since 0.3.1.

Re: Minetest FPS

PostPosted: Tue Dec 30, 2014 20:53
by macabre222
ah is that what mipmapping does lol, just tried it and sure enough there is a pixel'd blur at a distance.

I hope my post doesnt bother anyone, and sorry for just suggesting things that have already been done. I just found myself playing the game and thought hmm, what about this and that XD

Re: Minetest FPS

PostPosted: Fri Jan 02, 2015 17:56
by hmmmm
macabre222 wrote:Hello wasn't sure where to post this but was just wondering what all methods have been used or will be used to increase minetest performance?

example: Only loading textures for block faces visible to camera etc..

im sure that has been done and others becuase the performance is already very good, but if we all thought about it we could make it better.

have you tried reducing image quality based on distance from player, like 64x64 texture within 8 block, 32x32 for 8-12 all the way down to 2 tone block for far distances?, kinda like farcry 1 developers used for their engine.


Forsynth mesh optimization is implemented
Mesh welding is unfeasible due to the high runtime and the frequency at which meshes are regenerated
Frustrum culling has been implemented in software
Occlusion culling is implemented in software as well. (no idea about its effectiveness vs. hardware OC - probably not entirely useful unless each MapBlock is made into its own scene node)
VBO is implemented, but problematic due to Irrlicht's handling of dropped buffers.
Mipmapping is implemented but definitely not as useful as LOD handling
LOD handling is not implemented. Irrlicht has some things to help with this if I recall correctly. At a certain distance, textures could be a single pixel.
celeron55 reports that we could gain performance by re-adding the texture atlas. not sure about this one
Combining mapblock meshes would result in a significant gain on more recent GPUs.
Might help to play with vertex buffering modes for non-Intel/Linux setups
Also possibly might be a significant overdraw problem thanks to caves. Need to investigate further.

Re: Minetest FPS

PostPosted: Sat Feb 07, 2015 20:53
by Hybrid Dog
you could also add back farmesh

Re: Minetest FPS

PostPosted: Sun Feb 08, 2015 08:12
by Hiradur
Does Minetest offer a batch counter? I can imagine the batch count could be an issue which the texture atlas and VBOs may reduce.