How is this guy doing reflective water in Minetest?

Post Reply
User avatar
Neuromancer
Member
Posts: 1014
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

How is this guy doing reflective water in Minetest?

by Neuromancer » Post

How is this guy doing reflective water in Minetest? This looks amazing.
https://youtu.be/6SBKUJioSGk?si=OdOuEDhBtCBmVj2h&t=366

User avatar
rubenwardy
Moderator
Posts: 7032
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: London, United Kingdom
Contact:

Re: How is this guy doing reflective water in Minetest?

by rubenwardy » Post

GreenXenith has worked on Screen Space Reflections, it's available on this branch: https://github.com/GreenXenith/minetest/tree/bfs_ssr
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

Astrobe
Member
Posts: 650
Joined: Sun Apr 01, 2018 10:46

Re: How is this guy doing reflective water in Minetest?

by Astrobe » Post

No ripples, how disappointing ;-)
My game? It's Minefall.

User avatar
rubenwardy
Moderator
Posts: 7032
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: London, United Kingdom
Contact:

Re: How is this guy doing reflective water in Minetest?

by rubenwardy » Post

Astrobe wrote:
Fri Oct 20, 2023 12:53
No ripples, how disappointing ;-)
GreenXenith has shared videos with ripples, perhaps it's off by default
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Neuromancer
Member
Posts: 1014
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

Re: How is this guy doing reflective water in Minetest?

by Neuromancer » Post

Any plans to add this reflective water to an upcoming version of the official Minetest release?

User avatar
Horka
Member
Posts: 187
Joined: Sat Aug 13, 2022 17:38
In-game: Horka

Re: How is this guy doing reflective water in Minetest?

by Horka » Post

Can someone make a bundle?
Sorry for my bad english...

User avatar
GreenXenith
Member
Posts: 1357
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: How is this guy doing reflective water in Minetest?

by GreenXenith » Post

rubenwardy wrote:
Fri Oct 20, 2023 13:03
Astrobe wrote:
Fri Oct 20, 2023 12:53
No ripples, how disappointing ;-)
GreenXenith has shared videos with ripples, perhaps it's off by default
The video shows ripples... (no settings implemented, everything on by default)
Neuromancer wrote:
Fri Oct 20, 2023 16:06
Any plans to add this reflective water to an upcoming version of the official Minetest release?
Extremely WIP. I have to add a minimal material system before I even think about merging this. And fix some bugs. 5.9.0, at the very earliest.
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

User avatar
Tuxilio
Member
Posts: 143
Joined: Mon Nov 28, 2022 12:18
In-game: gamer777 tuxilio
Contact:

Re: How is this guy doing reflective water in Minetest?

by Tuxilio » Post

Maybe it's an idea to write a shader API and then be able to put shaders on ContentDB similar to mods.
So this would be very easy to solve, even for new players :)
See: Shader

User avatar
Tuxilio
Member
Posts: 143
Joined: Mon Nov 28, 2022 12:18
In-game: gamer777 tuxilio
Contact:

Need help buolding - How is this guy doing reflective water in Minetest?

by Tuxilio » Post

How to build this? I got errors:

Code: Select all

/home/tux/minetest-bfs_ssr/src/client/clientmap.cpp: In instantiation of ‘ClientMap::renderMap(irr::video::IVideoDriver*, irr::s32)::<lambda(auto:2&)> [with auto:2 = irr::video::SMaterialLayer]’:
/home/tux/minetest-bfs_ssr/lib/irrlichtmt/include/SMaterial.h:443:7:   required from ‘void irr::video::SMaterial::forEachTexture(F&&) [with F = ClientMap::renderMap(irr::video::IVideoDriver*, irr::s32)::<lambda(auto:2&)>]’
/home/tux/minetest-bfs_ssr/src/client/clientmap.cpp:845:27:   required from here
/home/tux/minetest-bfs_ssr/src/client/clientmap.cpp:846:37: error: ‘class irr::video::SMaterialLayer’ has no member named ‘setFiltersMinetest’
  846 |                                 tex.setFiltersMinetest(m_cache_bilinear_filter, m_cache_trilinear_filter,
      |                                 ~~~~^~~~~~~~~~~~~~~~~~
make[2]: *** [src/CMakeFiles/minetest.dir/build.make:146: src/CMakeFiles/minetest.dir/client/clientmap.cpp.o] Fehler 1
make[2]: *** Es wird auf noch nicht beendete Prozesse gewartet....
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp: In instantiation of ‘GenericCAO::updateTextures(std::string)::<lambda(auto:6&)> [with auto:6 = irr::video::SMaterialLayer]’:
/home/tux/minetest-bfs_ssr/lib/irrlichtmt/include/SMaterial.h:443:7:   required from ‘void irr::video::SMaterial::forEachTexture(F&&) [with F = GenericCAO::updateTextures(std::string)::<lambda(auto:6&)>]’
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp:1357:27:   required from here
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp:1358:37: error: ‘class irr::video::SMaterialLayer’ has no member named ‘setFiltersMinetest’
 1358 |                                 tex.setFiltersMinetest(use_bilinear_filter, use_trilinear_filter,
      |                                 ~~~~^~~~~~~~~~~~~~~~~~
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp: In instantiation of ‘GenericCAO::updateTextures(std::string)::<lambda(auto:7&)> [with auto:7 = irr::video::SMaterialLayer]’:
/home/tux/minetest-bfs_ssr/lib/irrlichtmt/include/SMaterial.h:443:7:   required from ‘void irr::video::SMaterial::forEachTexture(F&&) [with F = GenericCAO::updateTextures(std::string)::<lambda(auto:7&)>]’
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp:1393:28:   required from here
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp:1394:45: error: ‘class irr::video::SMaterialLayer’ has no member named ‘setFiltersMinetest’
 1394 |                                         tex.setFiltersMinetest(use_bilinear_filter, use_trilinear_filter,
      |                                         ~~~~^~~~~~~~~~~~~~~~~~
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp: In instantiation of ‘GenericCAO::updateTextures(std::string)::<lambda(auto:8&)> [with auto:8 = irr::video::SMaterialLayer]’:
/home/tux/minetest-bfs_ssr/lib/irrlichtmt/include/SMaterial.h:443:7:   required from ‘void irr::video::SMaterial::forEachTexture(F&&) [with F = GenericCAO::updateTextures(std::string)::<lambda(auto:8&)>]’
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp:1440:28:   required from here
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp:1441:45: error: ‘class irr::video::SMaterialLayer’ has no member named ‘setFiltersMinetest’
 1441 |                                         tex.setFiltersMinetest(use_bilinear_filter, use_trilinear_filter,
      |                                         ~~~~^~~~~~~~~~~~~~~~~~
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp: In instantiation of ‘GenericCAO::updateTextures(std::string)::<lambda(auto:9&)> [with auto:9 = irr::video::SMaterialLayer]’:
/home/tux/minetest-bfs_ssr/lib/irrlichtmt/include/SMaterial.h:443:7:   required from ‘void irr::video::SMaterial::forEachTexture(F&&) [with F = GenericCAO::updateTextures(std::string)::<lambda(auto:9&)>]’
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp:1465:28:   required from here
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp:1466:45: error: ‘class irr::video::SMaterialLayer’ has no member named ‘setFiltersMinetest’
 1466 |                                         tex.setFiltersMinetest(use_bilinear_filter, use_trilinear_filter,
      |                                         ~~~~^~~~~~~~~~~~~~~~~~
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp: In instantiation of ‘GenericCAO::updateTextures(std::string)::<lambda(auto:10&)> [with auto:10 = irr::video::SMaterialLayer]’:
/home/tux/minetest-bfs_ssr/lib/irrlichtmt/include/SMaterial.h:443:7:   required from ‘void irr::video::SMaterial::forEachTexture(F&&) [with F = GenericCAO::updateTextures(std::string)::<lambda(auto:10&)>]’
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp:1494:28:   required from here
/home/tux/minetest-bfs_ssr/src/client/content_cao.cpp:1495:45: error: ‘class irr::video::SMaterialLayer’ has no member named ‘setFiltersMinetest’
 1495 |                                         tex.setFiltersMinetest(use_bilinear_filter, use_trilinear_filter,
      |                                         ~~~~^~~~~~~~~~~~~~~~~~
make[2]: *** [src/CMakeFiles/minetest.dir/build.make:202: src/CMakeFiles/minetest.dir/client/content_cao.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:686: src/CMakeFiles/minetest.dir/all] Fehler 2
make: *** [Makefile:156: all] Fehler 2
Because of the error I tried to build minetest/minetest and it worked :)
The only difference is that I had downloaded minetest-bfs_ssr from GitHub via ZIP, but minetest/minetest via git clone --depth 1. Does that make a difference? I didn't know how to clone branches.

User avatar
Blockhead
Moderator
Posts: 2394
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: Need help buolding - How is this guy doing reflective water in Minetest?

by Blockhead » Post

Tuxilio wrote:
Tue Nov 07, 2023 16:07
How to build this? I got errors:
...
First thing to check is: do you have the right irrlichtmt version? Since this branch is based on 5.8.0-dev, it won't work if you have a 5.7.0-compatible version. Check your irrlicht version against the contents of the file misc/irrlichtmt_tag.txt
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
MirceaKitsune
Member
Posts: 970
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

Re: How is this guy doing reflective water in Minetest?

by MirceaKitsune » Post

Looked at the video and it looks quite promising! Was wondering when this next huge improvement is bound to happen, now that we've been blessed with dynamic shadows at least for the sun / moon. Fingers crossed that all remaining issues can be solved and we'll be seeing this in vanilla soon!

User avatar
Fhelron
Member
Posts: 34
Joined: Fri Feb 09, 2024 07:40
In-game: Fhelron
Contact:

Re: How is this guy doing reflective water in Minetest?

by Fhelron » Post

I hope that in the next few years there will be water reflections either directly in Minetest or as a mod. I keep my fingers crossed for everyone.
Unfortunately, I'm not a programmer, so I have to count on you ;)

User avatar
Blockhead
Moderator
Posts: 2394
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: How is this guy doing reflective water in Minetest?

by Blockhead » Post

Not too bad of work in progress. Would like to see it make it into the game one day when it's ready. It has its flaws so far, such as how it needs a rebase and also this rendering glitch:
ssr-problem1.jpeg
ssr-problem1.jpeg (218.67 KiB) Viewed 2092 times
Please ignore the "dirty", in the version string, that's just me deleting doc/lua_api.txt in my source tree like I always do for tab completion.

I would upload a .deb for Debian/GNU/Linux but at 11 MB it wouldn't fit on the forums anyway.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
Erdbeere
Member
Posts: 98
Joined: Tue Oct 31, 2023 10:45

Re: How is this guy doing reflective water in Minetest?

by Erdbeere » Post

Ah, of course I'm better off here with my question, thanks for the hint Blockhead.

You had given me the hint, at least that's how I understood it, that the server in particular must have set this reflection and other shaders. So it's not enough for the client to have that. Right?

An administrator, however, will be reluctant to stop this if it significantly increases the lag. Is there any experience with this? If it increases the lag, so if it really does, then maybe it would be good if the reflection can be disabled in certain areas of the server or from a certain server load.

User avatar
Blockhead
Moderator
Posts: 2394
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: How is this guy doing reflective water in Minetest?

by Blockhead » Post

Erdbeere wrote:
Wed Apr 24, 2024 09:24
You had given me the hint, at least that's how I understood it, that the server in particular must have set this reflection and other shaders. So it's not enough for the client to have that. Right?
It is sufficient for the client to have it. I can connect with it to a server right now and use it. However, if it made it into the main version, I would expect the same policy as with other graphical settings. The server has control of many client features, such as allowing or disallowing client modding, or allowing dynamic shadows or volumetric lighting. I would expect the server would get control over allowing or disallow reflections as well.

In the existing cases of dynamic shadows and volumetric lighting, there needs to be a flag set on the server side to allow each one. That has to be done in the game code and isn't the default, thus the game needs to be updated, or a mod like Enable shadows or Volumetric lighting needs to be used to enable those features. Don't ask me why the flag defaults to false, but it does.
Erdbeere wrote:
Wed Apr 24, 2024 09:24
An administrator, however, will be reluctant to stop this if it significantly increases the lag. Is there any experience with this? If it increases the lag, so if it really does, then maybe it would be good if the reflection can be disabled in certain areas of the server or from a certain server load.
All calculation is done on the client, the effect to the server is virtually zero. We must remember that "lag" colloquially describes two different phenomena: long return trip times (latency) over the network, and low framerates. As I said, this has virtually no effect on the server, so it won't cause any latency. A mod that does a lot of calculation can slow the response time from the server, such as a server that is busy simulating hundreds of Advtrains; this is not like that at all. As for framerates, yes the reflections can definitely affect those. But it is a player's own fault if they turn their graphics up higher than their hardware can handle.

So in my opinion you would be silly to not enable the (still hypothetical) server setting, unless you have a gameplay reason where it could enable cheating in some way or somebody's view, or a stylistic reason where you insist on lower graphical settings. Still, the established principle is to allow the server to disable features of client graphics, for better or worse.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests