Git Product home page Git Product logo

realtimefluidrendering's Introduction

A screenshot of the program A screenshot of the program A screenshot of the program
A screenshot of the program A screenshot of the program A screenshot of the program

This is implementation of my i3D2018 paper "A Narrow-Range Filter for Screen-Space Fluid Rendering". It is not the one that used in my paper but has been written from scratch for demonstration purpose and depends heavily on many external libraries, especially Banana. Users should not expect to compile it by themselves but instead please download and run the provided binary (Windows x64) over the provided datasets.

Download

Brief Usage

Firstly, one need to download and extract the provided datasets. For loading data, there are two ways:

  • Modify the file "PlayList.txt" to the correct paths of the extracted data folders. Then just click into the corresponding line on the SimulationList window.
  • From the main window, click the open icon of the "Data Path" box at the lower left corner and select a data folder.

Then, using program for rendering particle data is very straighforward.

Textures

Skybox textures and floor textures are loaded from disk automatically at launching time. Users can modify textures to their own in the Textures folder. Note that each skybox texture needs to be put in a separate subfolder while all floor textures are put in the same folder.

Data Format

Users can generate their own dataset similar to the provided one. Each dataset is a folder which has the following structure:

viz_info.txt
FluidFrame
...frame.%4d.pos
...frame.%4d.ani
SolidFrame
...frame.%4d.pos

viz_info.txt file contains simulation (number of particles, particle radius etc) and rendering information (light position, camera position etc), which can be inferred easily from the existing examples.

FluidFrame/frame.%4d.pos files contain particle positions, which have the following format:

Bytes 0-3(unsigned int): number of particles of the current frame
Bytes 4-7(float): particle radius
Next (4 x 3 x numParticles) bytes: array of particle positions

FluidFrame/frame.%4d.ani files contain particle anisotropic kernels, generated using the algorithm in the paper "Reconstructing Surfaces of Particle-Based Fluids Using Anisotropic Kernels". These files are optional, and have the following format:

Bytes 0-3(unsigned int): number of particles of the current frame
Next (4 x 9 x numParticles) bytes: array of 3x3 matrices (anisotropic kernels)

SolidFrame/frame.%4d.pos files contain triangle mesh objects in the following format:

BYTE 0-3(unsigned int): number of meshes
For each mesh i in numMeshes:
    Next 4 bytes(unsigned int): number of vertices of mesh[i]
    Next (4 x 3 x numVerticesOfMesh[i]) bytes: array of vertex positions of mesh[i]
    Next (4 x 3 x numVerticesOfMesh[i]) bytes: array of vertex normals of mesh[i]

Happy coding!

realtimefluidrendering's People

Contributors

ttnghia avatar

Watchers

 avatar

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.