• Stars
    star
    1,389
  • Rank 33,838 (Top 0.7 %)
  • Language
    C#
  • License
    MIT License
  • Created about 8 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mesh voxelization for Unity.

unity-voxel

Voxelize mesh algorithm in Unity. (includes GPU and CPU voxelizers.)

Demo

GPUVoxelParticleSystem

GPUVoxelParticleSystem

the Demo for GPU Particle with geometry shader. (only tested on windows10 (GTX 1060))

Inspired by Keijiro Takahashi works⚡️ StandardGeometryShader & KvantSpray

GPUVoxelMosaic

GPUVoxelMosaicLevels

GPUVoxelMosaic

the Demo to update the resolution of voxels in realtime. (only tested on windows10 (GTX 1060))

GPUVoxelSkinnedMesh

GPUVoxelSkinnedMesh

Sample a mesh from SkinnedRenderer in every frame and voxelize it in realtime.

the human model and animation from asset store.

Usage

with GPU Voxelizer (recommended)

GPUVoxelData data = GPUVoxelizer.Voxelize(
    voxelizer,  // ComputeShader (Voxelizer.compute)
    mesh,       // a target mesh
    64,         // # of voxels for largest AABB bounds
    true        // flag to fill in volume or not; if set flag to false, sample a surface only
);

// build voxel cubes integrated mesh
GetComponent<MeshFilter>().sharedMesh = VoxelMesh.Build(data.GetData(), data.UnitLength, useUV);

// build 3D texture represent a volume by voxels.
RenderTexture volumeTexture = GPUVoxelizer.BuildTexture3D(
  voxelizer,
  data,
  texture,    // Texture2D to color voxels based on uv coordinates in voxels
  RenderTextureFormat.ARGBFloat,
  FilterMode.Bilinear
);

// need to release a voxel buffer
data.Dispose();

with CPU Voxelizer

// Voxelize target mesh with CPU Voxelizer

List<Voxel> voxels = CPUVoxelizer.Voxelize(
    mesh,   // a target mesh
    20      // # of voxels for largest AABB bounds
);

Compatibility

Tested on Unity 2018.3.0f2, windows10 (GTX 1060), macOS (metal, not compatible with GPU Particle Demo).

Sources

More Repositories

1

unity-triangulation2D

Ruppert's Delaunay Refinement Algorithm in Unity
C#
554
star
2

unity-teddy

Teddy algorithm implementation in Unity.
C#
467
star
3

unity-procedural-tree

Procedural tree builder for Unity
C#
399
star
4

unity-volume-rendering

Volume rendering by object space raymarching for Unity
C#
394
star
5

CellularGrowth

GPU-based cellular growth simulation in Unity. 🧠
C#
264
star
6

unity-verlet-simulator

Simple verlet integration simulator for Unity.
C#
257
star
7

unity-procedural-flower

Procedural flower generator for Unity.
C#
231
star
8

unity-mesh-smoothing

Mesh smoothing algorithm for Unity.
C#
169
star
9

unity-subdivision-surface

Loop subdivision surface algorithm implementation in Unity.
C#
147
star
10

THREE.Fire

Ray tracing based procedural volumetric fire for three.js
JavaScript
133
star
11

unity-path-finding

Shortest path finding with Dijkstra's algorithm for Unity.
C#
119
star
12

unity-transform-control

Transform controller in Game View for Unity.
C#
119
star
13

Dendrite

GPU-based dendrite patterns generator with a space colonization algorithm in Unity.
C#
114
star
14

unity-optical-flow

A simple optical flow implementation by fragment shader for Unity.
HLSL
110
star
15

UNN

GPU-based neural network implementation in Unity.
C#
110
star
16

THREE.Tree

a Tree geometry generator for three.js.
JavaScript
110
star
17

unity-mesh-builder

Primitive mesh builder for Unity.
C#
108
star
18

unity-volume-sampler

Mesh volume sampler with voxelizer & 3D poisson disk sampling for Unity.
C#
105
star
19

PointCloudExplorer

PointCloudExplorer is an experimental project using point cloud data on Unity.
C#
104
star
20

unity-gpu-particle-system

GPU Particle System for Unity (require DirectX environment)
C#
97
star
21

unity-photo-particle-system

GPU Particle System (using Vertex Texture Fetch techniques) with Texture2DArray for Unity.
C#
88
star
22

unity-procedural-skinned-animator

Procedural skinned mesh animation 🐍 for Unity.
C#
83
star
23

ShibuyaCrowd

a webgl experiment that uses Shibuya city 3D models
JavaScript
74
star
24

unity-mesh-slicing

View-aligned mesh slicing for Unity.
C#
73
star
25

unity-intersections

3D intersection algorithm collections for Unity.
C#
70
star
26

unity-cellular-automaton-based-ink-simulation

2D Cellular automaton based ink simulation for Unity.
C#
70
star
27

WebVJ

a webgl experiment that uses web page structures as part of its visual effects
JavaScript
68
star
28

unity-lut-generator

LookUpTable generator for Unity.
C#
60
star
29

curvo

NURBS curve / surface modeling library for Rust.
Rust
60
star
30

unity-procedural-volumetric-fire

Unity implementation of Real-time procedural volumetric fire.
C#
59
star
31

unity-lbm-fluid-simulation

Lattice Boltzmann Method (LBM) fluid simulation for Unity.
GLSL
57
star
32

EvolvingVirtualCreatures

Karl Sims, Evolving Virtual Creatures by Unity.
C#
57
star
33

unity-mask-bloom

Mask by alpha channel bloom effect for Unity.
GLSL
54
star
34

mattatz.github.io

WebGL and Unity sketches.
JavaScript
54
star
35

unity-tubular

Tubular mesh (tube shape along a curve without torsion) builder for Unity.
C#
50
star
36

unity-immediate-color-picker

Color picker for Unity in immediate GUI mode
C#
41
star
37

Fit

Irregular bin packing library by JavaScript
JavaScript
38
star
38

unity-lbm-ink-simulation

Lattice Boltzmann Method (LBM) ink simulation for Unity.
GLSL
33
star
39

THREE.Watercolor

Watercolor effects for three.js.
JavaScript
31
star
40

THREE.BloomBlendPass

Bloom blend effect for three.js.
JavaScript
30
star
41

FastVoxelTraversalTest

Fast Voxel Traversal testing in Unity.
C#
28
star
42

THREE.Cloud

Ray tracing based cloud object for three.js.
JavaScript
26
star
43

ShibuyaSelfieCrowd

Crowds with Instagram selfies in Shibuya.
C#
25
star
44

Channel18

VJ set at CHANNEL#18 with Unity.
C#
22
star
45

unity-mrt-example

Multiple render targets without camera object for Unity.
C#
21
star
46

ofxGPUMarchingCubes

GPU marching cubes implementation for openFrameworks using a compute shader.
C++
18
star
47

FeedbackRendering3DTest

Feedback rendering with Texture3D testing in Unity.
C#
18
star
48

GPUMatrixMultiplicationTest

GPU matrix multiplication in Unity.
C#
18
star
49

DifferentialGeometryStudy

Study of differential geometry with Rust + WebGL
Rust
16
star
50

bevy_points

Point mesh plugin for Bevy
Rust
14
star
51

InteractiveCoding

Sketches for interactive coding group.
HLSL
13
star
52

bevy_curvo

Helper library for rendering curves and surfaces modeled with Curvo in Bevy.
Rust
13
star
53

unity-sketchbook

Sketching utility like Processing for Unity.
C#
12
star
54

unity-cuboid-line

Convert a line topology to a cuboid mesh with Geometry shader for Unity.
HLSL
11
star
55

processing-verttexgen

Vertex Texture Generator for Processing
Processing
8
star
56

unity-packing-clip

Screen clipping and packing clipped area for Unity.
C#
8
star
57

wgpu-wasm-test

a small sample of using wasm-pack to run wgpu with webgl backend.
Rust
8
star
58

bevy_normal_material

Simple normal material plugin for Bevy
Rust
6
star
59

ForceTouchOSC

Force touch trackpad (for Mac OSX 10.10.3 or later) OSC sender
Objective-C
6
star
60

GLSLMapper

C#
5
star
61

threejs-template

My three.js template.
JavaScript
2
star
62

FitServer

Fit implementation for Node.js
JavaScript
1
star