[shaders]Bloom + Better Light

User avatar
ThomasMonroe
Member
Posts: 286
Joined: Tue Apr 04, 2017 16:21
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared
Location: Wherever I am at

Re: [shaders]Bloom + Better Light

by ThomasMonroe » Post

LMD wrote:I need to know the following things, to bring it to minetest :
- Where's the rendering loop ? (Hopefully not inside Irrlicht)
I already know where the shaders are.
Also, blurring things the viewer doesn't focus at is only a small, and a not that important point. To do :
- reflections using stencil
- bloon(I already have a plan, will figure out in two days or so, I expect)
the rendering loop is probably in game.cpp, however the drawing is not.

All that needs to be done is piping the rendering output to an image and then rendering that on a rectangle the size of the screen.
then a rendering pass needs to be created from the perspective of the sun.
I don't make messes, I just, er...disturb the local entropy!

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Post

burli wrote:I don't think, blur makes much sense except for screenshots. Most important shaders for me would be shadows, reflections, goodray and bloom
I agree!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
ThomasMonroe
Member
Posts: 286
Joined: Tue Apr 04, 2017 16:21
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared
Location: Wherever I am at

Re: [shaders]Bloom + Better Light

by ThomasMonroe » Post

azekill_DIABLO wrote:
burli wrote:I don't think, blur makes much sense except for screenshots. Most important shaders for me would be shadows, reflections, goodray and bloom
I agree!
Motion blur would be interesting.
I don't make messes, I just, er...disturb the local entropy!

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: [shaders]Bloom + Better Light

by LMD » Post

Motion blur is - guess what - also done using FBOs. For every pixel of the scene, you render it's movement direction as color (r = x, g = y, b = z, for example), and then in the post-processing shader, you blur according to your saved data.
My stuff: Projects - Mods - Website

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Post

LMD wrote:Motion blur is - guess what - also done using FBOs. For every pixel of the scene, you render it's movement direction as color (r = x, g = y, b = z, for example), and then in the post-processing shader, you blur according to your saved data.
COuld be done more simply I think. Just make frames fade out by transparency and new frame popping under them.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
ThomasMonroe
Member
Posts: 286
Joined: Tue Apr 04, 2017 16:21
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared
Location: Wherever I am at

Re: [shaders]Bloom + Better Light

by ThomasMonroe » Post

LMD if you are going to implement this, you might want to start getting familiar with the MT code. That way once you start work, you know where everything is and what exactly you need to do.
I don't make messes, I just, er...disturb the local entropy!

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: [shaders]Bloom + Better Light

by LMD » Post

azekill_DIABLO wrote:
LMD wrote:Motion blur is - guess what - also done using FBOs. For every pixel of the scene, you render it's movement direction as color (r = x, g = y, b = z, for example), and then in the post-processing shader, you blur according to your saved data.
COuld be done more simply I think. Just make frames fade out by transparency and new frame popping under them.
Yes, that's a nice idea, but I understood motion blur differently, do you really want to blur if the viewer is rotated ?
Image found in Google :
Motion
Blur
My stuff: Projects - Mods - Website

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Post

That it. My idea could do it well!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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: [shaders]Bloom + Better Light

by LMD » Post

Yes, but then also rotating the viewer fastly "blurs". Would fit well in a future/scifi themed subgame. Is there already such a subgame ?
My stuff: Projects - Mods - Website

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Post

marssurvive?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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: [shaders]Bloom + Better Light

by LMD » Post

azekill_DIABLO wrote:marssurvive?
Nice idea.
Maybe some other post-processing ? I recently found this texture pack :
[16px] Ambiguity
and I thought, that :
- filters are easy using post-processing
- overlays are easy using post-processing
Please take a look at those post-processing results, they are really impressive
My stuff: Projects - Mods - Website

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: [shaders]Bloom + Better Light

by burli » Post

Night vision would be cool

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Post

+1 for all of this!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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: [shaders]Bloom + Better Light

by LMD » Post

Here's an extreme experimental water/glass refraction shading, using post-processing, but not working properly.
Image
Attachments
very_very_experimental_shading.png
very_very_experimental_shading.png (761.51 KiB) Viewed 650 times
My stuff: Projects - Mods - Website

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: [shaders]Bloom + Better Light

by LMD » Post

azekill_DIABLO wrote:+1 for all of this!
Hopefully you didn't mean me, I'm not the creator/maintainer or anything related to Geeks3D. I just wanted to show what's possible.
My stuff: Projects - Mods - Website

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: [shaders]Bloom + Better Light

by LMD » Post

burli wrote:Night vision would be cool
Yes, and is also not so hard to implement. You simply combine color with depth. I'll have to experiment to achieve this.
My stuff: Projects - Mods - Website

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: [shaders]Bloom + Better Light

by LMD » Post

Testing my edge finder :
Image
Attachments
testing_my_edgefinder.png
testing_my_edgefinder.png (109.59 KiB) Viewed 650 times
My stuff: Projects - Mods - Website

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: [shaders]Bloom + Better Light

by LMD » Post

Here's an example toon shader :
Image
*thinkin'bout ComicTest* :D
Attachments
toon_shading.png
toon_shading.png (87.71 KiB) Viewed 650 times
My stuff: Projects - Mods - Website

User avatar
ThomasMonroe
Member
Posts: 286
Joined: Tue Apr 04, 2017 16:21
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared
Location: Wherever I am at

Re: [shaders]Bloom + Better Light

by ThomasMonroe » Post

LMD you need to start familarizing yourself with the minetest code, so you can start implementing awesome stuff like this.
I don't make messes, I just, er...disturb the local entropy!

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: [shaders]Bloom + Better Light

by LMD » Post

ThomasMonroe wrote:LMD you need to start familarizing yourself with the minetest code, so you can start implementing awesome stuff like this.
The first step would be to implement a post-processing stage, as all these effects can only be efficiently done using post-processing.
Yes, I definitely agree with you. You are totally right, but it's not so easy, as I am also developing large-scale helper apps, as my Model Creator.
My stuff: Projects - Mods - Website

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: [shaders]Bloom + Better Light

by rubenwardy » Post

Relevant: https://github.com/minetest/minetest/pull/5913

RealBadAngel had a working bloom implementation, but it was combined with a depth of field implementation which was very strong and odd. It also had performance issues

I'm interested in anything that can bring Minetest closer to this: https://youtu.be/Rkydse1LVX0
But it cannot come at the cost of performance for all users. It's probably more important to increase the view range, anyway
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Post

@rubenwardy: it would be very pleasant to have such graphics but I think it needs some big engine change, especially for lights!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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: [shaders]Bloom + Better Light

by LMD » Post

azekill_DIABLO wrote:@rubenwardy: it would be very pleasant to have such graphics but I think it needs some big engine change, especially for lights!
I'm sorry that I'm suggesting this over and over, but here a FBO is able to increase efficiency. In the RGB of a color attachment, the normals can be stored. Every lighting is evaluated using normals, attenuation, and sometimes even viewing direction has to be given(specular). So you are lighting the fragments of the FBO(2 triangles) in comparison to calculating light for at least 4 triangles for every seen cube !
Note :
- attenuation is done using the shadowmap(depthmap rendered out of the light's view, necessary for shadows)
- diffuse is done by calculating the dot product between stored normals and the light's direction in relation to the vertice.
- specular is done by calculating the light's reflection on the plane, dot product with the eye's viewing direction(glance)
...
My stuff: Projects - Mods - Website

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Post

Well try adding that too if you want. I'm such a noob at shaders!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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: [shaders]Bloom + Better Light

by LMD » Post

...and I'm a noob at Minetest...
My stuff: Projects - Mods - Website

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests