performance ideas

emugod
Member
 
Posts: 33
Joined: Tue Aug 13, 2013 19:49

performance ideas

by emugod » Thu Jul 10, 2014 04:48

Tessellation, combining of multiple node faces to reduce the total number of polygons to be rendered. What kind of tessellation does minetest feature? Minecraft had a lot of work put into its tessellator, in the earlier days of its development, but it seems to have been abandoned at some point. Does it not actually work to improve performance?

Dynamic LOD, reducing apparent voxel resolution at distance by grouping nodes together for rendering purposes. Maybe just by rendering blocks as nodes (in which case it could be part of viewtopic.php?f=7&t=9648, and probably not actually a great performance boost but maybe still nice as a visual effect), or as a more complex form with lesser groupings (reduce each block first to eight and then four rendered nodes, before finally just one).

Predictive block loading/generation for caves.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: performance ideas

by sfan5 » Thu Jul 10, 2014 07:14

emugod wrote:Predictive block loading/generation for caves.

So you want the mapgen running on the client?
That won't work for Lua mapgens anyway, or for servers with mods that affect generation.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: performance ideas

by Calinou » Thu Jul 10, 2014 07:44

emugod wrote:Tessellation, combining of multiple node faces to reduce the total number of polygons to be rendered. What kind of tessellation does minetest feature? Minecraft had a lot of work put into its tessellator, in the earlier days of its development, but it seems to have been abandoned at some point. Does it not actually work to improve performance?


This is not tesselation; this is just generic optimization, sometimes called “remipping”. Minecraft does not perform any of this at all (however, it's said to render quads instead of triangles, but it's not like we can check). The problem when doing such a thing is that the game may freeze often, especially when players are digging or building around.

emugod wrote:Dynamic LOD, reducing apparent voxel resolution at distance by grouping nodes together for rendering purposes. Maybe just by rendering blocks as nodes (in which case it could be part of viewtopic.php?f=7&t=9648, and probably not actually a great performance boost but maybe still nice as a visual effect), or as a more complex form with lesser groupings (reduce each block first to eight and then four rendered nodes, before finally just one)..


We've had farmesh a few years ago and it was removed because it was outdated and sometimes inaccurate, especially when terrain was heavily changed by players. Freeminer (a fork of Minetest) reimplemented it in a different way.
 

thetoon
Member
 
Posts: 106
Joined: Tue Dec 11, 2012 12:55

Re: performance ideas

by thetoon » Thu Jul 10, 2014 09:06

Calinou wrote:This is not tesselation; this is just generic optimization, sometimes called “remipping”. Minecraft does not perform any of this at all (however, it's said to render quads instead of triangles, but it's not like we can check). The problem when doing such a thing is that the game may freeze often, especially when players are digging or building around.


A solution might be to offer boths paths : as long as a freshly loaded/generated block is un-modified, we "remip" (if that's how it's called). As soon as digging occurs on the block, we switch back to previous rendering method.

That way, the kind of players I like to call "explorers" - who would never hurt a node (some call them over-sensitive node-lovers) would experiment great performances, while keeping things as is (more or less) for the normal players.

Maybe we could even switch back to "remipping"-mode after a while without modifications.

We've had farmesh a few years ago and it was removed because it was outdated and sometimes inaccurate, especially when terrain was heavily changed by players. Freeminer (a fork of Minetest) reimplemented it in a different way.


I did play with farmesh some time ago, mostly trying to get a more "cubic" apparence out of it. Didn't work out well.

Still, the LOD thing makes sense : we have a relatively-highly structured world. It's not the worst situation for implementing variable level of detail. At least if we had a way to render-and-store its six orthogonal overviews with every block - let's say on a 1-pixel-per-node scale - we'd solve most of the "overview map" issues, while providing solid ground (pun intended) for flying games that don't suck by hiding all ground when a few blocks high.

Additionnally, I'd like to mention I'm fond of this thread objective, and I do wish some of these ideas (and others) could be experimented in one way or another.
 

emugod
Member
 
Posts: 33
Joined: Tue Aug 13, 2013 19:49

Re: performance ideas

by emugod » Sat Jul 12, 2014 00:08

sfan5 wrote:
emugod wrote:Predictive block loading/generation for caves.

So you want the mapgen running on the client?
That won't work for Lua mapgens anyway, or for servers with mods that affect generation.

I didn't bother to expand much on that one because I figured there would be an immediate reply "it already does". I don't know how it would be implemented, but something to know when a player is in a cave and not bother generating nearby full-solid (rock/dirt/ore) blocks until they're very close to needed. the same idea could apply to all-air or all-water blocks? I really suspect something like it is probably in fact already in, and i'm just ignorant of it?
Calinou wrote:This is not tesselation; this is just generic optimization, sometimes called “remipping”. Minecraft does not perform any of this at all (however, it's said to render quads instead of triangles, but it's not like we can check). The problem when doing such a thing is that the game may freeze often, especially when players are digging or building around.

Minecraft has or had as its primary node (block in MC terminology) rendering interface an object 'tessellator', which unless I am greatly mistaken did do (does?) some face combination. I remember being intrigued by some mojang blog posts and update notes about it, way way back (well before 1.0), which might still be around somewhere, even if that part of the code has been abandoned. Also just so you know, MC source is available,through a pretty active and effective continual decompilation and disambiguation effort. It's not free and neither supported or even officially recognized by Mojang, but it's clearly pretty completely tolerated (it's where all the mods that have made minecraft anything at all, and which Mojang often lifts directly for their updates, have come from).
I am likewise doubtful/uncertain it would provide any real performance benefit though, especially with how the quickly nodes may be changing. Perhaps it could be applied at medium distance only (for blocks with no players in them)? I gotta admit I'm also thinking of my Node Subdivision and 'statues' concept when suggesting this (post on engine dev board), where it would fit perfectly and probably be actually pretty requisite.

Calinou wrote:We've had farmesh a few years ago and it was removed because it was outdated and sometimes inaccurate, especially when terrain was heavily changed by players. Freeminer (a fork of Minetest) reimplemented it in a different way.

Ah, thanks for sharing, I never new about that. Those shots look pretty impressive, if not my exact preference in visual style (which would be to keep the cubic look).

Oh, and I just realized a huge thing that could be done (maybe the #1 thing to look at, performance-wise); always ensure blocks are rendered/generated closest to player first. Is there any good reason this isn't the case to begin with? I could understand it might be complex in servers with many players, all exploring and generating new terrain, but that's really a pretty marginal case, right?
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 9 guests