ランキングに戻る

diwi/PixelFlow

Javadiwi.github.io/PixelFlow

A Processing/Java library for high performance GPU-Computing (GLSL). Fluid Simulation + SoftBody Dynamics + Optical Flow + Rendering + Image Processing + Particle Systems + Physics +...

glslfluid-simulationcloth-simulationskylightprocessing-idesoftbody-dynamicspostprocessingopenglfiltersantialiasing
スター成長
スター
1.3k
フォーク
134
週間成長
Issue
17
5001k
2016年9月2019年12月2023年4月2026年7月
成果物Mavengit clone https://github.com/diwi/PixelFlow.git
README

PixelFlow Header

PixelFlow

A Processing/Java library for high performance GPU-Computing (GLSL).


Features

+ Fluid Simulation (GLSL)
    - Jos Stam, Real-Time Fluid Dynamics for Games
    - Particle Sytems
    - Flow Field Visualisation
    - Streamlines
    - ...
+ Flow Field Particles (GLSL)
    - Collision Detection, Particle <-> Particle
    - Collision Detection, Particle <-> Obstacle
    - Cohesion
    - Verlet Integration
    - FlowField/SDF(Signed Distance Field) based
    - Streamlines
    - ...
+ Softbody Dynamics (CPU, GLSL is coming)
    - 2D and 3D
    - Collision Detection
    - Cloth, Grids, Chains, Rigid Folding ...
    - Particle Systems
    - ...
+ Skylight Renderer (GLSL)
    - Interactive/Realtime Viewport Renderer
    - Ambient Occlusion
    - Diffuse Shading
    - ShadowMapping
    - ...
+ PostProcessing Filters (GLSL)
    - Box Blur
    - Binomial Blur
    - Gauss Blur
    - Gauss Blur Pyramid
    - Median
    - Bilateral Filter
    - Custom Convolution Kernel
    - DoG (Difference of Gaussian)
    - BackgroundSubtraction
    - Difference
    - Laplace
    - Sobel
    - Gamma Correction
    - Luminace
    - Thresholding
    - Harris Corner Detection
    - Optical Flow
    - Bloom
    - Depth of Field (DoF)
    - Liquid FX Filter
    - Summed Area Table (SAT)
    - Distance Transform (Jumpflood), Voronoi, Distance Map
    - Min/Max (global)
    - Min/Max (local)
    - Merge Shader
    - FlowField
    - Line Integral Convolution (LIC) / Streamlines
    - ...
+ AntiAliasing (GLSL)
    - MSAA (Processing Default)
    - FXAA
    - SMAA
    - GBAA/DEAA
+ Shadertoy (GLSL)
    - Wrapper for running existing Shadertoy sketches inside Processing.
+ Utils
    - HalfEdge
    - Subdivision Polyhedra
    - Sampling
    - GLSL-Shader PreProcessor (#define, #include)
    - GLSL-Shader Uniform Caching
    - ...

JavaDoc: http://thomasdiewald.com/processing/libraries/pixelflow/reference/index.html


Download


Videos / Examples / Demos / Applications

Skylight Renderer

alt text alt text alt text alt text alt text

Softbody Dynamics

alt text alt text alt text

Computational Fluid Dynamics

alt text alt text alt text alt text alt text alt text

Optical Flow

alt text alt text alt text

Flow Field Particle Simulation

alt text alt text alt text

Flow Field - LIC

alt text alt text

Realtime 2D Radiosity - Global Illumination (GI)

alt text alt text alt text alt text alt text alt text alt text

Space Syntax

alt text alt text alt text


More Videos on Vimeo.


Getting Started - Fluid Simulation


// FLUID SIMULATION EXAMPLE
import com.thomasdiewald.pixelflow.java.DwPixelFlow;
import com.thomasdiewald.pixelflow.java.fluid.DwFluid2D;

// fluid simulation
DwFluid2D fluid;

// render target
PGraphics2D pg_fluid;

public void setup() {
  size(800, 800, P2D);

  // library context
  DwPixelFlow context = new DwPixelFlow(this);

  // fluid simulation
  fluid = new DwFluid2D(context, width, height, 1);

  // some fluid parameters
  fluid.param.dissipation_velocity = 0.70f;
  fluid.param.dissipation_density  = 0.99f;

  // adding data to the fluid simulation
  fluid.addCallback_FluiData(new  DwFluid2D.FluidData() {
    public void update(DwFluid2D fluid) {
      if (mousePressed) {
        float px     = mouseX;
        float py     = height-mouseY;
        float vx     = (mouseX - pmouseX) * +15;
        float vy     = (mouseY - pmouseY) * -15;
        fluid.addVelocity(px, py, 14, vx, vy);
        fluid.addDensity (px, py, 20, 0.0f, 0.4f, 1.0f, 1.0f);
        fluid.addDensity (px, py, 8, 1.0f, 1.0f, 1.0f, 1.0f);
      }
    }
  });

  pg_fluid = (PGraphics2D) createGraphics(width, height, P2D);
}


public void draw() {    
  // update simulation
  fluid.update();

  // clear render target
  pg_fluid.beginDraw();
  pg_fluid.background(0);
  pg_fluid.endDraw();

  // render fluid stuff
  fluid.renderFluidTextures(pg_fluid, 0);

  // display
  image(pg_fluid, 0, 0);
}


Installation, Processing IDE

  • Download Processing 3

  • Install PixelFlow via the Library Manager.

  • Or manually, unzip and put the extracted PixelFlow folder into the libraries folder of your Processing sketches. Reference and examples are included in the PixelFlow folder.

  • Also make sure you have the latest graphics card driver installed!

Platforms

Windows, Linux, MacOSX


Dependencies, to run the examples


Processing/Java Alternatives

JRubyArt

JRubyArt is a ruby wrapper for processing by Martin Prout (monkstone)

関連リポジトリ
pixijs/pixijs

The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer.

TypeScriptnpmMIT Licensecanvas2dpixijs
pixijs.com
47.8k5k
lettier/3d-game-shaders-for-beginners

🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.

C++shaders3d
lettier.github.io/3d-game-shaders-for-beginners/index.html
19.8k1.5k
gpujs/gpu.js

GPU Accelerated JavaScript

JavaScriptnpmMIT Licensegpuwebgl
gpu.rocks
15.4k663
SaschaWillems/Vulkan

C++ examples for the Vulkan graphics API

GLSLMIT Licensevulkanvulkan-api
12.1k2.2k
fogleman/Craft

A simple Minecraft clone written in C using modern OpenGL (shaders).

CMIT Licensecopengl
michaelfogleman.com/craft/
11.1k1.4k
olive-editor/olive

Free open-source non-linear video editor

C++GNU General Public License v3.0cppcross-platform
olivevideoeditor.org
9.1k615
patriciogonzalezvivo/thebookofshaders

Step-by-step guide through the abstract and complex universe of Fragment Shaders.

GLSLOthershadersshader
thebookofshaders.com
7k752
RodZill4/material-maker

A procedural textures authoring and 3D model painting tool based on the Godot game engine

GDScriptMIT Licensegodotengineglsl
5.7k356
shader-slang/slang

Making it easier to work with shaders

C++Othershadershlsl
shader-slang.com
5.5k473
patriciogonzalezvivo/glslViewer

Console-based GLSL Sandbox for 2D/3D shaders

C++BSD 3-Clause "New" or "Revised" Licenseshadersfragment-shader
patriciogonzalezvivo.github.io/glslViewer/
5.3k371
crosire/reshade

A generic post-processing injector for games and video software.

C++BSD 3-Clause "New" or "Revised" Licensepost-processinginjector
reshade.me
5.3k678
gfxfundamentals/webgl-fundamentals

WebGL lessons that start with the basics

HTMLOtherwebglglsl
webglfundamentals.org
5k688