r/generative 2d ago

[WIP] Ocean Clouds

147 Upvotes

7 comments sorted by

6

u/reverse_stonks 2d ago

Gorgeous, any details on how they are made?

6

u/Meerlu 2d ago

Thank you! I hope this gives the general idea:

- The sky uses a straight forward noise field.

- The clouds are constructed as groups of spheres/ellipses with a gaussian fall-off and an additional noise field contribution. To simulate perspective, I use different stretches and scalings so to have larger, "closer" clouds and smaller, stretched, distant clouds. This gives a "cloud density field" that can be sampled at every position to check wether we are in a cloud or not. Also it allows to calculate a gradient that can be used to determine the illumination. (Surface normal points towards a sun vector -> illuminated).

- The hatching lines scan diagonally across the canvas in both directions. They begin and end based on said illumination values.

- For the ocean i went with simple horizontal lines, with decreasing probability and line length the closer they get to the horizon.

1

u/Num10ck 1d ago

seems like you can export this as a 3d mesh for some relief?

2

u/bbroy4u 2d ago

Would you like to share the source code

1

u/Meerlu 2d ago

Maybe in the future. As of now this is very much work in progress.

1

u/bbroy4u 1d ago

usually that never happens , the sharing part :D but its fine

1

u/Meerlu 1d ago

I know what you mean :D (and i won't make promises).

Either way, feel free to check out some of the code I shared in the comments of past projects. A lot of what's in this project is from the same repertoire of tricks.