{"id":15034676,"url":"https://github.com/diwi/pixelflow","last_synced_at":"2025-04-12T21:28:05.702Z","repository":{"id":37470724,"uuid":"67459953","full_name":"diwi/PixelFlow","owner":"diwi","description":"A Processing/Java library for high performance GPU-Computing (GLSL). Fluid Simulation + SoftBody Dynamics + Optical Flow + Rendering + Image Processing + Particle Systems + Physics +...","archived":false,"fork":false,"pushed_at":"2018-01-10T18:06:29.000Z","size":36159,"stargazers_count":1261,"open_issues_count":17,"forks_count":131,"subscribers_count":80,"default_branch":"master","last_synced_at":"2025-04-04T01:07:28.674Z","etag":null,"topics":["antialiasing","cloth-simulation","filters","fluid-simulation","glsl","opengl","postprocessing","processing-ide","skylight","softbody-dynamics"],"latest_commit_sha":null,"homepage":"https://diwi.github.io/PixelFlow","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diwi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"Contributing Guidelines.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-06T00:43:03.000Z","updated_at":"2025-03-21T09:33:48.000Z","dependencies_parsed_at":"2022-08-09T22:40:10.832Z","dependency_job_id":null,"html_url":"https://github.com/diwi/PixelFlow","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diwi%2FPixelFlow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diwi%2FPixelFlow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diwi%2FPixelFlow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diwi%2FPixelFlow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diwi","download_url":"https://codeload.github.com/diwi/PixelFlow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248633877,"owners_count":21136927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antialiasing","cloth-simulation","filters","fluid-simulation","glsl","opengl","postprocessing","processing-ide","skylight","softbody-dynamics"],"created_at":"2024-09-24T20:25:59.081Z","updated_at":"2025-04-12T21:28:05.681Z","avatar_url":"https://github.com/diwi.png","language":"Java","readme":"![PixelFlow Header](http://thomasdiewald.com/processing/libraries/pixelflow/PixelFlow_header.jpg)\n\n# PixelFlow\n**A Processing/Java library for high performance GPU-Computing (GLSL).**\n\n\n\u003cbr\u003e\n\n## Features\n\n```\n+ Fluid Simulation (GLSL)\n    - Jos Stam, Real-Time Fluid Dynamics for Games\n    - Particle Sytems\n    - Flow Field Visualisation\n    - Streamlines\n    - ...\n+ Flow Field Particles (GLSL)\n    - Collision Detection, Particle \u003c-\u003e Particle\n    - Collision Detection, Particle \u003c-\u003e Obstacle\n    - Cohesion\n    - Verlet Integration\n    - FlowField/SDF(Signed Distance Field) based\n    - Streamlines\n    - ...\n+ Softbody Dynamics (CPU, GLSL is coming)\n    - 2D and 3D\n    - Collision Detection\n    - Cloth, Grids, Chains, Rigid Folding ...\n    - Particle Systems\n    - ...\n+ Skylight Renderer (GLSL)\n    - Interactive/Realtime Viewport Renderer\n    - Ambient Occlusion\n    - Diffuse Shading\n    - ShadowMapping\n    - ...\n+ PostProcessing Filters (GLSL)\n    - Box Blur\n    - Binomial Blur\n    - Gauss Blur\n    - Gauss Blur Pyramid\n    - Median\n    - Bilateral Filter\n    - Custom Convolution Kernel\n    - DoG (Difference of Gaussian)\n    - BackgroundSubtraction\n    - Difference\n    - Laplace\n    - Sobel\n    - Gamma Correction\n    - Luminace\n    - Thresholding\n    - Harris Corner Detection\n    - Optical Flow\n    - Bloom\n    - Depth of Field (DoF)\n    - Liquid FX Filter\n    - Summed Area Table (SAT)\n    - Distance Transform (Jumpflood), Voronoi, Distance Map\n    - Min/Max (global)\n    - Min/Max (local)\n    - Merge Shader\n    - FlowField\n    - Line Integral Convolution (LIC) / Streamlines\n    - ...\n+ AntiAliasing (GLSL)\n    - MSAA (Processing Default)\n    - FXAA\n    - SMAA\n    - GBAA/DEAA\n+ Shadertoy (GLSL)\n    - Wrapper for running existing Shadertoy sketches inside Processing.\n+ Utils\n    - HalfEdge\n    - Subdivision Polyhedra\n    - Sampling\n    - GLSL-Shader PreProcessor (#define, #include)\n    - GLSL-Shader Uniform Caching\n    - ...\n```  \n\n\nJavaDoc: http://thomasdiewald.com/processing/libraries/pixelflow/reference/index.html\n\n\u003cbr\u003e\n\n## Download\n+ [Releases](https://github.com/diwi/PixelFlow/releases)\n+ [PixelFlow Website](http://thomasdiewald.com/processing/libraries/pixelflow)\n+ Processing IDE -\u003e Library Manager\n \n\u003cbr\u003e\n\n## Videos / Examples / Demos / Applications\n\n#### Skylight Renderer\n[\u003cimg src=\"https://i.vimeocdn.com/video/661407332.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/238654801 \"Skylight Renderer - Ambient Occlusion / Soft Shadows\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/621790715.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/206696210 \"Skylight - Cloth Simulation\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/621791014.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/206696738 \"Skylight - Poisson Spheres\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/635968099.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/218485498 \"Rigid Body - Menger Sponge\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/627412633.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/211395605 \"Rigid Origami Simulation\")\n\n\n#### Softbody Dynamics\n[\u003cimg src=\"https://vimeo.com/184854758/og_image_watermark/59441739\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/184854758 \"SoftBody Dynamics 3D - Playground, Cloth Simulation\")\n[\u003cimg src=\"https://vimeo.com/184854746/og_image_watermark/594416647\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/184854746 \"SoftBody Dynamics 3D - Cloth Simulation\")\n[\u003cimg src=\"https://vimeo.com/184853892/og_image_watermark/594415861\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/184853892 \"SoftBody Dynamics 2D - Playground\")\n\n\n#### Computational Fluid Dynamics\n[\u003cimg src=\"https://vimeo.com/184850259/og_image_watermark/594412638\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/184850259 \"WindTunnel\")\n[\u003cimg src=\"https://vimeo.com/184850254/og_image_watermark/594412429\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/184850254 \"StreamLines\")\n[\u003cimg src=\"https://vimeo.com/184849960/og_image_watermark/594410553\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/184849960 \"Verlet Particle Collision System\")\n[\u003cimg src=\"https://vimeo.com/184849959/og_image_watermark/594412244\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/184849959 \"Fluid Particles\")\n[\u003cimg src=\"https://vimeo.com/184849892/og_image_watermark/594411994\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/184849892 \"Liquid Painting - M.C. Escher\")\n[\u003cimg src=\"https://vimeo.com/184849880/og_image_watermark/594411757\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/184849880 \"Liquid Text\")\n\n#### Optical Flow\n[\u003cimg src=\"https://i.vimeocdn.com/video/594413465.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/184850333 \"Optical Flow - Fluid Simulation - MovieClip\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/644816088.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/225484146 \"MovieWall\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/645059994.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/225671748 \"VoxelCapture\")\n\n#### Flow Field Particle Simulation\n[\u003cimg src=\"https://i.vimeocdn.com/video/659213047.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/236955859 \"Flow Field Particles - Trails HD\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/659220662.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/236964112 \"Flow Field Particles - Trails HD - 100K Particles\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/659039289.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/236821149 \"Flow Field Particles - DevDemo [R\u0026D]\")\n\n#### Flow Field - LIC\n[\u003cimg src=\"https://i.vimeocdn.com/video/660270815.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/237766186 \"LIC - WindTunnel\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/659919142.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/237491566 \"LIC - First Results\")\n\n#### Realtime 2D Radiosity - Global Illumination (GI)\n[\u003cimg src=\"https://i.vimeocdn.com/video/668126268.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/243877934 \"Tetris + Realtime Radiosity\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/668525007.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/244191105 \"Radiant Poisson Disks\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/646193678.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/226554155 \"Realtime GI - LiquidFun/Box2D\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/646483311.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/226784500 \"Realtime GI - LiquidFun/Box2D\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/646679859.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/226939350 \"Realtime GI - LiquidFun/Box2D\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/630695092.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/214264003 \"Realtime GI - Random Modelling\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/646490228.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/226790885 \"Realtime GI - Cornell Box\")\n\n#### Space Syntax\n\n[\u003cimg src=\"https://i.vimeocdn.com/video/648427506.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/228387816 \"SpaceSyntax - Realtime Local Evaluations\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/654202699.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/232981476 \"SpaceSyntax - Realtime Global Evaluations\")\n[\u003cimg src=\"https://i.vimeocdn.com/video/653671271.jpg\" alt=\"alt text\" width=\"30%\"\u003e](https://vimeo.com/232576820 \"FlowField Pathfinding - Particle Simulation\")\n\n\u003cbr\u003e\n\nMore Videos on [Vimeo](https://vimeo.com/user56436843).\n\n\u003cbr\u003e\n\n## Getting Started - Fluid Simulation\n\n\n```java\n\n// FLUID SIMULATION EXAMPLE\nimport com.thomasdiewald.pixelflow.java.DwPixelFlow;\nimport com.thomasdiewald.pixelflow.java.fluid.DwFluid2D;\n\n// fluid simulation\nDwFluid2D fluid;\n\n// render target\nPGraphics2D pg_fluid;\n\npublic void setup() {\n  size(800, 800, P2D);\n\n  // library context\n  DwPixelFlow context = new DwPixelFlow(this);\n\n  // fluid simulation\n  fluid = new DwFluid2D(context, width, height, 1);\n\n  // some fluid parameters\n  fluid.param.dissipation_velocity = 0.70f;\n  fluid.param.dissipation_density  = 0.99f;\n\n  // adding data to the fluid simulation\n  fluid.addCallback_FluiData(new  DwFluid2D.FluidData() {\n    public void update(DwFluid2D fluid) {\n      if (mousePressed) {\n        float px     = mouseX;\n        float py     = height-mouseY;\n        float vx     = (mouseX - pmouseX) * +15;\n        float vy     = (mouseY - pmouseY) * -15;\n        fluid.addVelocity(px, py, 14, vx, vy);\n        fluid.addDensity (px, py, 20, 0.0f, 0.4f, 1.0f, 1.0f);\n        fluid.addDensity (px, py, 8, 1.0f, 1.0f, 1.0f, 1.0f);\n      }\n    }\n  });\n\n  pg_fluid = (PGraphics2D) createGraphics(width, height, P2D);\n}\n\n\npublic void draw() {    \n  // update simulation\n  fluid.update();\n\n  // clear render target\n  pg_fluid.beginDraw();\n  pg_fluid.background(0);\n  pg_fluid.endDraw();\n\n  // render fluid stuff\n  fluid.renderFluidTextures(pg_fluid, 0);\n\n  // display\n  image(pg_fluid, 0, 0);\n}\n\n```\n\u003cbr\u003e\n\n\u003cbr\u003e\n\n## Installation, Processing IDE\n\n- Download [Processing 3](https://processing.org/download/?processing)\n- Install PixelFlow via the Library Manager.\n- 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. \n\n- Also make sure you have the latest graphics card driver installed!\n\n#### Platforms\nWindows, Linux, MacOSX\n\n\n\u003cbr\u003e\n\n## Dependencies, to run the examples\n\n - **Video, by the Processing Foundation**\u003cbr\u003e\n   https://processing.org/reference/libraries/video/index.html\n   \n - **ControlP5, by Andreas Schlegel**\u003cbr\u003e\n   http://www.sojamo.de/libraries/controlP5\n   \n - **PeasyCam, by Jonathan Feinberg**\u003cbr\u003e\n   http://mrfeinberg.com/peasycam\n\n - **HE_Mesh, by Frederik Vanhoutte**\u003cbr\u003e\n   https://github.com/wblut/HE_Mesh\n   \n\u003cbr\u003e\n\n## Processing/Java Alternatives\n\n### JRubyArt\n[JRubyArt](https://github.com/ruby-processing/JRubyArt) is a ruby wrapper for processing by [Martin Prout (monkstone)](https://github.com/monkstone)\n - Blog: https://monkstone.github.io/\n - Setup: http://ruby-processing.github.io/JRubyArt/\n - Demos: [JRubyArt Pixelflow Examples](https://github.com/ruby-processing/JRubyArt-examples/tree/master/external_library/java/PixelFlow)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiwi%2Fpixelflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiwi%2Fpixelflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiwi%2Fpixelflow/lists"}