Increasing rendering speed dramatically ?

For people working on the C++ code.
Post Reply
User avatar
LMD
Member
Posts: 1386
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Increasing rendering speed dramatically ?

by LMD » Post

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.
My stuff: Projects - Mods - Website

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

Re: Increasing rendering speed dramatically ?

by sfan5 » Post

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
screenshot_20171116_101334.png (618.56 KiB) Viewed 745 times
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

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

Re: Increasing rendering speed dramatically ?

by slemon » Post

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

User avatar
LMD
Member
Posts: 1386
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: Increasing rendering speed dramatically ?

by LMD » Post

I can't see a reason for that, excepting that it would make texture uploading harder.
My stuff: Projects - Mods - Website

User avatar
v-rob
Developer
Posts: 970
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: Increasing rendering speed dramatically ?

by v-rob » Post

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.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

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

Re: Increasing rendering speed dramatically ?

by Vapalus » Post

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"

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: Increasing rendering speed dramatically ?

by Hybrid Dog » Post

You could use the Hilbert curve to quickly detect rectangles rather than lines.
You can also try the Peano curve.
Image
Image

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
LMD
Member
Posts: 1386
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: Increasing rendering speed dramatically ?

by LMD » Post

Thanks
My stuff: Projects - Mods - Website

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: Increasing rendering speed dramatically ?

by Inocudom » Post

When thinking about rendering speed, I want you to consider whether or not Minetest would run on the Nintendo Switch. This might seem like a dumb question right now, but if the computer/internet environment becomes extremely hostile to indie/open-source developers, then that might be your only option left. 2018 will most certainly be a very likely year for that to happen. So, if Minetest could run on the Nintendo Switch, then it is being optimized well enough, but if it can't, then it still has a ways to go. Same goes for GZDoom, Zandronum, Xonotic, Red Eclipse, Voxelands, etc.

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

Re: Increasing rendering speed dramatically ?

by Vapalus » Post

Computer hostile for indie?
Internet hostile for indie?
Go to consoles instead?
What parallel D.C. universe are you talking about?
A man much wiser than me once said: "go away, you are bothering me"

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: Increasing rendering speed dramatically ?

by Inocudom » Post

Well, the Switch (and any device with similar stats) seems like a good way to see how optimized a game is. Oh, and don't forget about the death of net neutrality that happened recently. Even Burger King, it seems, was concerned about the ordeal, so they made a video on YouTube about it. It does a nifty job of explaining the matter to us masses. All that is open source needs net neutrality to survive.

One of the goals of 0.5.0 is to increase the overall performance of Minetest, as this is very critical for its future. Kenny understood this well.

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: Increasing rendering speed dramatically ?

by TumeniNodes » Post

no one is going to port MTG to this platform, same as for PS and Xbox
The work involved is intensive and quite honestly not going to be done free of cost by anyone I know.

Burger King is whacked (have you seen their creepy mascot?)

Even bringing up porting MTG to those platforms seems pointless.

It would take far more then the net neutrality debate to kill the open source community..., maybe the likes of a black hole swallowing up the entire universe would do it but, even that is debatable.
A Wonderful World

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: Increasing rendering speed dramatically ?

by Fixer » Post

Minetest should run even on integrated graphics that goes with chipset/CPUs (at least those Intel Core i3+ and new AMD Ryzen with included Vega graphics), especially new CPUs, any rendering speed increase will be very welcomed, from what I see in Minecraft Bedrock engine with vranges going into 1000..., minetest probably has room for rendering optimisations.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest