GithubHelp home page GithubHelp logo

enzocage / gpu-fluid-experiments Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haxiomic/gpu-fluid-experiments

0.0 2.0 0.0 8.44 MB

Experimenting coupling a CPU-based rigid body simulation with a GPU-based fluid simulation.

License: GNU General Public License v3.0

Haxe 84.22% C 13.91% CSS 1.86%

gpu-fluid-experiments's Introduction

#Cross-platform GPU fluid simulation

Experimenting coupling a CPU-based rigid body simulation with a GPU-based fluid simulation in OpenGL ES.

###Demo

(Rigid body integration is still in the works)

####Todo

  • Switch to MAC (staggerd) grid
  • Establish efficient pipeline for reading forces to CPU (via glReadPixels)

####Requires:

####Building Install haxe, then install the build tool aether from haxelib*

haxelib install aether

Then setup the aether command with

haxelib run aether setup

This creates an command alias so that aether executes haxelib run aether.

Next, make sure you've got the dependancies installed:

haxelib install lime
haxelib git gltoolbox https://github.com/haxiomic/GLToolbox.git
haxelib git shaderblox https://github.com/haxiomic/shaderblox.git

Now you should be good to go, cd into the gpu fluid directory and run

aether test html5

A browser should open with the result (test is aether's build and run command.)

* haxe just produces the javascript but aether handles the html template as well as the iOS and android project files when targeting mobile. Currently, lime is undergoing an overhaul so mobile targets are not working.


####Can I build for Desktop and mobile targets? Desktop yes, mobile not yet. The lime library isn't quite finished, so it's not a super smooth process, follow the instructions on lime's git page to build lime's native binaries and then run aether test mac or aether test windows or aether test linux. I've only tested the mac c++ build.

####Why haxe? I'd recommend reading this article on the topic io.pellucid.com/blog/the-benefits-of-transpiling-to-javascript. In this project, haxe is used to create a tight binding between the glsl and the host. This makes setting a glsl uniform straightforward, something like shader.coordinate.x = 0.5; instead of juggling uniform locations and whatnot.

gpu-fluid-experiments's People

Contributors

haxiomic avatar

Watchers

 avatar  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.