Increasing rendering speed dramatically ?

For people working on the C++ code.
User avatar
LMD
Member
 
Posts: 40
Joined: Sat Apr 08, 2017 08:16
In-game: Limo

Increasing rendering speed dramatically ?

by LMD » Wed Nov 15, 2017 20:16

I don't know how VBO generation is done in minetest, but may it be that every cube is made out of the seen faces(faces towards the player) that are not hidden by other cubes ? So now I'm asking myself : Could we increase rendering speed if we would be merging, for example a surface of 10x10 cubes into one big 10x10 plane, instead of 100 1x1 planes. That could increase rendering speed dramatically, as well as this may also be done using the geometry shader. Of course texture/UV coords will have to change then also, but for that I already have an idea :
- a standard minetest texture is 16x16
- every graphic card supports at least 1024x1024 textures
- 1024/16 = 64, what means we could display a 64x64 plane with just 2 triangles !

EDIT : As sfan5 mentioned, Minetest seems already merge chunks vertically. But maybe that could be increased, and also horizontal merging can be added ? Also, bigger (64x64) planes then the actual 16x16 planes created when 16x16 textures are used.

So, I'd like to know your opinions, as well as how we may realize this. I'm very familiar with OpenGL and C99, but not that familiar with Minetest and Irrlicht. So I would have to obtain help by this great community. Thans for reading ! Please leave a reply.
Last edited by LMD on Thu Nov 16, 2017 14:51, edited 1 time in total.
 

User avatar
sfan5
Moderator
 
Posts: 3712
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

Re: Increasing rendering speed dramatically ?

by sfan5 » Thu Nov 16, 2017 09:17

If you enable wireframe mode you can see that Minetest already merges identical faces into planes to some degree.
It only seems to do this horizontally and it's also bound by the size of one MapBlock (16x16x16) since those are turned into meshes separately.
Image
Attachments
screenshot_20171116_101334.png
(618.56 KiB) Not downloaded yet
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)
 

slemon
Member
 
Posts: 88
Joined: Sun Apr 27, 2014 03:56

Re: Increasing rendering speed dramatically ?

by slemon » Tue Nov 28, 2017 22:07

Last time I checked, minetest didn't merge surfaces with different textures. Is there a reason behind this?
 

User avatar
LMD
Member
 
Posts: 40
Joined: Sat Apr 08, 2017 08:16
In-game: Limo

Re: Increasing rendering speed dramatically ?

by LMD » Wed Nov 29, 2017 14:34

I can't see a reason for that, excepting that it would make texture uploading harder.
 

User avatar
v-rob
Member
 
Posts: 349
Joined: Thu Mar 24, 2016 03:19

Re: Increasing rendering speed dramatically ?

by v-rob » Thu Nov 30, 2017 01:13

slemon wrote:Last time I checked, minetest didn't merge surfaces with different textures. Is there a reason behind this?


Probably because the merged surface is one full plane, so only one texture can be used on that plane, but the texture can be tiled. Don't quote me on this, because I'm not certain that this is true.
 

User avatar
Vapalus
Member
 
Posts: 38
Joined: Wed Nov 15, 2017 17:16

Re: Increasing rendering speed dramatically ?

by Vapalus » Thu Nov 30, 2017 10:25

The reason is it being faster and easier for the GFX card to NOT make one very big texture, but to stick with the small textures.
A man much wiser than me once said: "go away, you are bothering me"
 


Return to Partly official engine development



Who is online

Users browsing this forum: No registered users and 1 guest