Coding Adventure: Clouds
From Sebastian Lague · · 12 min

The player loads from YouTube only when you click. It uses YouTube's privacy-enhanced mode.
If the video does not play, the owner may have turned off embedding. Watch it on YouTube instead.
Description
Clouds are lovely and fluffy and rather difficult to make. In this video I attempt to create clouds from code in the Unity game engine.
Project source (Unity, HLSL, C#) is now out of early access: https://github.com/SebLague/Clouds If you'd like to support the creation of more videos like this, please consider becoming a patron: https://www.patreon.com/SebastianLague
Learning Resources: http://killzone.dl.playstation.net/killzone/horizonzerodawn/presentations/Siggraph15_Schneider_Real-Time_Volumetric_Cloudscapes_of_Horizon_Zero_Dawn.pdf http://www.diva-portal.org/smash/get/diva2:1223894/FULLTEXT01.pdf http://patapom.com/topics/Revision2013/Revision%202013%20-%20Real-time%20Volumetric%20Rendering%20Course%20Notes.pdf https://www.gamedev.net/forums/topic/680832-horizonzero-dawn-cloud-system/
Assets: Mouse flight: https://github.com/brihernandez/MouseFlight Plane model: https://www.turbosquid.com/FullPreview/Index.cfm/ID/1041070
Music: "Hypnothis" and "The Show Must Be Go" by Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 3.0 License http://creativecommons.org/licenses/by/3.0/
Notes: I made a mistake at 2:12 in saying that the closest point is guaranteed to be inside the adjacent cells, it’s possible to get arrangements where the nearest point is two cells away orthogonally. This doesn’t seem to occur much as I never noticed any discontinuities in the result, but worth knowing.
Chapters: 0:00 Intro 0:56 Worley Noise 3:12 Image Effects 3:50 Raytracing... a Box! 5:14 Raymarching Cloud-ish Shapes 7:10 Light Scattering Theory 8:26 Mishap Montage 9:22 Final Code 9:44 Cloud Editor 11:31 Final Demo: Flying Through the Clouds