[closed] Using OpenCL in Minetest client and/or server

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

[closed] Using OpenCL in Minetest client and/or server

by Hybrid Dog » Fri May 09, 2014 17:58

Split from this topic

Calinou wrote:This is likely possible, but demanding on the hardware and not easy to implement.

Improving graphics is easier done by enabling anti-aliasing, add this line in minetest.conf:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
fsaa = 4
In my opinion fsaa (fast sample antialiasing) reduces the graphics quality. Sometimes I use fxaa (fast approximate antialiasing), which smooths the corners only if they are diagonal.




Please add a setting to allow minetest to use OpenCl.




davidforsure!!! wrote:So i saw a mod called SHADOWS that adds nice shadow in the game. its just like shaders but more unrealistic but its works fine.....

thanks. (I suppose you mean my simple and slow shadows mod.)
I need to change it that it works faster. The current version is just the first one which works. I may use voxelmanipulation to change the light at the specific positions instead of adding dark nodes there...
Last edited by Hybrid Dog on Mon Dec 29, 2014 15:07, edited 1 time in total.
 

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

Re: Is shaders will be implemented

by sfan5 » Fri May 09, 2014 18:32

Hybrid Dog wrote:Please add a setting to allow minetest to use OpenCL.

What benefits do you promise yourself from Minetest being able to use OpenCL?
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Is shaders will be implemented

by Hybrid Dog » Fri May 09, 2014 18:58

sfan5 wrote:
Hybrid Dog wrote:Please add a setting to allow minetest to use OpenCL.

What benefits do you promise yourself from Minetest being able to use OpenCL?

I thought the graphics card could be used for servers when the admin is afk to increase the maximum server performance instead of keeping the graphics card away from work if this setting is enabled.
 

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

Re: Is shaders will be implemented

by sfan5 » Fri May 09, 2014 19:16

Hybrid Dog wrote:
sfan5 wrote:
Hybrid Dog wrote:Please add a setting to allow minetest to use OpenCL.

What benefits do you promise yourself from Minetest being able to use OpenCL?

I thought the graphics card could be used for servers when the admin is afk to increase the maximum server performance instead of keeping the graphics card away from work if this setting is enabled.

OpenCL is mainly useful for ongoining heavy calculations.
I don't think usage of OpenCL will be able to make e.g. lightning calculations faster.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Is shaders will be implemented

by Hybrid Dog » Fri May 09, 2014 19:22

sfan5 wrote:
Hybrid Dog wrote:
sfan5 wrote:What benefits do you promise yourself from Minetest being able to use OpenCL?

I thought the graphics card could be used for servers when the admin is afk to increase the maximum server performance instead of keeping the graphics card away from work if this setting is enabled.

OpenCL is mainly useful for ongoining heavy calculations.
I don't think usage of OpenCL will be able to make e.g. lightning calculations faster.

You haven't tried it yet.
http://www.luxrender.net/wiki/GPU
 

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

Re: Is shaders will be implemented

by Calinou » Fri May 09, 2014 19:26

Graphic cards excel in highly parallel uses. Are there any in Minetest client or server?
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

Re: Using OpenCL in Minetest client and/or server

by PilzAdam » Fri May 09, 2014 19:40

Most of the big servers are dedicated servers without a graphics card.
 

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

Re: Is shaders will be implemented

by sfan5 » Fri May 09, 2014 19:57

Hybrid Dog wrote:
sfan5 wrote:
Hybrid Dog wrote:I thought the graphics card could be used for servers when the admin is afk to increase the maximum server performance instead of keeping the graphics card away from work if this setting is enabled.

OpenCL is mainly useful for ongoining heavy calculations.
I don't think usage of OpenCL will be able to make e.g. lightning calculations faster.

You haven't tried it yet.
http://www.luxrender.net/wiki/GPU

LuxRender tries to render a realistic light environment, this is used for e.g. rendering a Blender scene.
Minetests lightning code however is very simple and won't benefit from utilizing OpenCL.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Is shaders will be implemented

by Hybrid Dog » Fri May 09, 2014 20:07

sfan5 wrote:LuxRender tries to render a realistic light environment, this is used for e.g. rendering a Blender scene.
Minetests lightning code however is very simple and won't benefit from utilizing OpenCL.

I think a different lighting method could be added which can be en- and disabled via another setting.
 

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

Re: Is shaders will be implemented

by sfan5 » Fri May 09, 2014 20:21

Hybrid Dog wrote:
sfan5 wrote:LuxRender tries to render a realistic light environment, this is used for e.g. rendering a Blender scene.
Minetests lightning code however is very simple and won't benefit from utilizing OpenCL.

I think a different lighting method could be added which can be en- and disabled via another setting.

You are aware that LuxRender is for rendering scenes and not just lightning alone?
Rendering the scene on the server would be 342.61% inefficent.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Is shaders will be implemented

by Hybrid Dog » Fri May 09, 2014 20:38

sfan5 wrote:
Hybrid Dog wrote:
sfan5 wrote:LuxRender tries to render a realistic light environment, this is used for e.g. rendering a Blender scene.
Minetests lightning code however is very simple and won't benefit from utilizing OpenCL.

I think a different lighting method could be added which can be en- and disabled via another setting.

You are aware that LuxRender is for rendering scenes and not just lightning alone?
Rendering the scene on the server would be 342.61% inefficent.

I don't mean the LuxRender, which is just an example for the use of OpenCL google showed me, I mean shadows and reflections viewtopic.php?f=5&t=9251 .
 

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

Re: Is shaders will be implemented

by sfan5 » Fri May 09, 2014 21:04

Hybrid Dog wrote:
sfan5 wrote:
Hybrid Dog wrote:I think a different lighting method could be added which can be en- and disabled via another setting.

You are aware that LuxRender is for rendering scenes and not just lightning alone?
Rendering the scene on the server would be 342.61% inefficent.

I don't mean the LuxRender, which is just an example for the use of OpenCL google showed me, I mean shadows and reflections viewtopic.php?f=5&t=9251 .

GLSL is better suited for shadows because it has, unlike OpenCL, direct access to all graphical features.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Is shaders will be implemented

by Hybrid Dog » Sat May 10, 2014 08:29

sfan5 wrote:GLSL is better suited for shadows because it has, unlike OpenCL, direct access to all graphical features.

ok
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Using OpenCL in Minetest client and/or server

by Hybrid Dog » Sat May 24, 2014 12:09

What about using OpenCL for chunkloading?
 

cheapie
Member
 
Posts: 304
Joined: Mon May 14, 2012 00:59
GitHub: cheapie
IRC: cheapie
In-game: cheapie

Re: Using OpenCL in Minetest client and/or server

by cheapie » Sat May 24, 2014 12:39

Look here, specifically at the top and bottom graphs. That's VanessaE's server machine, running seven instances of minetestserver. The top graph is CPU usage (400% is full load, as it's a dual-core "4-thread") and the bottom is the number of players online.

As you can see, it rarely goes above half CPU usage except for the occasional spike (and nightly backup) even with 10-20 players. I have also witnessed over 20 players on one (lightly-modded) server with very minimal lag.

This server has no GPU installed (using integrated) so OpenCL would actually be slower than using the CPU on this box. The only thing I could possibly see it being useful for on any machine would be if there was a command to generate large portions of the map at once.
Last edited by cheapie on Sat May 24, 2014 16:13, edited 1 time in total.
 

User avatar
aldobr
Member
 
Posts: 316
Joined: Sun Nov 25, 2012 05:46

Re: Using OpenCL in Minetest client and/or server

by aldobr » Sat May 24, 2014 13:25

maybe opencl terrain generation ?

does it makes sense ?

looks preeeetty fast :

http://www.youtube.com/watch?v=-NryquDyQlc
 

User avatar
aldobr
Member
 
Posts: 316
Joined: Sun Nov 25, 2012 05:46

Re: Using OpenCL in Minetest client and/or server

by aldobr » Sat May 24, 2014 13:44

GLSL simplex noise generator :

https://github.com/ashima/webgl-noise
 

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

Re: Using OpenCL in Minetest client and/or server

by sfan5 » Sat May 24, 2014 15:37

Hybrid Dog wrote:What about using OpenCL for chunkloading?

What do you promise yourself of doing that?
And what part of chunk loading would you do in OpenCL?
Disk I/O is not something you can do with OpenCL.
aldobr wrote:GLSL simplex noise generator :

https://github.com/ashima/webgl-noise

OpenGL != OpenCL
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Using OpenCL in Minetest client and/or server

by Hybrid Dog » Sat May 24, 2014 18:03

sfan5 wrote:
Hybrid Dog wrote:What about using OpenCL for chunkloading?

What do you promise yourself of doing that?
And what part of chunk loading would you do in OpenCL?
Disk I/O is not something you can do with OpenCL.

I think it could improve the chunkloading speed for the player who needs to wait until the fps count rises up again.
I noticed that you need a fast processor to reduce the chunkloading fps drop instead of a good graphics card.


cheapie wrote:Look here, specifically at the top and bottom graphs. That's VanessaE's server machine, running seven instances of minetestserver. The top graph is CPU usage (400% is full load, as it's a dual-core "4-thread") and the bottom is the number of players online.

As you can see, it rarely goes above half CPU usage except for the occasional spike (and nightly backup) even with 10-20 players. I have also witnessed over 20 players on one (lightly-modded) server with very minimal lag.

This server has no GPU installed (using integrated) so OpenCL would actually be slower than using the CPU on this box. The only thing I could possibly see it being useful for on any machine would be if there was a command to generate large portions of the map at once.
of course a setting to enable/disable it should be added
 

User avatar
aldobr
Member
 
Posts: 316
Joined: Sun Nov 25, 2012 05:46

Re: Using OpenCL in Minetest client and/or server

by aldobr » Sat May 24, 2014 18:43

OpenGL != OpenCL


Well, regardless of language/framework used, the basic idea of the thread is to offload calculations from the CPU to the GPU, and I just wanted to show that some tasks CAN be offloaded, like chunk generation.

the example in the video shows how ridiculously fast chunk generation becomes when offloaded to the GPU.
 

User avatar
webdesigner97
Member
 
Posts: 1307
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97

Re: Using OpenCL in Minetest client and/or server

by webdesigner97 » Sat May 24, 2014 20:18

Hybrid Dog wrote:
sfan5 wrote:
Hybrid Dog wrote:What about using OpenCL for chunkloading?

What do you promise yourself of doing that?
And what part of chunk loading would you do in OpenCL?
Disk I/O is not something you can do with OpenCL.

I think it could improve the chunkloading speed for the player who needs to wait until the fps count rises up again.
I noticed that you need a fast processor to reduce the chunkloading fps drop instead of a good graphics card.


cheapie wrote:Look here, specifically at the top and bottom graphs. That's VanessaE's server machine, running seven instances of minetestserver. The top graph is CPU usage (400% is full load, as it's a dual-core "4-thread") and the bottom is the number of players online.

As you can see, it rarely goes above half CPU usage except for the occasional spike (and nightly backup) even with 10-20 players. I have also witnessed over 20 players on one (lightly-modded) server with very minimal lag.

This server has no GPU installed (using integrated) so OpenCL would actually be slower than using the CPU on this box. The only thing I could possibly see it being useful for on any machine would be if there was a command to generate large portions of the map at once.
of course a setting to enable/disable it should be added

If this would work, then I would be very happy. I have massive framedrops while loading chunks. CPU: AMD FX 4130, GPU XFX Radeon HD 7770...
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 2 guests