Page 2 of 2

Re: is Shadow mapping desired?

Posted: Sun Nov 15, 2020 03:20
by philipbenr
I took an introduction to computer graphics course, so I can at least try and keep up. I did not know about Irrlicht limitations, but it is not incredibly surprising tbh... I don't know if there have been any reservations made about the other two textures, so if you need to use one, I would go ahead. I have a feeling that if Minetest really wants to do more that would require them, they should be moving to a better engine than Irrlicht anyway.

Anyway, I wish you luck on implementing that, I know this is a well... More dangerous point in terms of engine stability/performance.

Re: is Shadow mapping desired?

Posted: Mon Nov 16, 2020 15:30
by Elektrika
People will be able to create shaders yaaaaay

Re: is Shadow mapping desired?

Posted: Wed Nov 18, 2020 18:56
by Liso
Hi everyone. I just want to share the status with you:

https://www.youtube.com/watch?v=FCdy9e_G1ds


See ya.

Re: is Shadow mapping desired?

Posted: Wed Nov 18, 2020 21:07
by philipbenr
One interesting thing is that shadows do not actually seem to be aligned properly with the sun, which is especially apparent when walking through that archway at the 20 second mark. Is that something you did or is that a product of some anomaly with the light direction that's baked into Minetest (assuming there even is any?)

Regardless, what you have is certainly a good starting point, even if there are things still to be ironed out.

Re: is Shadow mapping desired?

Posted: Wed Nov 18, 2020 21:34
by Liso
Yes, I append a small angle to the light for 2 reasons.

First, as the sun in MT is aligned to Z axis, so the shadows are... too lineal, they don´t add any depth to the scene and the second one, its because blocks are also aligned to axis, so I had to add that angle to avoid the perspective flickering artifact.

And btw, the sun in MT doesn´t have a "position" as is, it has a "hour" from 0 to 23999 ;)

Re: is Shadow mapping desired?

Posted: Wed Nov 18, 2020 22:52
by Lone_Wolf
The set_sky API needs support for sun/moon tilt

Re: is Shadow mapping desired?

Posted: Wed Nov 18, 2020 23:25
by philipbenr
I might be convinced to take a look at that code at some point. I fully expect it to be a hairy mess and I will give up fast, but I'll at least think about taking a look after this semester is over...

Re: is Shadow mapping desired?

Posted: Thu Nov 19, 2020 03:03
by jp
I very much hope the bus factor will not fall down on you. Great work, man.

Are you using the PCF filtering?

Re: is Shadow mapping desired?

Posted: Thu Nov 19, 2020 09:00
by Liso
Thank you all.
I have to start the PR with this. Just to allow ppl to get the code and help.

About PCF, yes. At shader there are implemented a naive hard shadows, PCF up to 16x and VMS. And the video was recorded with PCF at 16x at first subfrusta, 8x second one and 4x for the last one with a 1024 shadow texture
+bug fixed, we now have Shading in the whole world

Re: is Shadow mapping desired?

Posted: Sun Nov 22, 2020 22:17
by Andrey01
WOW!!! After I watched the demo video, I have felt so inspired by this feature! And I wonder it is even still pre-alpha version, I would say this is approaching to the release, huh. The far advanced start! I have noticed an one bug with the shadow mapping on the player model, the shadows look like pretty distorted, especially on his head.

Re: is Shadow mapping desired?

Posted: Mon Nov 23, 2020 00:13
by philipbenr
I should not speak for Liso, but no, this is probably not "near release" yet. There are probably a lot of things to explore first, to find problems and special edge cases first. It would be interesting if the feature would get merged in as a toggleable experimental feature, but the moral of this post is to not get your hopes up too high yet.

Re: is Shadow mapping desired?

Posted: Mon Nov 23, 2020 01:40
by Lars
This would be a welcome improvement. I'd be happy to help shepherding a PR through.

Re: is Shadow mapping desired?

Posted: Mon Nov 23, 2020 07:43
by Liso
Hi all, @philipbenr is right. There are still a lot of work to do before a release.

But I'm thinking in just integrate SM with the main render pipeline and send the PR just to let ppl to help with the development.

But I need some time because I also have a full time job and a family xDD

About:
Andrey01 wrote:
Sun Nov 22, 2020 22:17
I have noticed an one bug with the shadow mapping on the player model, the shadows look like pretty distorted, especially on his head.
Yes, the reason is that at this demo the SM texture is attached in to a slot that is used by the player skin, so you see the SM texture mapping instead of the actual skin texture ;)

Re: is Shadow mapping desired?

Posted: Mon Nov 23, 2020 08:04
by philipbenr
Liso wrote:
Mon Nov 23, 2020 07:43
But I'm thinking in just integrate SM with the main render pipeline and send the PR just to let ppl to help with the development.

But I need some time because I also have a full time job and a family xDD
Don't burn yourself out. People can be patient if they want to see a feature implemented properly. If you push yourself too hard and get burnt out, we all lose out. ;) Family, your job, your sanity-- all are important.

As JP said, I hope the bus factor doesn't fall all on you and other people who know enough can jump on the PR.