Interactive Modelling and Rendering of Clouds Jesper Mosegaard , PhD - - PowerPoint PPT Presentation
Interactive Modelling and Rendering of Clouds Jesper Mosegaard , PhD - - PowerPoint PPT Presentation
Click to edit Master title style Interactive Modelling and Rendering of Clouds Jesper Mosegaard , PhD Head of Computer Graphics Lab Alexandra Institute Denmark Click to edit Master title style 19/03/15 Page 2 The Alexandra Institute Click
Click to edit Master title style
19/03/15 Page 2
Click to edit Master title style
- Private not-for-profit company within IT
– Technology transfer from University research through GTS institutes (Danish model)
- Application oriented research
- Consultancy for companies
The Alexandra Institute
Click to edit Master title style
Interdisciplinary collaboration
Click to edit Master title style
Problem statement
19/03/15 Page 5
Click to edit Master title style
… even more difficult
Click to edit Master title style
- Simulating fluid dynamics is slow
- Shaping through parameters is in-direct
- Viewport does not represent final quality
Traditional workflow
19/03/15 Page 7
From https://vimeo.com/30189748
Click to edit Master title style
External video
Click to edit Master title style
- User-guided procedural content generation with instant feedback to make even
the most advanced setups possible.
- High-quality real-time rendering which allows for continuous visual quality
tweaking.
- Less time spent waiting.
– More time for what really matters – being creative.
Taming the Elements
Click to edit Master title style
This month tutorials featured in
19/03/15 10
Elementacular.com
Click to edit Master title style
Overview
Raymarch Voxelization Floodfilling Dilation & distance approximation Light Fields Raymarch User- controlled fractal evaluation Mesh Image Distance Field Noise Field Whispy Field
Click to edit Master title style
Data Representation
Antoine Bouthors et. al.: ”Interactive multiple anisotropic scattering in clouds”
Click to edit Master title style
Rasterization-based voxelization
"Octree-Based Sparse Voxelization Using The GPU Hardware Rasterizer" Cyril Crassin (NVIDIA), Simon Green (NVIDIA), in OpenGL Insights, July 2012
Click to edit Master title style
Voxelization Results
Click to edit Master title style
Voxelization Results
Click to edit Master title style
Overview
Raymarch Voxelization Floodfilling Dilation & distance approximation Light Fields Raymarch User- controlled fractal evaluation Mesh Image Distance Field Noise Field Whispy Field
✔
Click to edit Master title style
- Voxelization produces voxels for each triangle fragment.
– In practice a lot of geometry is self-intersecting. – We need the outer voxels for distance field calculation
Why do we need to floodfill?
Click to edit Master title style
- Easy-to-use general-purpose compute.
- OpenGL 4.3 feature.
- Very powerful coupled with Image load/store.
– Read/write to 3D texture at arbitrary positions. – Perform atomic operations on storage.
Compute Shaders
Click to edit Master title style
- Two Compute Shaders
– tag initial outside voxels (if visible from all three axes) – Iteratively grow voxels outside.
Floodfilling on the GPU
Input mesh Thin voxelization Initial tagging Iterative growth
My ¡Cloud ¡
Thin ¡shell ¡voxeliza3on ¡
Seed ¡floodfill ¡
Itera3ve ¡floodfill ¡
Itera3ve ¡floodfill ¡
Itera3ve ¡floodfill ¡
Itera3ve ¡floodfill ¡
Itera3ve ¡floodfill ¡
Removing ¡internal ¡voxels ¡
Click to edit Master title style
Overview
Raymarch Voxelization Floodfilling Dilation & distance approximation Light Fields Raymarch User- controlled fractal evaluation Mesh Image Distance Field Noise Field Whispy Field
✔ ✔
Click to edit Master title style
- Single compute shader.
- Propagate distance information from initial surface voxels:
– If voxel is tagged as outside and not part of the initial surface, pull minimum distance. – Combine using imageAtomicMin. – Complicated by the fact that atomic operations only work on 32bit integers.
Dilation and Distance Estimation
Ini3al ¡distances ¡to ¡triangles ¡
Distance ¡itera3on ¡1 ¡
Distance ¡itera3on ¡2 ¡
Map ¡to ¡densi3es ¡
Click to edit Master title style
Overview
Raymarch Voxelization Floodfilling Dilation & distance approximation Light Fields Raymarch User- controlled fractal evaluation Mesh Image Distance Field Noise Field Whispy Field
✔ ✔ ✔
Click to edit Master title style
- Specialized compute shaders.
- A major part of getting the look right.
- Fractals based on GPU generated Simplex and Worley noise
- Wispys based on gridless advection
Making Some Noise
Based on Siggraph 2011 Course “Production Volume Rendering Systems”.
Click to edit Master title style
Making Some Noise
19/03/15 ¡ Page ¡38 ¡
Simplex ¡roughness ¡ Wispy ¡roughness ¡
Click to edit Master title style
Overview
Raymarch Voxelization Floodfilling Dilation & distance approximation Light Fields Raymarch User- controlled fractal evaluation Mesh Image Distance Field Noise Field Whispy Field
✔ ✔ ✔ ✔
Click to edit Master title style
Real-time single scattering
Click to edit Master title style
- Single- vs. multi-scatter of light in volumes
Lighting the Volumes
Multi-scatter (FLD) Combination Single-scatter
Click to edit Master title style
Multi-scatter
19/03/15 Page 42
- D. Koerner, J. Portsmouth, F. Sadlo, T. Ertl, B. Eberhardt:
Flux-Limited Diffusion for Multiple Scattering in Participating Media Computer Graphics Forum, vol. 33, no. 6, pp. 178-189, 2014.
Click to edit Master title style
Overview
Raymarch Voxelization Floodfilling Dilation & distance approximation Light Fields Raymarch User- controlled fractal evaluation Mesh Image Whispy Field
✔ ✔ ✔ ✔ ✔
Distance Field Noise Field
Click to edit Master title style
- Naïve approach:
- Prohibitively slow for real-time.
Real-time single scattering
Click to edit Master title style
- Exploit the fact that in-scattered irradiance can be separated from
primary ray absorption.
- Update only when lights are dirtied.
- March towards each light accumulating the irradiance into a separate
light buffer using compute shader.
- When raymarching – Use light buffer instead of marching to light.
Real-time single scattering
Click to edit Master title style
Overview
Raymarch Voxelization Floodfilling Dilation & distance approximation Light Fields Raymarch User- controlled fractal evaluation Mesh Image Distance Field Noise Field Whispy Field
✔ ✔ ✔ ✔ ✔ ✔
Click to edit Master title style
- Animation
- Other plugins for real-time editing of natural effects
- Integrate into later stages of the production pipeline