Volumetric coloring of fog, based on sun / moon & horizon color

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

by MirceaKitsune » Sun Jun 30, 2013 09:13

Jordach wrote:
Taoki (MK) wrote:Will likely post the code and screenshots tomorrow when it's ready.
It's now tomorrow. Can we have screenshots?


For me, tomorrow just started now. So expect more within the next hours :)
 

User avatar
Jordach
Member
 
Posts: 4521
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Sun Jun 30, 2013 09:15

MirceaKitsune wrote:
Jordach wrote:
Taoki (MK) wrote:Will likely post the code and screenshots tomorrow when it's ready.
It's now tomorrow. Can we have screenshots?


For me, tomorrow just started now. So expect more within the next hours :)
I was using timezones here as the hinge for the joke.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

Thermal_Shock
Member
 
Posts: 84
Joined: Mon Jun 24, 2013 09:10

by Thermal_Shock » Sun Jun 30, 2013 09:42

Thanks for tackling this MirceaKitsune. Sometimes I find myself stopping and just watching the sunsets in Minecraft because they look so good. I think it would be a very immersive feature for Minetest.
 

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

by MirceaKitsune » Sun Jun 30, 2013 17:56

At this point we can say the code is ready. I got some nice color transitions going, with a realistic to surrealistic feel.

The code is ready for testing and pushing upstream if no one complains. Note that I had to use some weirder formulas for the sun color... it was difficult to do the transitions and that's the best I could get. If anyone can optimize the maths and code feel free to, but please don't change the looks! I'm quite fond of the current color set, and if urgent changes are to be made I'd rather be the one to do them. Anyway let me know what you think.

GIT branch of the code.

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image
 

User avatar
Jordach
Member
 
Posts: 4521
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Sun Jun 30, 2013 18:00

Taoki wrote:PICS

It's a bit toooo sharp. But it looks good. The intensity of fog is way way way way way way way way too powerful.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

User avatar
Inocudom
Member
 
Posts: 3031
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Sun Jun 30, 2013 18:03

MirceaKitsune, this is a glorious day in the history of Minetest. I sincerely hope that the developers add this to the game, for they would be foolish not to. An open-source project that has no regard for greatness is a doomed open-source project. That is an infallible truth.
Recovering from the abomination I am. Clocking time for Garry's Mod I am too.
 

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

by MirceaKitsune » Sun Jun 30, 2013 18:12

Jordach wrote:
Taoki wrote:PICS

It's a bit toooo sharp. But it looks good. The intensity of fog is way way way way way way way way too powerful.


Some screenshots were taken before the brightness adjustment. If you mean the saturation, that's intended. The purpose is to obtain beautiful environment colors, and if it doesn't do that the effect can be considered useless.

And here are some screenshots with a better draw distance... forgot to make those:

Image

Image

Image

Image
 

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

by MirceaKitsune » Sun Jun 30, 2013 18:34

Sorry for the image span. A lot of people suggested the fog is too strong and intensity should be decreased. I brought the blend value to half, and since it still looks beautiful I'm ok with it (but not any lower). I amended the commit on GIT so do another pull to get the change. Screenshots:

[EDIT] Amended the commit again, and made yellow fog a bit more orange (looks better).

Image

Image

Image

Image
Last edited by MirceaKitsune on Sun Jun 30, 2013 20:16, edited 1 time in total.
 

User avatar
sfan5
Moderator
 
Posts: 3776
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

by sfan5 » Sun Jun 30, 2013 20:16

Last edited by sfan5 on Sun Jun 30, 2013 20:19, edited 1 time in total.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)
 

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

by MirceaKitsune » Sun Jun 30, 2013 20:19



Thanks :) You might want to re-make it though. I just amended the commit again right after you posted that (tweaked yellow fog color a bit).
 

User avatar
sfan5
Moderator
 
Posts: 3776
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

by sfan5 » Sun Jun 30, 2013 20:20

Something was wrong with the old one anyway...
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
sfan5
Moderator
 
Posts: 3776
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5
 

User avatar
Evergreen
Member
 
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
Location: A forest in the midwest
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Sun Jun 30, 2013 20:50

MirceaKitsune wrote:Sorry for the image span. A lot of people suggested the fog is too strong and intensity should be decreased. I brought the blend value to half, and since it still looks beautiful I'm ok with it (but not any lower). I amended the commit on GIT so do another pull to get the change. Screenshots:

[EDIT] Amended the commit again, and made yellow fog a bit more orange (looks better).

-snip-
Amazing work! It looks beautiful. :D
Back from the dead!
 

fraang
Member
 
Posts: 10
Joined: Thu Oct 11, 2012 14:42

by fraang » Sun Jun 30, 2013 21:42

Nice work MirceaKitsune! I see forward to see your work upstream. :-)
 

User avatar
Topywo
Member
 
Posts: 1720
Joined: Fri May 18, 2012 20:27

by Topywo » Sun Jun 30, 2013 22:18

MirceaKitsune wrote: I'm quite fond of the current color set


I like the work you've done.

I preferred the first color set, but I guess it's allright you use a set that appeals to most people.
 

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

by MirceaKitsune » Sun Jun 30, 2013 22:45

Since there haven't been any major objections and I can't think of anything else to change, I created a pull request. If you want this feature, please support it and let the developers know! I already heard devs disagreeing with this for reasons as little as "fog doesn't match the cloud color" (although horizon and clouds don't need to match and it's barely even noticeable). I think it's good and really hope this won't be another case of code getting lost over admins needing little things (that are fine as) is to be changed right away.
 

User avatar
Inocudom
Member
 
Posts: 3031
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Sun Jun 30, 2013 22:47

MirceaKitsune wrote:Since there haven't been any major objections and I can't think of anything else to change, I created a pull request. If you want this feature, please support it and let the developers know! I already heard devs disagreeing with this for reasons as little as "fog doesn't match the cloud color" (although horizon and clouds don't need to match and it's barely even noticeable). I think it's good and really hope this won't be another case of code getting lost over admins needing little things (that are fine as) is to be changed right away.


I support the addition of this feature to Minetest. If there are any issues, the developers must work with you to solve them.
Recovering from the abomination I am. Clocking time for Garry's Mod I am too.
 

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

by MirceaKitsune » Sun Jun 30, 2013 23:13

Amended the commit again (pull request should be automatically updated). Made the effect last less, it was activated / deactivated way too early / late.
 

User avatar
paramat
Developer
 
Posts: 3304
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

by paramat » Mon Jul 01, 2013 01:53

I'm happy to see the yellow haze has been dropped :) that was the only feature that didn't look right to me.
As the sun sets or rises the light ray colour goes from yellow through to deep red ... at the minetest dusk / dawn sequence the sun is already close to the horizon so the haze colour should start at yellowy-orange or even orange.

Also perhaps the clouds should be coloured too with the same light ray colour? This would happen IRL is it suitable for Minetest? If you try it i would love to see a screenshot.

Interestingly i prefer the intense colours of your first version, or perhaps even better something between that and your latest compromise. In reality sunrise / sunset is often an intense bright event, in Mineteset surely it should be just as intense perhaps even more abstract and intense as reality? Love the purple.
Last edited by paramat on Mon Jul 01, 2013 01:59, edited 1 time in total.
 

User avatar
paramat
Developer
 
Posts: 3304
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

by paramat » Mon Jul 01, 2013 02:18

... perhaps also, if you want to follow real life physics, the sun colour could change at the horizon and that colour is used for tinting the haze and clouds. Then, everything is defined by the time/colour gradient of the sun, which perhaps could be stored as a texture.

EDIT However ... i already like it as it is, even if the sun and clouds don't match. I would love to have an intensity parameter or option too (so i can turn it up!).
Last edited by paramat on Mon Jul 01, 2013 02:30, edited 1 time in total.
 

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

by MirceaKitsune » Mon Jul 01, 2013 08:42

The reason I'm not coloring clouds is not that I don't want to, but because cloud colors are determined somewhere else and I don't know how to change them from Sky::Render and if to remove the old way entirely. Also, when the horizon is a deep purple tint (sun already set / didn't rise yet) that shouldn't change cloud colors, so I'd also need a filter to decide when.

I might consider it (no promises) if someone can explain which video::SColor I should change from Sky::Render for the clouds, and where to remove the existing cloud coloring which makes clouds orange at sunset / sunrise (this would override it). Note that like the horizon, all cloud's colors would then change based on where you are looking... so we should think twice if that would look acceptable or not also.
 

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

by MirceaKitsune » Mon Jul 01, 2013 21:19

Added a new commit which fixes several issues:

- By popular demand, clouds are also influenced by the directional colors.

- Don't blend sun and moon influences over a full rotation, only fade them between the "corners" of the sky. Fixes the red moon issue outlined by PilzAdam. Also removed view pitch from the calculation.

- Moved the code from Sky::render to Sky::update and properly apply the effect to colors rather than modifying them on the go.

Image

Image

Image

Image
Last edited by MirceaKitsune on Mon Jul 01, 2013 21:23, edited 1 time in total.
 

Thermal_Shock
Member
 
Posts: 84
Joined: Mon Jun 24, 2013 09:10

by Thermal_Shock » Tue Jul 02, 2013 09:03

That's some beautiful work there.

I wouldn't think it, but does this affect performance at all. Gotta think of the poor souls on toasters after all.
 

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

by MirceaKitsune » Tue Jul 02, 2013 09:20

Thermal_Shock wrote:That's some beautiful work there.

I wouldn't think it, but does this affect performance at all. Gotta think of the poor souls on toasters after all.


It couldn't affect performance, unless Minetest is running on a hand watch. It doesn't add any extra render calls or costly functions, just further modifies sky colors each frame using simple maths (simple for the PC at least).
 

User avatar
paramat
Developer
 
Posts: 3304
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

by paramat » Tue Jul 02, 2013 10:43

Ah that looks better now.
Although, with apologies for more criticism, the haze is still a little too yellow in the first screenshot, i would recommend starting the colour sequence at orange or yellowy-orange.
Concerning purple, we have purple clouds where i live, purple clouds after sunset could be visually stunning.
Last edited by paramat on Tue Jul 02, 2013 10:49, edited 1 time in total.
 

PreviousNext

Return to Feature Discussion



Who is online

Users browsing this forum: No registered users and 0 guests