[shaders]Bloom + Better Light

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

Re: [shaders]Bloom + Better Light

by ThomasMonroe » Wed Nov 29, 2017 19:27

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.
Projects|:*sigh* school: :Qub³d: :Legends Of Survival: :making people think:
I don't make things messy, I just *cough* disturb the local entropy.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7342
Joined: Wed Oct 29, 2014 20:05
Location: Under my desk (but I can't see my monitor now X'[ )
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Wed Nov 29, 2017 19:44

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!
【Voxellar 2.0】 ; 【MILA】 update ; 【Rec_a_MT】 ; 【BB,HD】 update ; 【▶ Youtube】 This person worked too hard to be forgotten: Feedback me!
 

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

Re: [shaders]Bloom + Better Light

by ThomasMonroe » Thu Nov 30, 2017 12:32

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.
Projects|:*sigh* school: :Qub³d: :Legends Of Survival: :making people think:
I don't make things messy, I just *cough* disturb the local entropy.
 

User avatar
LMD
Member
 
Posts: 334
Joined: Sat Apr 08, 2017 08:16
Location: Bonn, Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo

Re: [shaders]Bloom + Better Light

by LMD » Thu Nov 30, 2017 14:27

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.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7342
Joined: Wed Oct 29, 2014 20:05
Location: Under my desk (but I can't see my monitor now X'[ )
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Thu Nov 30, 2017 16:30

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.
【Voxellar 2.0】 ; 【MILA】 update ; 【Rec_a_MT】 ; 【BB,HD】 update ; 【▶ Youtube】 This person worked too hard to be forgotten: Feedback me!
 

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

Re: [shaders]Bloom + Better Light

by ThomasMonroe » Thu Nov 30, 2017 20:18

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.
Projects|:*sigh* school: :Qub³d: :Legends Of Survival: :making people think:
I don't make things messy, I just *cough* disturb the local entropy.
 

User avatar
LMD
Member
 
Posts: 334
Joined: Sat Apr 08, 2017 08:16
Location: Bonn, Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo

Re: [shaders]Bloom + Better Light

by LMD » Fri Dec 01, 2017 16:36

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
 

User avatar
azekill_DIABLO
Member
 
Posts: 7342
Joined: Wed Oct 29, 2014 20:05
Location: Under my desk (but I can't see my monitor now X'[ )
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Fri Dec 01, 2017 17:06

That it. My idea could do it well!
【Voxellar 2.0】 ; 【MILA】 update ; 【Rec_a_MT】 ; 【BB,HD】 update ; 【▶ Youtube】 This person worked too hard to be forgotten: Feedback me!
 

User avatar
LMD
Member
 
Posts: 334
Joined: Sat Apr 08, 2017 08:16
Location: Bonn, Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo

Re: [shaders]Bloom + Better Light

by LMD » Sat Dec 02, 2017 10:01

Yes, but then also rotating the viewer fastly "blurs". Would fit well in a future/scifi themed subgame. Is there already such a subgame ?
 

User avatar
azekill_DIABLO
Member
 
Posts: 7342
Joined: Wed Oct 29, 2014 20:05
Location: Under my desk (but I can't see my monitor now X'[ )
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
LMD
Member
 
Posts: 334
Joined: Sat Apr 08, 2017 08:16
Location: Bonn, Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo

Re: [shaders]Bloom + Better Light

by LMD » Sat Dec 02, 2017 18:21

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
 

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

User avatar
azekill_DIABLO
Member
 
Posts: 7342
Joined: Wed Oct 29, 2014 20:05
Location: Under my desk (but I can't see my monitor now X'[ )
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
LMD
Member
 
Posts: 334
Joined: Sat Apr 08, 2017 08:16
Location: Bonn, Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo

Re: [shaders]Bloom + Better Light

by LMD » Sun Dec 03, 2017 13:23

Here's an extreme experimental water/glass refraction shading, using post-processing, but not working properly.
Image
Attachments
very_very_experimental_shading.png
(761.51 KiB) Not downloaded yet
 

User avatar
LMD
Member
 
Posts: 334
Joined: Sat Apr 08, 2017 08:16
Location: Bonn, Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo

Re: [shaders]Bloom + Better Light

by LMD » Sun Dec 03, 2017 13:26

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.
 

User avatar
LMD
Member
 
Posts: 334
Joined: Sat Apr 08, 2017 08:16
Location: Bonn, Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo

Re: [shaders]Bloom + Better Light

by LMD » Sun Dec 03, 2017 13:27

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.
 

User avatar
LMD
Member
 
Posts: 334
Joined: Sat Apr 08, 2017 08:16
Location: Bonn, Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo

Re: [shaders]Bloom + Better Light

by LMD » Sun Dec 03, 2017 13:45

Testing my edge finder :
Image
Attachments
testing_my_edgefinder.png
(109.59 KiB) Not downloaded yet
 

User avatar
LMD
Member
 
Posts: 334
Joined: Sat Apr 08, 2017 08:16
Location: Bonn, Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo

Re: [shaders]Bloom + Better Light

by LMD » Tue Dec 05, 2017 20:06

Here's an example toon shader :
Image
*thinkin'bout ComicTest* :D
Attachments
toon_shading.png
(87.71 KiB) Not downloaded yet
 

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

Re: [shaders]Bloom + Better Light

by ThomasMonroe » Tue Dec 05, 2017 22:45

LMD you need to start familarizing yourself with the minetest code, so you can start implementing awesome stuff like this.
Projects|:*sigh* school: :Qub³d: :Legends Of Survival: :making people think:
I don't make things messy, I just *cough* disturb the local entropy.
 

User avatar
LMD
Member
 
Posts: 334
Joined: Sat Apr 08, 2017 08:16
Location: Bonn, Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo

Re: [shaders]Bloom + Better Light

by LMD » Wed Dec 06, 2017 13:18

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.
 

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

Re: [shaders]Bloom + Better Light

by rubenwardy » Wed Dec 06, 2017 16:32

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
Core Developer | Donate | My Twitter | Mods | Mods 4 Android | Node Box Editor | Minetest Modding Book

Hello profile reader

LgiOxMFYXOqtqVqMPhbw1Bn3oNRvEC7j
 

User avatar
azekill_DIABLO
Member
 
Posts: 7342
Joined: Wed Oct 29, 2014 20:05
Location: Under my desk (but I can't see my monitor now X'[ )
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Wed Dec 06, 2017 16:39

@rubenwardy: it would be very pleasant to have such graphics but I think it needs some big engine change, especially for lights!
【Voxellar 2.0】 ; 【MILA】 update ; 【Rec_a_MT】 ; 【BB,HD】 update ; 【▶ Youtube】 This person worked too hard to be forgotten: Feedback me!
 

User avatar
LMD
Member
 
Posts: 334
Joined: Sat Apr 08, 2017 08:16
Location: Bonn, Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo

Re: [shaders]Bloom + Better Light

by LMD » Wed Dec 06, 2017 21:10

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)
...
 

User avatar
azekill_DIABLO
Member
 
Posts: 7342
Joined: Wed Oct 29, 2014 20:05
Location: Under my desk (but I can't see my monitor now X'[ )
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Thu Dec 07, 2017 16:47

Well try adding that too if you want. I'm such a noob at shaders!
【Voxellar 2.0】 ; 【MILA】 update ; 【Rec_a_MT】 ; 【BB,HD】 update ; 【▶ Youtube】 This person worked too hard to be forgotten: Feedback me!
 

User avatar
LMD
Member
 
Posts: 334
Joined: Sat Apr 08, 2017 08:16
Location: Bonn, Germany
GitHub: appgurueu
In-game: LMD + PRO_LMD + Limo
 

PreviousNext

Return to Feature Discussion



Who is online

Users browsing this forum: No registered users and 6 guests