• Stars
    star
    155
  • Rank 240,864 (Top 5 %)
  • Language ShaderLab
  • License
    MIT License
  • Created over 4 years ago
  • Updated about 1 month ago

Reviews

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

Repository Details

An example of rendering decals on SkinnedMesh Renderers in Unity.

Unity Skinned Mesh Renderer Decals

openupm

An example of how to create efficient projected decals on moving skinned meshes. This should work on all render pipelines, though HDRP is what this project is built on.

some decals

Usage

  1. Install the SkinnedMeshDecals package by adding https://github.com/naelstrof/SkinnedMeshDecals.git#upm through the Package Manager's "Add package from git URL". (Or use the openupm badge above.)
  2. Install the relevant Shaders unity package based on which render system you're using. unity package display
  3. Enable "Lightmap generation" in the target models' import settings, or ensure that models have atlased uv2s so that decals can be mapped to any part of the mesh.
  4. Apply a material to the target model's mesh that has a _DecalColorMap input, and uses UV2 only for the _DecalColorMap. I use AmplifyShaderEditor to create the shaders for it, this is the only pipeline dependant part! You can also simply use one of the URP, HDRP, or Standard shader examples that are included in the package's Shaders folder.
  5. Ensure your decal textures, the ones that you'll be splattering, each have mipmapping disabled, and have texture wrap set to clamped. This is important! Otherwise the decals will cover the whole model.
  6. Create a script that calls SkinnedMeshDecals.PaintDecal.RenderDecal(...) with the target being one of the renderers you've set up. It should let you draw decals!

Installation

You can install this package either by adding by adding https://github.com/naelstrof/SkinnedMeshDecals.git#upm through the Package Manager's "Add package from git URL" or by using the openupm badge above.

Detailed explanation

This patreon post and the youtube video below describe all the technologies used here really well:

https://www.patreon.com/posts/skinned-mesh-22015350

https://www.youtube.com/watch?v=c7HBxBfCsas

More Repositories

1

maim

maim (make image) takes screenshots of your desktop. It has options to take only a region, and relies on slop to query for regions. maim is supposed to be an improved scrot.
C++
2,153
star
2

slop

slop (Select Operation) is an application that queries for a selection from the user and prints the region to stdout.
C++
869
star
3

UnityJigglePhysics

A unity addon for adding stretchy bouncy physics to bones and meshes.
ShaderLab
285
star
4

VRPlayspaceMover

A little app that lets you adjust your play-space by gripping the universe!
C++
159
star
5

UnityPenetrationTech

A gpu-based deformation system for mapping penetrators along orifice paths.
ShaderLab
107
star
6

KoboldKare

A public repo for the game KoboldKare
C#
85
star
7

UnitySourceTools

Some tools that I use to port source maps to Unity.
C#
32
star
8

ShapedAudioReverbZones

A Unity implementation for arbitrarily shaped Reverb Zones.
C#
24
star
9

URPUnityTerrainTools

Some brush-based tools for creating terrains in Unity. WIP
ShaderLab
11
star
10

ChurnVectorSDK

Tools to develop characters and maps for Churn Vector.
ShaderLab
10
star
11

astrostructlove

A SS13 clone designed on the Love2D framework with proper networking.
Lua
7
star
12

UnityBehaviorTreeImplementation

An example of how to implement behavior trees within Unity.
C#
7
star
13

slop-python

Slop bindings for python3. Requires slop: https://github.com/naelstrof/slop
C
5
star
14

DynamicPenetrationForGames

Tools that assist with penetration in the Unity Engine.
ShaderLab
5
star
15

invictus

Hobby engine built using SFML.
C++
5
star
16

UnityMozzarellaTech

Some gpu related experiments involving mozzarella somewhat.
ShaderLab
4
star
17

VRCLipSyncOSC

A lightweight C++ implementation of VRChat lip sync. Uses lua to configure.
C++
4
star
18

auto-usb-arch-scripts

Mainly for personal use, I take no responsibility!
Shell
4
star
19

astrostructlove2

Another prototype for my game engine.
Lua
3
star
20

PugBot-Discord-Django

UT4Pugs.us pugbot
JavaScript
3
star
21

liveamp

Flashes your desktop wallpaper to music currently playing!
C++
3
star
22

wallpaper-post-processor

scans a directory for images to collage into appropriately sized desktop wallpapers. Uses OpenCV AI to upscale and match resolutions between photos.
Rust
3
star
23

com.naelstrof.inflatable

A limited tween solution for making body parts go boowomp in my games. For personal use.
C#
3
star
24

com.naelstrof.easing

A library of MIT easing function implementations for Unity.
C#
3
star
25

com.naelstrof.splines

Crude tools to do math on splines.
C#
2
star
26

UnityScriptableSettings

A tool to help with creating, localizing, and subscribing to serializable user preferences.
ShaderLab
2
star
27

2420-C-Sharp-Sorts-and-Data-Structures

Homework Assignments
C#
2
star
28

Pong

For my buddy max <3
C++
2
star
29

GodotJigglePhysics

Messing around porting jiggle physics from unity to godot.
C#
2
star
30

quadtrees

C++
2
star
31

SpaceJanitor

A machinima production for EAE 3660-02.
2
star
32

omnichem

Chemistry buddy for goonchem :honk:
JavaScript
2
star
33

Syme

Another iteration of the many game engines I'm working on. This one in particular has a 2D focus and relies on SFML for pretty much everything.
C++
2
star
34

com.naelstrof.orbitcam

A data-driven programmable camera solution for Unity. Just for personal use.
C#
1
star
35

com.naelstrof.extensions

A collection of extension methods that I use in my games.
C#
1
star
36

UnityFlocking

A tool designed to help you add foliage to scenes.
GLSL
1
star
37

com.naelstrof.projectiles

A tool that will help shoot a projectile on an intersection course.
C#
1
star
38

2420-DingoDanger

Another homework assignment, this time a GAME!
C#
1
star
39

BodegaBash

Game WIP
Mathematica
1
star
40

PlayerModelServer

precaches player models for players to download on join, without editing res files.
AngelScript
1
star
41

ChurnVectorModdingExample

A project set up to allow for easy modding of Churn Vector.
ShaderLab
1
star
42

laser_pointer

Lets you point at people's screen remotely.
Rust
1
star