YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Particri (ุจุงุฑุชูŠูƒุฑูŠ) ๐ŸŒŸ

Ultra-High-Performance C++ & Python Procedural Particle Engine

Particri is a professional particle simulation and procedural rendering library designed to generate photorealistic and stylized visual particle effects with infinite styles. It combines a blazing fast C++20 physics and rasterization core (integrated with FastNoiseLite) with a clean, expressive Python API.


๐Ÿ“ธ Reference Styles & Visual Capabilities

The engine is engineered from the ground up to synthesize every visual aesthetic shown below:

  • Golden Diamond Stars & Sparkles (ุงู„ุจุฑูŠู‚ ูˆุงู„ู†ุฌูˆู… ุงู„ู…ุงุณูŠุฉ): 4-point & 8-point diffraction spikes with glowing cores.
  • Soft Floating Bokeh (ุฏูˆุงุฆุฑ ุงู„ุจูˆูƒูŠู‡ ุงู„ุนุงุฆู…ุฉ): Optical out-of-focus discs with smooth chromatic falloff.
  • Starburst Nova Clusters (ุงู„ุนู†ุงู‚ูŠุฏ ูˆุงู„ุงู†ูุฌุงุฑุงุช ุงู„ู†ุฌู…ูŠุฉ): Dense concentrated bursts of sparkling energy.
  • Cosmic Nebula Stardust (ุงู„ุณุฏู… ูˆุงู„ุบุจุงุฑ ุงู„ูƒูˆู†ูŠ): Organic fluid-like turbulence powered by divergence-free Curl Noise.
  • Anamorphic Light Streaks (ุฎุทูˆุท ุงู„ุถูˆุก ูˆุงู„ุณุฑุนุฉ): Directional velocity-aligned motion trails and lens flares.
  • Luxury Glitter Texture (ู†ุณูŠุฌ ุงู„ุฌู„ูŠุชุฑ ุงู„ู…ุชู„ุฃู„ุฆ): Microscopic faceted crystals with high-frequency specular twinkle.

โšก Key Architectural Features

  1. C++20 High-Performance Core:
    • Vectorized math engine with SIMD operations.
    • Header-only integration with FastNoiseLite for 3D OpenSimplex2 and Fractal Brown Noise.
    • True 2D Curl Noise computation: guarantees $\nabla \cdot \vec{v} = 0$ (incompressible fluid motion) so particles swirl naturally without clumping.
  2. Procedural Light Sprite Synthesis:
    • Mathematical sprites generated on-the-fly: Star4, Star8, Bokeh, Halo, Streak, Glitter.
    • No external image dependencies required for sprites.
  3. Multi-Pass Optical Bloom & HDR Pipeline:
    • HDR floating-point accumulation buffer.
    • Multi-scale separable Gaussian bloom for dreamy, cinematic halos.
    • Reinhard tone mapping preserving rich warm hues at peak luminance.
  4. Infinite Styles Generator:
    • Procedural color harmony synthesis (Golden Ratio, Complementary, Triadic).
    • Random seedable configurations allowing generation of thousands of unique particle styles.
  5. Zero-Copy NumPy Interoperability:
    • Direct memory view buffer exchange with Python.
    • Instant export to transparent PNG, WebP, animated GIF, and MP4 video.
  6. Real-Time Interactive Studio:
    • 60 FPS live viewer with interactive emitter controls and instant preset switching.
  7. Trapcode Particular VFX Systems:
    • Auxiliary (Aux) System: Parent particles emit trailing child sparkles and death bursts.
    • Layer Mask Emitter: Emits particles from image masks and logos with pixel color inheritance.
    • Floor/Wall Bounce Physics: Realistic elastic rebound and surface friction against boundary planes.
    • Curves Over Life: Dynamic mathematical graphs (Bell curve, GrowAndFade, Pulse, Decay, EaseInOut).

๐Ÿš€ Quick Start & Usage

1. Generating Golden Sparkles (Reference Panel 2)

import particri

# Initialize golden sparkles preset
engine = particri.Presets.golden_sparkles(width=1920, height=1080, density=1.2)

# Warmup simulation for natural dispersal
engine.warmup(duration=2.0)

# Render with optical bloom
frame = engine.render(bloom=True, bloom_intensity=0.85)

# Save as transparent 32-bit RGBA PNG
particri.Exporter.save_image(frame, "golden_sparkles.png")

2. Generating Infinite Procedural Styles

import particri

# Generate a unique style from any random seed
engine = particri.StyleGenerator.create(
    seed=777,
    width=1920,
    height=1080,
    palette_name="emerald",  # Options: 'gold', 'cosmic', 'solar', 'emerald', 'rose', 'cyberpunk', 'diamond', or None (procedural)
    motion_type="swirl",     # Options: 'swirl', 'burst', 'drift', 'vortex', 'rain', 'cosmic'
)

engine.warmup(2.0)
frame = engine.render()
particri.Exporter.save_image(frame, "unique_style_777.png")

3. Exporting 60 FPS Video (MP4) or Animated GIF

import particri

engine = particri.Presets.starburst_cluster(width=1280, height=720)

# Export MP4 video
particri.Exporter.save_video(engine, "starburst.mp4", duration=3.0, fps=60)

# Export animated GIF
particri.Exporter.save_gif(engine, "starburst.gif", duration=2.0, fps=25)

4. Real-Time Interactive Studio

from particri import Studio

# Launch real-time studio
# Controls: [1-5] Presets | [6] New Infinite Style | [SPACE] Burst | [B] Bloom | [S] Screenshot
Studio.launch()

๐Ÿ“ Project Structure

particri/
โ”œโ”€โ”€ include/
โ”‚   โ”œโ”€โ”€ FastNoiseLite.h         # FastNoiseLite C++ noise library
โ”‚   โ””โ”€โ”€ particri/
โ”‚       โ”œโ”€โ”€ math.hpp            # Vec2, Vec3, Color4, Random
โ”‚       โ”œโ”€โ”€ particle.hpp        # Particle struct, shapes, blend modes
โ”‚       โ”œโ”€โ”€ forces.hpp          # CurlNoise, Vortex, Gravity, Drag, Attractor
โ”‚       โ”œโ”€โ”€ emitter.hpp         # Point, Circle, Ring, Box, Line emitters
โ”‚       โ”œโ”€โ”€ shapes.hpp          # Procedural mathematical sprite generator
โ”‚       โ”œโ”€โ”€ rasterizer.hpp      # HDR rasterizer & blend modes
โ”‚       โ”œโ”€โ”€ bloom.hpp           # Multi-pass optical bloom filter
โ”‚       โ””โ”€โ”€ system.hpp          # ParticleSystem coordinator
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ bindings.cpp            # Pybind11 C++ module bindings
โ”œโ”€โ”€ particri/                   # Python package
โ”‚   โ”œโ”€โ”€ __init__.py             # Top-level module exports
โ”‚   โ”œโ”€โ”€ core.py                 # ParticleEngine Python API
โ”‚   โ”œโ”€โ”€ presets.py              # Reference image & luxury presets
โ”‚   โ”œโ”€โ”€ styles.py               # Infinite procedural style generator
โ”‚   โ”œโ”€โ”€ exporter.py             # PNG, WebP, MP4, GIF exporters
โ”‚   โ””โ”€โ”€ studio.py               # Interactive real-time Pygame viewer
โ”œโ”€โ”€ examples/                   # Standalone runnable scripts
โ”‚   โ”œโ”€โ”€ 01_golden_sparkles.py
โ”‚   โ”œโ”€โ”€ 02_starburst_nova.py
โ”‚   โ”œโ”€โ”€ 03_cosmic_nebula.py
โ”‚   โ”œโ”€โ”€ 04_light_streaks.py
โ”‚   โ”œโ”€โ”€ 05_glitter_field.py
โ”‚   โ”œโ”€โ”€ 06_infinite_styles_demo.py
โ”‚   โ”œโ”€โ”€ 07_export_video.py
โ”‚   โ””โ”€โ”€ 08_reference_replica_grid.py
โ”œโ”€โ”€ tests/
โ”‚   โ””โ”€โ”€ test_particri.py        # Complete pytest suite
โ”œโ”€โ”€ CMakeLists.txt
โ”œโ”€โ”€ setup.py
โ””โ”€โ”€ pyproject.toml

๐Ÿงช Testing

Run the automated test suite:

pytest tests/ -v

All tests verify physics simulation, emitters, force fields, blend modes, presets, procedural style synthesis, and image exports.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support