Giter Site home page Giter Site logo

acskyline / wave-particles-with-interactive-vortices Goto Github PK

View Code? Open in Web Editor NEW
258.0 10.0 14.0 444.35 MB

A dx12 river renderer using wave particles with interactive vortices.

License: MIT License

C++ 68.66% C 11.30% HLSL 4.31% Batchfile 0.22% PHP 0.15% Pawn 14.51% Assembly 0.84%
directx12 imgui fluid-simulation wave-particles flow-map river water river-renderer

wave-particles-with-interactive-vortices's Introduction

Wave Particles with Interactive Vortices

Final Result

Overview

In game industry water can be divided into two domains, ocean and river. This project focuses on river. Not too long ago, a demo of a real-time river editor was developed by graphics programmer Jean-Philippe Grenier from Ubisoft(now Unity). We think what he did was awesome and want to replicate it (as possible as we can).

Traditionally, rivers are rendered using flow maps. Flow maps are generated by fluid simulations or created by artist or even both. Flow maps are used for advection of water properties such as normal and uv. This technique can give the river a deterministic fluid look, but it fails to capture the sense of height compared with the less controlled ocean rendering techniques, which basically stack several noise functions together to generate the waves. Stacking noise functions together only works for ocean because the ocean does not flow. When you want the water both flow and have the sense of height, a new method should be used.

(picture from Rendering rapids in Uncharted 4 by Carlos Gonzalez-Ochoa, Siggraph 2016 Advances in Real-Time Rendering in Games course)

The new method is Wave Particles. Initially, Wave Particles were introduced into game industry by Naughty Dog for Uncharted 3 to simulate local high frequency wave of oceans. Then it was adopted and adapted to render rivers by Naughty Dog for Uncharted 4 paired with stacking technique.

(picture from Implementing Wave Particles for Real-time Water Waves 2007)

The significance of the Jean-Philippe Grenier's work is that it generates flow map in real-time. That is why the user can interactively create rocks to block the river and affect the flow of river as we can see in the video. When performing advection on height and normal, previous implementations from Naughty Dog or Valve use noise and blending techniques to minimize repetition and pulsing caused by advection of a finite sized texture. But in this demo the developer used a new technique called Wave Profile Buffer to solve the repetition and pulsing.

(picture from Water Flow in Portal 2 by Alex Vlachos, Siggraph 2010 Advances in Real-Time Rendering course)

(picture from Rendering rapids in Uncharted 4 by Carlos Gonzalez-Ochoa, Siggraph 2016 Advances in Real-Time Rendering in Games course)

Goals

  • Simple wave particle rendering.

  • Combine wave particle with flow map.

  • Update flow map in real-time.

  • Identify and solve the problems caused by advection of height, uv, normal. (extra features)

Milestones

  • Milestone 1

    • DX12 frame work

      • Tessellation shader

      • Basic Interaction

      • Basic UI

    • Basic wave particle rendering

      • Single particle
  • Milestone 2

    • Advanced wave particle rendering

      • Multiple particles
    • Combine flow map with wave particle

      • Find some interesting flow maps

      • Use flow map to advect wave particle

    • Fluid simulation

  • Milestone 3

    • Improve rendering method

      • Foam
    • Update flow map in real-time

      • Create blockers (rocks and etc.)

      • Advect properties using simulation result

  • Final

    • Finish unfinished work

    • Identify the problems caused by advection of height, uv, normal

Milestone 1 Update

  • Camera Interaction

  • Wave Praticle Scale

  • Tessellation level

Milestone 2 Update

  • Radius

  • Speed

  • Wave particle with flow map

  • Flow map

  • Flow map driven texture

  • Wave particle

  • Horizontal blur

  • Vertical blur

  • Horizontal and vertical blur

  • Wave particle driven deviation

  • Fluid with different cell size

  • Fluid with different impulse location

  • Influence of fluid density/velocity dissipation

  • Flow map we will be using to guide the movement of wave particles

Milestone 3 Update

  • Specularity

  • Fluid sim with vorticity confinement

  • Divergence

  • Divergence as foam

  • Render with interactions

References

River Editor Water Simulation in Real-Time

Wave Particles Slides

Wave Particles Paper

Water Surface Wavelets

Uncharted 3 Ocean Rendering

Uncharted 4 River Rendering

Valve Flow Map

A 2D Fluid Solver

GPU Gems: Fast Fluid Dynamics Simulation on the GPU

A Similar Workflow

Caustics

wave-particles-with-interactive-vortices's People

Contributors

acskyline avatar lanlou123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wave-particles-with-interactive-vortices's Issues

License / Citation

Hi, great work here.

Have you imposed a license on the source material or the method? Being able to reference this would be really cool in future projects, but I don't see usage notes anywhere.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.