• Stars
    star
    2,963
  • Rank 15,284 (Top 0.4 %)
  • Language
    C#
  • License
    MIT License
  • Created about 8 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

Special Effects with Skinned Mesh in Unity

Skinner

gif gif

Skinner is a collection of special effects that use vertices of an animating skinned mesh as emitting points. It uses a special replacement shader to convert vertex positions into GPU-friendly data, and thus it avoids spending extra memory and CPU time for handling them (uses GPU resources instead).

Skinner Asset Types

Skinner provides some special asset types to preprocess relevant data.

Skinner Model

A Skinner model is a simplified variant of a mesh asset that only has vertices and skin weights. When converted from an original mesh, all the topological data of triangles is removed and overlapped vertices are stripped out.

Skinner Template

A Skinner template is a pre-built mesh asset that provides vertices and topological data to the effect renderers. For instance, a Skinner particle template has thousands of particle instances that are placed at the world origin; A Skinner particle renderer will move them at run time.

Skinner Component Classes

Skinner also provides some component classes to handle these assets during run time.

Skinner Source

The Skinner source component is a subsystem that converts a deformed skinned mesh into baked data. This data will be provided to multiple Skinner renderers.

Skinner Renderers

The Skinner renderer components are special types of mesh renderers that deform a Skinner template based on data provided from a Skinner source. Then it creates some interesting special effects.

How to Set Up

Install the package.

Download one of the unitypackage files from the Releases page and import it into a project.

Convert a skinned mesh into a Skinner model.

A skinned mesh has to be converted into a Skinner model in advance to be used in the Skinner system. This can be done from the context menu; click a mesh asset to select it, then choose Skinner -> Convert Mesh from the right click menu.

Note that the mesh asset is usually located inside an fbx file. A few extra clicks are needed to select it. See the GIF below.

gif

Set up a character as usual.

Drag and drop a character prefab into the scene.

Attach a Skinner source to a skinned mesh renderer.

Add a Skinner source component to the game object that has a skinned mesh renderer component. Then set the Skinner model converted in the previous step to the model property.

screenshot

This Skinner source will override the skinned mesh renderer and then use it to convert vertex data. Note that this character will disappear from the scene, because it will be exclusively used for vertex conversion. If it has to stay visible, another instance of the same character should be added to the scene as a substitution.

Create a Skinner renderer object.

Create an empty game object and add one of the Skinner renderer components to it. Then set the source property in it to refer to the Skinner source object created in the previous step.

For starters, it's recommended to use the Skinner debug component that simply visualizes the vertex data provided from the source. If it shows nothing, there may be something wrong in the previous steps.

Skinner Renderer Components

Currently, the Skinner package provides four types of renderers.

Skinner Debug

gif

The Skinner debug renderer simply visualizes vertex data provided from a source.

This component doesn't need a template asset.

Skinner Glitch

gif

The Skinner glitch renderer draws triangles between randomly choosing vertices in a source. Although the number of triangles is fixed (21,845 triangles), triangles with long edges or a large area will be pulled out to maintain the silhouette. This behavior can be controlled by the threshold properties of the component.

This component doesn't need a template asset.

Skinner Particle

gif

The Skinner particle is a particle system that emits particles from vertices in a source. Several parameters (duration, rotation, etc) of each particle can be changed according to the speed of vertices, and thus it can be used to give some emphasis to character movement and trajectory.

The shapes of particles are defined in a Skinner particle template asset. Any shape can be used in a template, but it's recommended to use meshes with the very low poly count because the number of particle instances is determined from the number of vertices in the shapes (low poly == more particles!).

Skinner Trail

gif

The Skinner trail renderer draws trail lines from vertices in a source. The width of the lines can be changed according to the speed of vertices, and thus it can be used to give emphasis to movement too.

The length of the trail lines is pre-determined in a Skinner trail template asset. The number of lines is also pre-determined by its length. The longer the lines are, the fewer lines are drawn.

Compatibility

At the moment Skinner is only tested on Windows, macOS and iOS (metal). Possibly it runs on PS4 and Xboxone, but not sure about GLES3 and WebGL.

License

MIT

More Repositories

1

AICommand

ChatGPT integration with Unity Editor
C#
3,520
star
2

KinoGlitch

Video glitch effects for Unity
C#
2,256
star
3

AIShader

ChatGPT-powered shader generator for Unity
C#
1,916
star
4

Klak

Creative coding library for Unity
C#
1,753
star
5

Kino

A collection of custom post processing effects for Unity
C#
1,715
star
6

Voxelman

Unity ECS + C# Job System example
C#
1,504
star
7

Lasp

Low-latency Audio Signal Processing plugin for Unity
C#
1,369
star
8

Pcx

Point cloud importer & renderer for Unity
C#
1,187
star
9

TestbedHDRP

Testbed project for Unity HDRP (High Definition Render Pipeline)
ShaderLab
1,157
star
10

KvantSpray

Object instancing/particle animation system for Unity
C#
1,151
star
11

ShaderGraphExamples

Simple examples of Unity shader graphs.
C#
1,082
star
12

NoiseShader

Noise shader library for Unity
HLSL
1,019
star
13

Pix2Pix

Real-time pix2pix implementation with Unity
C#
1,013
star
14

Reaktion

Audio reactive animation toolkit for Unity
C#
983
star
15

Smrvfx

Skinned mesh sampling with VFX Graph
961
star
16

KinoBloom

Bloom effect for Unity
C#
898
star
17

StableFluids

A straightforward GPU implementation of Jos Stam's "Stable Fluids" on Unity.
C#
880
star
18

FFmpegOut

Video capture plugin for Unity with FFmpeg.
C#
869
star
19

KinoFog

Global fog effect for Unity
C#
842
star
20

PuppetTest

An experiment in procedural dance animation
C#
823
star
21

SdfVfxSamples

Unity VFX Graph samples with SDF (signed distance field)
733
star
22

HdrpVatExample

VAT (Vertex Animation Texture) with Unity Shader Graph and Visual Effect Graph
HLSL
730
star
23

Retro3D

A shader that imitates low grade 3D graphics.
C#
715
star
24

Rsvfx

An example that shows how to connect RealSense depth camera to Unity VFX Graph
C#
699
star
25

KlakNDI

NewTek NDIâ„¢ plugin for Unity
C#
674
star
26

MidiJack

MIDI input plugin for Unity
C#
665
star
27

Swarm

An example of use of compute shaders and procedural instancing.
C#
643
star
28

KinoMotion

Motion blur post-processing effect for Unity
C#
624
star
29

ShaderSketches

KodeLife shader sketches I wrote while commuting
GLSL
600
star
30

KlakSpout

Spout plugin for Unity
C++
557
star
31

Firefly

Unity ECS example for special effects
C#
546
star
32

LaspVfx

Audio reactive Unity VFX with LASP
C#
529
star
33

Akvfx

Azure Kinect plugin for Unity VFX Graph
C#
517
star
34

KvantWig

Non-realistic hair simulation in Unity
C#
515
star
35

UnitySkyboxShaders

Custom skybox shaders
JavaScript
515
star
36

KvantGrass

Animating grass shader for Unity
C#
498
star
37

TimelineParticleControl

An example of controlling particle system from timeline.
C#
496
star
38

MiniEngineAO

SSAO image effect from Microsoft MiniEngine, ported to Unity.
C#
496
star
39

Minis

Minis: MIDI Input for New Input System -- A plugin that adds MIDI input support to Unity's new Input System
C#
486
star
40

SkeletalGeometricEffects

Experiments on geometry shader instancing with skeletal animations
HLSL
472
star
41

UnityMLStableDiffusion

Core ML Stable Diffusion on Unity
C#
469
star
42

BibcamVfx

AR VFX samples with Bibcam (burnt-in barcode metadata camera)
C#
469
star
43

RippleEffect

Water surface ripple effect for Unity
C#
466
star
44

KinoContour

Contour line filter for Unity
C#
462
star
45

Flipbook

Flip book effect example for Unity
C#
456
star
46

CloudSkybox

Skybox shader with volumetric clouds
C#
442
star
47

OscJack

Lightweight C# implementation of OSC server/client
C#
438
star
48

DepthInverseProjection

An example showing how to inverse-project depth samples into the view/world space in Unity.
ShaderLab
431
star
49

HandPoseBarracuda

Hand and finger tracking solution (MediaPipe Hands) for Unity Barracuda
C#
423
star
50

Bibcam

Burnt-in barcode metadata camera
C#
419
star
51

FaceMeshBarracuda

Lightweight facial capture package for Unity
C#
416
star
52

KinoAqua

Watercolor effect for Unity URP/HDRP
C#
410
star
53

Retro3DPipeline

A minimal example of a custom render pipeline with the Retro3D shader.
C#
405
star
54

unity-dither4444

AssetPostProcessor for making high-quality 16-bit color textures in Unity.
C#
402
star
55

SonarFx

Sonar effect for Unity
C#
398
star
56

MidiAnimationTrack

SMF (.mid) file importer for Unity Timeline
C#
388
star
57

SkyboxPlus

Basic skybox extensions for Unity
C#
383
star
58

CosineGradient

Cosine gradient generator for Unity
C#
374
star
59

KinoBokeh

Depth of field effect for Unity
C#
373
star
60

ProceduralMotionTrack

Simple procedural motion with Unity Timeline.
C#
369
star
61

Rcam2

Remote depth camera with iPad Pro with LiDAR sensor
C#
367
star
62

AsyncCaptureTest

Non-blocking screen capture example with asynchronous GPU readback
C#
366
star
63

KvantSwarm

Flowing line renderer for Unity
C#
354
star
64

ShadowDrawer

Shadow matte shader for Unity
ShaderLab
354
star
65

StandardGeometryShader

An example of a geometry shader with Unity's standard lighting model support.
HLSL
349
star
66

KvantStream

A simple GPU particle system for Unity
C#
343
star
67

PerlinNoise

1D/2D/3D Perlin noise function for Unity
C#
340
star
68

GeoVfx

Examples of geographical data visualization with Unity VFX Graph
C#
333
star
69

ComputeMarchingCubes

[Unity] GPU-optimized marching cubes isosurface reconstruction
C#
322
star
70

Metamesh

Unity primitive mesh generator as an asset importer
C#
312
star
71

Ngx

Ngx - Neural network based visual generator and mixer
C#
311
star
72

KvantWall

GPU accelerated object array animator for Unity
C#
311
star
73

VfxGraphTestbed

My testbed for Unity VFX Graph
HLSL
311
star
74

KlakHap

HAP video player plugin for Unity
C++
309
star
75

StandardTriplanar

Unity's standard shader with triplanar mapping
ShaderLab
303
star
76

WfcMaze

WFC (Wave Function Collapse) with Unity
C#
295
star
77

RDSystem

Reaction-diffusion system with CustomRenderTexture.
C#
294
star
78

NoiseBall

Mesh deforming shader example (Unity)
C#
291
star
79

Prisma

Pepper's ghost live visuals for VRDG #4
C#
285
star
80

KvantLattice

A GPU accelerated fractal terrain renderer for Unity
C#
281
star
81

ChromaPack

ChromaPack -- A lossy texture compression plugin for Unity.
C#
277
star
82

Cloner

An example of use of procedural instancing.
C#
277
star
83

VideoPlayerEffects

Experimental special effects for VideoPlayer (Unity 5.6 new feature)
C#
275
star
84

NoiseBall2

A small example of procedural modeling with compute shaders.
C#
269
star
85

PostProcessingUtilities

Utility scripts for the post processing stack
C#
263
star
86

Metatex

Metadata-only texture importer for Unity
C#
261
star
87

ContactShadows

Experimental implementation of contact shadows for Unity.
C#
257
star
88

ColorSuite

Multifunctional color adjustment plugin for Unity.
C#
257
star
89

UnityDxrTest

A testbed project for Unity real-time ray tracing features
C#
256
star
90

NNCam

Virtual background with Unity Barracuda
C#
229
star
91

VfxPyro

Fireworks particle effect with Unity VFX Graph
C#
228
star
92

Dkvfx

An example that shows how to use recorded Depthkit footage with Unity VFX Graph
C#
226
star
93

CrossFadingLod

(Unity) Cross-fading LOD shader example
ShaderLab
225
star
94

Boids

Flocking behavior simulation (Unity)
C#
224
star
95

MoonAndEarth

Moon and Earth assets for Unity
C#
223
star
96

KinoBinary

Binary image effect for Unity
C#
220
star
97

UnityAnime4K

Anime4K upscaler for Unity
HLSL
216
star
98

VideolabTest

OP-Z videolab examples
ShaderLab
209
star
99

GVoxelizer

HLSL
206
star
100

KlakSyphon

Syphon plugin for Unity
Objective-C
203
star