Skip to content

whimSYZ/v-cloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

v-cloud

A volumetric cloud render based on OpenGL. Implementing:

  • Preetham model to render the sun and sky
  • Pre-computed Perlin-worley noise to calculate cloud density
  • Simplex 3D noise to calculate curl
  • Ray marching to calculate cloud lighting

Compile

Compile and build using CMake. Configure using IDE or build with command line

cmake --build build --config Release --target all -j 12

Dependancies

  • C++ 20
  • OpenGL 3
  • GLFW, GLEW, GLM(included in external)

Instructions

Key Operation
Drag mouse Tilt camera
W Forward
A Backward
S Left
D Right
Q Up
Z Down
Rise sun
Fall sun
Decrease coverage (less rain cloud)
Increase coverage (more rain cloud)

Frame rate is outputed to stdout per 5s.

Please don't go above the clouds, below the surface, or outside of radius as it triggers bugs!

Objectives

  • Sample Perlin-Worley noise to create cloud models. (See perlinworley.h)
  • Calculate light intensity going through clounds based on Beer-Lambert law. (Line 271 in sky.frag)
  • Account for scattering. (Line 265 in sky.frag)
  • Account for absorption. (Line 279 in sky.frag)
  • Calculate sky color in four discrete times of a day: sunrise, noon, sunset and night, using Preetham model. (Line 55 in sky.frag)
  • Use ray marching to render clouds. (Line 242 in sky.frag)
  • FPS ≥ 3. (See stdout)
  • Use a user-interface to determine rain cloud density. (See above)

Acknowledgements

Models

The Real Time Volumetric Cloudscapes of Horizon Zero Dawn

NUBIS: AUTHORING REAL-TIME VOLUMETRIC CLOUDSCAPES WITH THE DECIMA ENGINE

A Practical Analytic Model for Daylight

Noises

Simplex 3D Noise

Perlin Worley Noise

Codes

clayjohn/realtime_clouds

OfenPower/RealtimeVolumetricCloudRenderer

CS 488 - Toshiya Hachisuka

About

A volumetric cloud render based on OpenGL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published