Board index FlightGear Development Weather

Contributing cloud textures

Everything related to weather simulation, visuals should be discussed in the shader subforum.

Contributing cloud textures

Postby Fahim Dalvi » Sat Nov 07, 2020 2:49 pm

Hi all,

We are finally starting to have some clouds in the sky here, a pleasant change from what is otherwise a uniformly clear sky throughout the year. Looking at some of these, I was wondering if I could use this opportunity to contribute some additional cloud textures for FG. Some questions that I have:

  1. Is FG in need for more textures? (I guess more is always better for variety, but I may be wrong here)
  2. I see that the wiki has some nice instructions for creating textures for regular objects (like trees), but I am not sure if these all transfer well for clouds given the difference in altitude and vantage points. What would some basic guidelines for cloud texture acquisition look like? (For example, take pictures with a camera pointed straight up, or don't take pictures close to dusk/dawn because of the colors, use an X megapixel camera, etc.)

Here are some sample ones I quickly took, in case someone has specific pointers after looking at these. I have experience with GIMP as well, to eventually edit these to get useable textures (removing background etc.)

Best Regards,
Fahim
User avatar
Fahim Dalvi
 
Posts: 1352
Joined: Sun Oct 14, 2007 2:08 pm
Location: Qatar
Callsign: Fahim
Version: 2020.3.11
OS: macOS

Re: Contributing cloud textures

Postby Thorsten » Sat Nov 07, 2020 4:48 pm

Ad 1) Not desperately so I guess - with more GPU power, I've started to shift more and more to techniques which assemble larger clouds from small building blocks, so the magic is more in the placement algorithm than in the texture (and you wouldn't necessarily see much by changing the underlying texture sheet) Eventually we'll also move to volumetric clouds (only placement algorithm, not texture at all).

Ad 2) Make sure you have good contrast (dark blue sky) which usually means pointing a camera straight up - that ensures one can use 'color to alpha' to extract the cloud from the background which keeps all the small whisps. The exception are Cumulus clouds, which we need from the side (because they're asymmetric) - here the good contrast to the background is even more crucial.

Usually 5 megapixels have been quite good (extract at high resolution, reduce size later).

When playing with generating textures, change color images to B/W, it saves a lot of space.

Possibly where new textures could make the biggest impact is Cirrus clouds where we have limited variety, but they're internally different, they're genuine 3d models rather than billboarded quads.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Contributing cloud textures

Postby Fahim Dalvi » Mon Nov 09, 2020 7:40 am

Thanks for the all tips; I do recall seeing a bunch of Cirrus clouds here, so I'll keep an eye out for those.

Fahim
User avatar
Fahim Dalvi
 
Posts: 1352
Joined: Sun Oct 14, 2007 2:08 pm
Location: Qatar
Callsign: Fahim
Version: 2020.3.11
OS: macOS

Re: Contributing cloud textures

Postby Zac » Tue Feb 22, 2022 6:46 am

I experimented with cloud textures a while ago. Same method as described here. The post processing is very important and you need to be careful to maintain the detail of the cloud whilst allowing the edges of the cloud to fade out and not have outlines around the edges which break the immersion and show that the cloud is infact just a picture. It is a tricky balance.

Cumulus:
Image
Image

Nimbus:
Image

I think though that when compositor becomes stable and transparency is reimplemented in 2020.4, FG should look towards volumetric clouds, such as in MSFS2020 and DCS.
Zac
 
Posts: 21
Joined: Mon Mar 09, 2020 2:15 am

Re: Contributing cloud textures

Postby Thorsten » Tue Feb 22, 2022 11:37 am

I think though that when compositor becomes stable and transparency is reimplemented in 2020.4, FG should look towards volumetric clouds, such as in MSFS2020 and DCS.


Feel free to work on it.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Contributing cloud textures

Postby merspieler » Tue Feb 22, 2022 12:45 pm

Zac wrote in Tue Feb 22, 2022 6:46 am:I think though that when compositor becomes stable and transparency is reimplemented in 2020.4, FG should look towards volumetric clouds, such as in MSFS2020 and DCS.


I'd love to see that too... this video explains pretty well, how one can create volumetric clouds and the result at the end of the video looks amazing.
Code of that project is also available under the MIT license so you can take a look at how he did it.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2241
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: Contributing cloud textures

Postby erik » Tue Feb 22, 2022 3:42 pm

To be honest I find most procedural volumetric cloud procedures have a distinct lack of detail.

This paper seems to have solved that:
https://www.researchgate.net/publicatio ... Techniques

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Contributing cloud textures

Postby Thorsten » Tue Feb 22, 2022 3:58 pm

Code of that project is also available under the MIT license so you can take a look at how he did it.


So just take a look at how he did it and do it - what's keeping you? You love to have it, you have the instruction that tells you how it works - what more do you need?
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Contributing cloud textures

Postby merspieler » Tue Feb 22, 2022 5:17 pm

Thorsten wrote in Tue Feb 22, 2022 3:58 pm:what more do you need?

Time... the answer is simply time...
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2241
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: Contributing cloud textures

Postby Thorsten » Tue Feb 22, 2022 6:55 pm

Time... the answer is simply time...


Right.

And that's the issue - it doesn't help if so and so many people spend their time posting videos or stating what they'd love to have or what FG should do. It only helps if someone goes ahead and does it.

At which point you'll quickly figure out that rendering volumetric clouds in general is rather different from rendering a specific cloud type at the specific position the weather system wants it to place and all those pesky details which really doesn't concern people who post videos or photographs or wishlists...

Needless to say - do it or don't - but please leave it at that.

Occasionally I catch myself thinking 'oh, I could perhaps find the time to try that and that shader, it'd be interesting...' - when I read the usual forum wishlist posts and what FG needs or so, I'm quickly cured and go back to doing something with my kids - after all, they appreciate it. The vast effort to create AW instead is usually met with 'oh, we really need volumetric clouds' and such like.

Thanks for nothing :mrgreen:
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Contributing cloud textures

Postby erik » Tue Feb 22, 2022 7:21 pm

I know you're not fishing for compliments but I've not seen anything remotely as versatile as AWS/ALS so far. When combining weather, clouds and lighting for all the seasons (using the environment code) I doubt anything will beat it.

Erik
Last edited by erik on Tue Feb 22, 2022 11:05 pm, edited 1 time in total.
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Contributing cloud textures

Postby merspieler » Tue Feb 22, 2022 9:59 pm

Thorsten wrote in Tue Feb 22, 2022 6:55 pm:
Time... the answer is simply time...


Right.

And that's the issue - it doesn't help if so and so many people spend their time posting videos or stating what they'd love to have or what FG should do. It only helps if someone goes ahead and does it.

At which point you'll quickly figure out that rendering volumetric clouds in general is rather different from rendering a specific cloud type at the specific position the weather system wants it to place and all those pesky details which really doesn't concern people who post videos or photographs or wishlists...

Needless to say - do it or don't - but please leave it at that.

Occasionally I catch myself thinking 'oh, I could perhaps find the time to try that and that shader, it'd be interesting...' - when I read the usual forum wishlist posts and what FG needs or so, I'm quickly cured and go back to doing something with my kids - after all, they appreciate it. The vast effort to create AW instead is usually met with 'oh, we really need volumetric clouds' and such like.

Thanks for nothing :mrgreen:



Die klügere gibt nach... du hast Recht.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2241
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: Contributing cloud textures

Postby Zac » Wed Feb 23, 2022 1:43 am

I have looked into volumetric clouds but right now, without digging into the core, the nightlies' stability issues and lack of transparency are the main obstacles to implementing volumetric clouds.

I agree with Thorsten, sometimes it's better to just do it, but in this case to get a demonstration working in sim is not possible for the time being. Though with the amount of resources and working code becoming available on the subject, it should be achievable once the nightly becomes more stable. I would be keen to work on it, hopefully in the future I can come back with a demonstration.
Zac
 
Posts: 21
Joined: Mon Mar 09, 2020 2:15 am

Re: Contributing cloud textures

Postby icecode » Mon Feb 28, 2022 2:11 am

I'm fairly disconnected from FG, so I haven't noticed these conversations about volumetric clouds and Sebastian Lague's work (I'm referring to this thread and this other thread). I find it quite funny that no one has linked to my implementation of volumetric clouds before. Hooray, if you are reading this, just letting you know I appreciate you reminding people in the community of forgotten projects so these things don't happen :lol:.

The implementation is all in FG (not Unity, which for non-graphics people sounds like no big deal but that's where most of the complexity/headache resides) and works with ALS. Of course there is no integration with any weather system and the cloud coverage is completely arbitrary/made up, but the implementation is there for whoever wants and has the time to work on it. Just shoot me a PM/email/whatever and I'll provide you with all the code and some pointers in the right direction.
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Contributing cloud textures

Postby icecode » Mon Feb 28, 2022 2:20 am

Zac wrote in Wed Feb 23, 2022 1:43 am:I have looked into volumetric clouds but right now, without digging into the core, the nightlies' stability issues and lack of transparency are the main obstacles to implementing volumetric clouds.


Hey Zac. I don't know how the nightlies are in terms of stability, but the lack of/weird behaviour of transparency is something I'm aware of (as I'm the one who introduced it :D ). I don't think they should pose a problem to implement volumetric clouds. My recommendation if you decide to give the implementation a shot would be to create a huge cube in the sky and raycast inside it. The approach that some of the literature (and my own implementation!) use is based on a fullscreen quad, which for the case of FG might not be the best idea for a number of reasons. We can talk about why in more detail if you like, but basically when raycasting a big (mostly transparent) cube, you have to handle blending explicitly/manually, so you can ignore FG assumptions about transparency that are present on most Effects and shaders.
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Next

Return to Weather

Who is online

Users browsing this forum: No registered users and 1 guest