Trying to implement Shadow Mapping

For people working on the C++ code.
User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: Trying to implement Shadow Mapping

by Andrey01 » Post

Extex wrote:
Tue Jun 08, 2021 22:41
firefox wrote:
Tue Jun 08, 2021 11:48
i think those water shadows are very interesting. i haven't seen any of this in-game yet, but are they animated just like the flowing water is? if yes, this could be very nice for creating a mysterious ambience in buildings.
It seems to be intentional that water doesn't cast a shadow but I think the fact that flowing water does cast a shadow, is a bug
This is not a bug. This is named "colored shadows" feature. However, with the flowing water it looks like pretty weird and I don't know at all whether there is a such phenomen in the nature as "colored shadows" casted by translucent objects in real?

User avatar
freshreplicant
Member
Posts: 224
Joined: Sun Aug 09, 2020 10:37
In-game: freshreplicant

Re: Trying to implement Shadow Mapping

by freshreplicant » Post

Andrey01 wrote:
Wed Jun 09, 2021 08:32
I don't know at all whether there is a such phenomen in the nature as "colored shadows" casted by translucent objects in real?
There certainly is, stained glass windows in churches (or secular buildings) are a very good examples of this phenomena.

Searching for 'stained glass shadows' will give you plenty of examples.

User avatar
Extex
Member
Posts: 244
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

Re: Trying to implement Shadow Mapping

by Extex » Post

Andrey01 wrote: This is not a bug. This is named "colored shadows" feature. However, with the flowing water it looks like pretty weird and I don't know at all whether there is a such phenomen in the nature as "colored shadows" casted by translucent objects in real?
Yes coloured shadows are real.

What I meant to say was, the fact that flowing water casts coloured shadows and water sources don't is a bug
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Trying to implement Shadow Mapping

by PolySaken » Post

Are there plans to make light sources affect the shadow map?
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

Liso
Member
Posts: 33
Joined: Thu Feb 06, 2020 10:21
GitHub: 0xLiso
In-game: Liso
Location: Valencia - Spain.
Contact:

Re: Trying to implement Shadow Mapping

by Liso » Post

Hi all!,
The "colored shadows" is actually a light propagation through colored translucent objects and obviously it's not realistic just an approximation.
You are right it must not be cast by water but right now we don't have a way to avoid this. And btw most of MC shaders that implement that also have "blue shadow" through water.

And about the glitches on "colored shadow" through animated sprites they seem to be a filtering issue. I'll take a look on that.

PolySaken wrote:
Wed Jun 09, 2021 21:31
Are there plans to make light sources affect the shadow map?
Light sources already affect shadows, but not enough I think.
There is a reported issue in github about that.
Liso. - My twitter -

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Trying to implement Shadow Mapping

by PolySaken » Post

Let me clarify: will light sources ever cause objects to cast shadows?I get that they override shadows cast by the sun, but they don't cause shadows to form.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

Liso
Member
Posts: 33
Joined: Thu Feb 06, 2020 10:21
GitHub: 0xLiso
In-game: Liso
Location: Valencia - Spain.
Contact:

Re: Trying to implement Shadow Mapping

by Liso » Post

PolySaken wrote:
Thu Jun 10, 2021 07:41
Let me clarify: will light sources ever cause objects to cast shadows?I get that they override shadows cast by the sun, but they don't cause shadows to form.
Aps, ok. I got you now.

There is no short term plans to implement that. Mostly because, in order to do it, we need to make a shadow map (at least) pass for every light. And that is completely unfeasible with the current status of the engine.

Sorry.

Anyway, I'll keep your suggestion in mind for future improvements.
Liso. - My twitter -

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: Trying to implement Shadow Mapping

by PolySaken » Post

Ok, thanks.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: Trying to implement Shadow Mapping

by Gael de Sailly » Post

I can't believe you got that merged. Judging from the screenshots I've seen, it looks amazing. Thanks to anyone who made this possible!
I can't wait before trying it, but I have no access to a computer for the moment.
Just realize how bored we would be if the world was perfect.

User avatar
freshreplicant
Member
Posts: 224
Joined: Sun Aug 09, 2020 10:37
In-game: freshreplicant

Re: Trying to implement Shadow Mapping

by freshreplicant » Post

Gael de Sailly wrote:
Sun Jun 13, 2021 15:56
I can't believe you got that merged. Judging from the screenshots I've seen, it looks amazing. Thanks to anyone who made this possible!
I can't wait before trying it, but I have no access to a computer for the moment.
It really is amazing. I know there's people picking out minor issue here and there and it may be polished slightly in future, but from the screenshots it makes such a big difference. Stuff like this that would bring me over to the 'engine over game' side. The best thing about it is - if you don't like it, or can't run it on your device...it's still totally optional. It gives more choice, freedom and power to experiment and create. You can see that from the screenshot thread.

I almost think it would warrant a point release, maybe 5.4.2 to let more people experience it without compiling it themselves. It doesn't seem like it would break anything for those playing Minetest without shadows.

As other people have been saying...it'd be great is water shaders were next (or...you know...coloured light 😂).

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

Re: Trying to implement Shadow Mapping

by rubenwardy » Post

freshreplicant wrote:
Sun Jun 13, 2021 18:05
I almost think it would warrant a point release, maybe 5.4.2 to let more people experience it without compiling it themselves. It doesn't seem like it would break anything for those playing Minetest without shadows.
Point releases must only contain bug fixes. Dynamic shadows aren't a bug fix :P
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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: Trying to implement Shadow Mapping

by v-rob » Post

rubenwardy wrote:
Sun Jun 13, 2021 18:19
Point releases must only contain bug fixes. Dynamic shadows aren't a bug fix :P
(Shhh... it's a bugfix helping the common bug commonly known as "Minetest is ugly" :D)
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

User avatar
StarNinjas
Member
Posts: 411
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca
Contact:

Re: Trying to implement Shadow Mapping

by StarNinjas » Post

Amazing! Thank you Liso! I really love the player/mob shadows, and really love how dropped items feel more like an actual thing in the world, since they're affected by shadows!
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/

User avatar
Walker
Member
Posts: 1811
Joined: Tue Oct 03, 2017 09:22
In-game: Walker
Contact:

Re: Trying to implement Shadow Mapping

by Walker » Post

can cloud shadows be added ?

I love it when such HUGE shadows wander over the earth, when the clouds move overhead ^^

User avatar
StarNinjas
Member
Posts: 411
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca
Contact:

Re: Trying to implement Shadow Mapping

by StarNinjas » Post

I think Cloud shadows would be cool. Also maybe make particles affected by shadows? And also non-natural light to make shadows to. I use medium quality by the way, so I don't know if some of these things have already been added.
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/

User avatar
Walker
Member
Posts: 1811
Joined: Tue Oct 03, 2017 09:22
In-game: Walker
Contact:

Re: Trying to implement Shadow Mapping

by Walker » Post

StarNinjas wrote:
Thu Jun 17, 2021 20:43
[...] And also non-natural light to make shadows to. [...]
you mean fireflies or torches?

HELL YEAH !

qawsedrftgzh
Member
Posts: 32
Joined: Sat Jul 25, 2020 08:36
GitHub: qawsedrftgzh
Location: Germany

Re: Trying to implement Shadow Mapping

by qawsedrftgzh » Post

I get this error:

Code: Select all

-- *** Will build version 5.5.0-dev ***
-- Looking for IRRLICHT_VERSION_MT
-- Looking for IRRLICHT_VERSION_MT - not found
CMake Error at CMakeLists.txt:94 (message):
  Irrlicht found, but it is not IrrlichtMt (Minetest's Irrlicht fork).  The
  Minetest team has forked Irrlicht to make their own customizations.  It can
  be found here: https://github.com/minetest/irrlicht

  Building the client with upstream Irrlicht is no longer possible.


-- Configuring incomplete, errors occurred!
See also "/home/***/Downloads/minetest-shadowmap-CSM/CMakeFiles/CMakeOutput.log".
See also "/home/***/Downloads/minetest-shadowmap-CSM/CMakeFiles/CMakeError.log".
make: *** Es wurden keine Ziele angegeben und keine „make“-Steuerdatei gefunden.  Schluss.
I have built MinetestMt as told in the README, also with

Code: Select all

make install
what am I doing wrong?
My English is not so good, because I am german

User avatar
Onyx
Member
Posts: 132
Joined: Fri Sep 25, 2015 08:36
In-game: Onyx
Location: On your planet

Re: Trying to implement Shadow Mapping

by Onyx » Post

Hi,
Maybe here ?
"One chunk, two chunks, three chunks..."

User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: Trying to implement Shadow Mapping

by Andrey01 » Post

qawsedrftgzh wrote:
Wed Aug 04, 2021 16:46
I get this error:

Code: Select all

-- *** Will build version 5.5.0-dev ***
-- Looking for IRRLICHT_VERSION_MT
-- Looking for IRRLICHT_VERSION_MT - not found
CMake Error at CMakeLists.txt:94 (message):
  Irrlicht found, but it is not IrrlichtMt (Minetest's Irrlicht fork).  The
  Minetest team has forked Irrlicht to make their own customizations.  It can
  be found here: https://github.com/minetest/irrlicht

  Building the client with upstream Irrlicht is no longer possible.


-- Configuring incomplete, errors occurred!
See also "/home/***/Downloads/minetest-shadowmap-CSM/CMakeFiles/CMakeOutput.log".
See also "/home/***/Downloads/minetest-shadowmap-CSM/CMakeFiles/CMakeError.log".
make: *** Es wurden keine Ziele angegeben und keine „make“-Steuerdatei gefunden.  Schluss.
I have built MinetestMt as told in the README, also with

Code: Select all

make install
what am I doing wrong?
There were changes in the compilation process, so since I follow these steps:

Code: Select all

$ git clone https://github.com/minetest/minetest.git
$ cd ./minetest/lib
$ git clone https://github.com/minetest/irrlicht.git irrlichtmt
$ cd ..
$ cmake . -DRUN_IN_PLACE=1
$ make -j$(nproc)
Did you do the same?

User avatar
ywwv
Member
Posts: 299
Joined: Mon Jan 18, 2021 11:51

Re: Trying to implement Shadow Mapping

by ywwv » Post

hi liso . I can tell that you are the architect around this place. and the people like your vision. but you are held back by bearucrats on the git hub kind of like in the ayn rand book. I am also working on a "jewel" of mine test graphics like this . it is a spherical harmonics lighting shader that will be applied to all entities. but I wanted to run it by a graphics minetest expert first . not because i dont know how. but I can tell that you are laying down the germ of the coding engine that will flower into its new maturity . so I didn't want to under mine that . I am reaching out in this thread to discuss how this will interact with your plans for self shadowing and also ray tracing bounces (like minecraft RTX) .

Liso
Member
Posts: 33
Joined: Thu Feb 06, 2020 10:21
GitHub: 0xLiso
In-game: Liso
Location: Valencia - Spain.
Contact:

Re: Trying to implement Shadow Mapping

by Liso » Post

ywwv wrote:
Fri Aug 20, 2021 11:08
hi liso . I can tell that you are the architect around this place. and the people like your vision. but you are held back by bearucrats on the git hub kind of like in the ayn rand book. I am also working on a "jewel" of mine test graphics like this . it is a spherical harmonics lighting shader that will be applied to all entities. but I wanted to run it by a graphics minetest expert first . not because i dont know how. but I can tell that you are laying down the germ of the coding engine that will flower into its new maturity . so I didn't want to under mine that . I am reaching out in this thread to discuss how this will interact with your plans for self shadowing and also ray tracing bounces (like minecraft RTX) .
Thank you for your words. I sent you a priv msg.
Liso. - My twitter -

x2048
Developer
Posts: 68
Joined: Mon Feb 15, 2021 22:41
GitHub: x2048

Re: Trying to implement Shadow Mapping

by x2048 » Post

There has been silence in this thread, but the work on shadows in Minetest is going on.

I've been closing the outstanding bugs and improving the quality during the fall. Among other things there's ongoing work on shading entities and light-space PSM. The latter looks promising, an intermediate result can be seen on screenshot: Image

Happy New Year :)

User avatar
StarNinjas
Member
Posts: 411
Joined: Wed Mar 14, 2018 00:32
GitHub: starninjas
IRC: StarNinjas
In-game: J1
Location: Terrarca
Contact:

Re: Trying to implement Shadow Mapping

by StarNinjas » Post

Beautiful! Is there a dev download for Windows 10 of this?
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/

User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: Trying to implement Shadow Mapping

by Andrey01 » Post

StarNinjas wrote:
Sat Feb 05, 2022 22:16
Beautiful! Is there a dev download for Windows 10 of this?
You can download it on any platform which Minetest supports and then compile it the Windows` mingw compiler.

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

Re: Trying to implement Shadow Mapping

by Blockhead » Post

Andrey01 wrote:
Wed Feb 16, 2022 10:45
StarNinjas wrote:
Sat Feb 05, 2022 22:16
Beautiful! Is there a dev download for Windows 10 of this?
You can download it on any platform which Minetest supports and then compile it the Windows` mingw compiler.
It would have been more helpful to just say no, because he's asking for a binary version, than to give bad advice about compiling Minetest in Windows. You need Visual Studio to compile under Windows. Yes, this sucks. But compiling on Windows either sucks because you have to use Visual Studio or because you try to use MinGW which is an even worse compiler. Sources: Personal experience of having actually compiled Minetest under Windows, the README for Minetest which tells you to compile with VS, and having developed small C programs with MinGW only to realise its ancient code which has got basically no features or support in comparison to MSVC.

StarNinjas: You'll have to compile from source if you want to try it. You can follow some advice I recently posted about fetching another remote, but apply it to the branches in the PRs given above. After that, follow the advice in Minetest's README about how to compile for Windows. You'll need Visual Studio which is gigabytes and gigabytes in size, but seriously, there's no other option. Good luck!
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests