Unity Decal Framework
Decal Framework overview
Usually decals used to create bullet holes, blood splatters or burning of the explosions, but in some cases, the use goes beyond such things. In addition, decals can be created not only in the dynamics, but also during level development.
With decals walls of buildings can be uniquely decorate torn posters, cracks or patches of paint.You can use several types of blending to achieve a suitable result. To improve the visualization of decals you can use standard techniques of lighting, such as the bump mapping, parallax mapping and more. Parallax especially looks good as gives much more volume and allows such things as bullet holes go deeper into geometry.
This great framework allows you to create a decals in editor under development level design and in runtime. Make a design of your project more interesting and believable.
Static Decals. The system allows you to create static decals in editore during scene development. Create a decal just like prefab and then use it repeatedly. Convenient positioning system allows for one click to put a decal on specified point. Using standard tools of Unity, you can quickly and easily configure other options: decal size, rotation, etc. After creating a set of decals system allows to combine all the decals of a given type at a specified object in single mesh, this feature allows you to optimize the draw calls for maximum performance. Combining can also perform automatically before starting the level, you need only call one function in a library.
Static Skinned Decals. You can create not only simple but also skinned decals. You can quickly and simply give each of your characters necessary uniqueness simply by adding to it a few decals such as stains, blood, patches on clothing and scratches on the body and much more.
Dynamic Decals. Dynamic decals are decals that are created in runtime, such аs bullet holes, blood splatters, footprints. Our system allows you to create all these elements without which does not exist any serious project. For each dynamic decal is only necessary to call two functions from the library. The first creates a mesh decals, the second directly creates an object decals. The system monitors all created dynamic decals and controls their behaviour. Combining, randomization, and work with the texture atlas, destroing , fading. Combining the decals in runtime will reduce the draw calls to a minimum and to obtain high performance.
Dynamic Skinned Decals. Dynamic decals also can be skinned. You can easily create blood splatters or damage on your characters in runtime. The system can control the maximum number of decals on skinned object and quality of the skinning, 1,2,4 bones.
(NEW) Fluid Decals. You can create fluid decals like blood that flows down the walls.
Advanced. Often we need to create a decal on the surface that has bump mapping shader. If Decal has bump mapping shader by itself than we need for blending between the surface normal map and normal map of decals. Our system allows you to do this while preserving the original UV coords and tangential space of the source surface in decal mesh. To achieve the effect we provide several shaders which is a modification of Unity bump shader. All you need is either to use these shaders or write you own using our shader as an example , this is not so difficult.