Skip to content

A voxel-based wind system for Unity with high quality and performance.

License

Notifications You must be signed in to change notification settings

misakieku/VoxelWind

Repository files navigation

Voxel Wind

A voxel-based wind system for Unity with high quality and performance. This project is inspired by the Wind Simulation in God of War

Documentation is underway.

About Voxel Wind

The Voxel-Based Wind Simulation System is an advanced computational model designed to simulate and visualize the complex behaviors of wind currents within a three-dimensional space. Utilizing a grid of voxels, this system meticulously calculates the movement of air through various environments, accounting for factors such as direction, speed, and interactions with obstacles and local wind zones.

Voxel wind system solves the mathematically complex problem of simulating wind in a way that is both visually appealing and computationally efficient. By breaking down the environment into a grid of voxels, the system can accurately model the movement of air through space, creating realistic wind currents that interact with the environment naturally and dynamically.

This package is developed under HDRP but should work with other render pipelines as well since it doesn't rely on any specific rendering features.

Preview

Installation

Go to Window->Package Manager, click on the + sign, and Add from git: https://github.com/misakieku/VoxelWind.git

Getting Started

  1. Import the Voxel Wind package into your Unity project.
  2. Add the Voxel Wind component to your scene.
  3. Adjust the settings to customize the wind simulation.

Package Dependency

  1. Burst
  2. Mathematics

Features

  • CPU simulation using burst compiler.
  • GPU simulation using compute shader.
  • Debug visualization.
  • 3D render texture packing for CPU simulation.
  • Global wind motor.
  • Local wind motor.
  • Nice editor.
  • Performance optimization.
  • Function for shader sampling.
  • Pressure simulation.

Performance

Benchmark Settings

  • Voxel Size: 1
  • Grid Size: 32x16x32
  • Voxel Count: 16384
  • Global Wind Motor: 3
    • Directional Wind: 1
    • Turbulence: 2
  • Local Wind Motor: 1
    • Vortex: 1
  • Wind Collider: 1

CPU Simulation

Benckmark device: Windows 11 PC with an Intel Core i7-13700k CPU

CPUPerformance-13700k

Benckmark device: Windows 10 PC with an AMD Ryzen 5 2600 CPU

CPUPerformance-2600

GPU Simulation

Benckmark device: Windows 11 PC with a Nvdia RTX 4070ti GPU GPUPerformance-4070ti

Benckmark device: Windows 10 PC with a Nvdia GTX 1660 GPU

GPUPerformance-1660

About

A voxel-based wind system for Unity with high quality and performance.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published