Search Unity

Skinned Decals

Discussion in 'Assets and Asset Store' started by phosphorous_, Dec 13, 2018.

  1. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    Hey,

    we just released an editor extension called Skinned Decals on the asset store. It is a solution for mesh-based decals overlayed on any character (using one or multiple Skinned Mesh Renderers) during gameplay or in the editor. The characters do not need a collider, you add a decal by providing a ray where the decal is projected on to the character. The system uses the snapshot of the current pose to create the decal mesh.

    Summary:
    • Easy way to add decals such as bullet holes on your characters (add one component and one line of code).
    • Doesn't require any colliders on the character.
    • The decals follow animation exactly like the source skinned mesh.
    • Possible to use complex shaders with parallax, tessellation etc. to create depth for the decals (shaders and decal textures are included)
    • Multithreading is included as an option for runtime generation, performance depends on the underlying mesh complexity.
    Let me know what you think or ask if you have any questions!

    ASSET STORE LINK: http://u3d.as/1nCA


    MANUAL

    Creating decals in the editor:


    Runtime demo video:


    --

    Description from the Asset Store:

    You need a way to show effects on your character model such as damage, bullet holes, scratches, stains, dirt and more. Skinned Decals will allow you to add impressive decals to your characters during gameplay (and editor) with ease, just one line of code.

    The system does not require the skinned mesh to have any colliders, the decals are placed according the mesh data.

    The mesh based solution allows flexibility in shaders, for example it is possible to use Tesselation to enhance the depth of the effects. Skinned decals will also perfectly follow the animation of your model.

    Sample character, bullet hole decals and shaders are included!

    FEATURES

    - Run-time generation (with optional multithreading)
    - Does not require colliders
    - One line of code to add decal
    - Supports characters composed of many skinned meshes
    - Atlasing, draw many decal types with one draw call.
    - Option to add decals to character in the editor and save mesh for later use.
     
    Last edited: Jan 19, 2019
  2. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30


    Here is a side-by-side comparion with the decals on/off. There are 4 bullet holes here (combined in to one draw call). The character itself is composed of 6 skinned meshes.
     
  3. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    I have tested the package on older Unity versions and verified that it works on Unity 2017.1.0f3 and newer.
     
  4. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    Had some requests about support for earlier Unity versions, but the oldest supported version is 2017.1. This is due to using Mesh.GetVertices() and the other similar functions which were introduced in that version.

    The Asset Store package is also now updated to show the required version as 2017.1.0 or higher!
     
    blackbird likes this.
  5. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    483
    Very interesting. How does it work? It seems to generate new skinned meshes?
     
    Ragoo likes this.
  6. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    Yes that is it.

    How it works is that it:
    1. takes a snapshot of the vertices in the characters skinned mesh,
    2. calculates which vertices are affected by the projected decal,
    3. adds those vertices in to a new skinned mesh (or existing one if previous decal has already created it) and calculates new uv's for the decal.
     
    EvilGremlin, Flurgle and one_one like this.
  7. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    483
    Sounds good - how many micro(/mili?)seconds does it take, on average, to generate a decal for a skinned mesh with, say, 40k vertices? Do you have some numbers on additional memory usage? And do you have some ideas on how to handle LOD gracefully?
     
  8. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    I did some tests using a model with ~35k vertices (the Guard model from Adam character package).

    In this test on average (with 20 datapoints) I got ~120 decal vertices per millisecond. So for example if you have a decal that covers an area with ~4000 vertices it will take ~34 milliseconds to create the decal. Memory vice we are talking about few megabytes of mesh data. With multithreading enabled there won't be much visible impact from the computation, but you will be triggering garbage collection if you create a lot of decals with large meshes.

    For comparison using a model with ~6k vertices (Robot Kyle), with same decal and same amount of tests I got an average of 80 vertices / millisecond. The average decal was 400 vertices and took ~5ms to create.

    In both tests I used the same decal which has a size of 0.4 world units. With this system the amount of vertices within the decal area determines the overall performance, so characters with lower mesh density are recommended.
     
    ledbetterman and EvilGremlin like this.
  9. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    690
  10. Jribs

    Jribs

    Joined:
    Jun 10, 2014
    Posts:
    45
    This asset looks interesting. After trying a few other decal assets that have decent reviews and them failing all my requirements I am looking towards this one now.

    My use case is I have a skinned mesh character. I want to have some wounds in various places that I can toggle on/off during runtime. I don't want to create them at runtime. I can set them up before hand in the editor, but at runtime I need to be able to toggle them on/off. And not just the whole set of decals, I need to be able to enable/disable specific ones.

    For example.

    I will have a character that has a rash on part of his neck. And when you touch it with something in VR, that rash decal goes away and is replaced by a different lotion decal.

    Would this be possible with this asset?
     
  11. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    I haven't tested so cannot confirm it. If you have high-poly models and want to generate large decals during runtime I think it will be slow with mobile device. If you generate the decals in the editor and just enable the meshes during runtime it should be fine.
     
  12. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    Yes this is possible. You can generate the decals in the editor, save the resulting skinned meshes to the project and toggle them on/off or load when you need them.

    I created a video that shows how this works, I hope it helps to clear things out!

     
    EvilGremlin likes this.
  13. Jribs

    Jribs

    Joined:
    Jun 10, 2014
    Posts:
    45
    Awesome thats perfect! Thanks! Ill write a review for you after I use it for a bit.
     
  14. Jribs

    Jribs

    Joined:
    Jun 10, 2014
    Posts:
    45
    @phosphorous_

    Going well so far. A couple questions

    1. Is there a way to make it not hit the other side of the mesh when placing the decals?
    2. It seems like some of the shaders are deferred rendering only, can you quickly tell me which shaders are deferred only? I'm currently using forward rendering for AA in VR, I can switch to deferred but I'd rather not do it right now.
     
  15. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    Nice, I hope it works out for you!

    1. In the decal inspector there is "Normal clip" which you can set to 0 if you want the decal only be applied to vertices facing where the decal is projected.
    2. The shaders are written deferred rendering in mind, but I wrote this version of the Tesselated Parallax shader for example on how to do it.

    Code (CSharp):
    1. Shader "SkinnedDecals/Tessellated Parallax Forward" {
    2.     Properties {
    3.         _MainTex ("Albedo (RGB) Alpha (A)", 2D) = "white" {}
    4.         _Color ("Main Color (RGB) Alpha (A)", Color) = (1, 1, 1, 1)
    5.         _BumpMap ("Normals", 2D) = "bump" {}
    6.         _SpecularMap("Specular map", 2D) = "white" {}
    7.         _SpecularColor ("Specular Color", Color) = (1, 1, 1, 1)
    8.         _Shininess ("Shininess", Range(0,1)) = 0.5
    9.         _ParallaxMap ("Height", 2D) = "gray" {}
    10.         _Tess ("Tessellation", Range(1,32)) = 4
    11.         _Displacement ("Displacement", Range(0, 0.1)) = 0.01
    12.         _Parallax ("Parallax Amount", Range(0.005, 0.08)) = 0.02
    13.         _MinDistance ("Minimum Distance", Range(0, 50))= 10
    14.         _MaxDistance ("Max Distance", Range(0, 50))= 25
    15.  
    16.         _AlphaClip ("Alpha Clip", Range(0, 1))= 0.01
    17.     }
    18.     SubShader {
    19.         Tags { "RenderType"="Opaque" "Queue"="Geometry+5" }
    20.         Fog { Mode Off }
    21.         Offset -1, -1
    22.         LOD 600
    23.  
    24.         Blend One OneMinusSrcAlpha
    25.      
    26.         CGPROGRAM
    27.         #pragma surface surf StandardSpecular noshadow vertex:disp tessellate:tessDistance nolightmap alpha
    28.         #pragma target 4.6
    29.  
    30.         #include "Tessellation.cginc"
    31.  
    32.         sampler2D _MainTex;
    33.         sampler2D _BumpMap;
    34.         sampler2D _SpecularMap;
    35.         sampler2D _ParallaxMap;
    36.  
    37.         float4 _Color;
    38.         float4 _SpecularColor;
    39.  
    40.         half _Shininess;
    41.         float _Tess;
    42.         float _Displacement;
    43.         float _Parallax;
    44.         float _MinDistance, _MaxDistance;
    45.  
    46.         float _AlphaClip;
    47.  
    48.         struct appdata {
    49.                 float4 vertex : POSITION;
    50.                 float4 tangent : TANGENT;
    51.                 float3 normal : NORMAL;
    52.                 float2 texcoord : TEXCOORD0;
    53.             };
    54.                
    55.         float4 tessDistance (appdata v0, appdata v1, appdata v2) {
    56.             return UnityDistanceBasedTess(v0.vertex, v1.vertex, v2.vertex, _MinDistance, _MaxDistance, _Tess);
    57.         }
    58.  
    59.         void disp (inout appdata v)
    60.         {
    61.             float d = saturate(tex2Dlod(_ParallaxMap, float4(v.texcoord.xy,0,0)).r -0.515) * 2 * _Displacement;
    62.             v.vertex.xyz += v.normal * d;
    63.         }
    64.  
    65.         struct Input {
    66.             float2 uv_MainTex;
    67.             float3 viewDir;
    68.         };
    69.  
    70.         void surf (Input IN, inout SurfaceOutputStandardSpecular o) {
    71.             // Parallax
    72.             fixed2 uvs= IN.uv_MainTex;
    73.             fixed4 height = tex2D(_ParallaxMap, IN.uv_MainTex);
    74.             float clampedHeight = min(0.5, height.r);
    75.             float2 parallax = ParallaxOffset(clampedHeight, _Parallax, IN.viewDir);
    76.             uvs += parallax;
    77.  
    78.             // Albedo comes from a texture tinted by color
    79.             fixed4 c = tex2D (_MainTex, uvs);
    80.             o.Albedo = c.rgb * _Color.rgb;
    81.  
    82.             // Normals
    83.             o.Normal = UnpackNormal (tex2D (_BumpMap, uvs));
    84.  
    85.             // Specularity & Smoothness
    86.             fixed4 specMap = tex2D(_SpecularMap, uvs);
    87.             o.Specular = specMap.rgb * _SpecularColor.rgb;
    88.             o.Smoothness = specMap.a * _Shininess;
    89.  
    90.             // Alpha
    91.             o.Alpha = c.a * _Color.a;
    92.             clip(o.Alpha - _AlphaClip);
    93.         }
    94.  
    95.         ENDCG
    96.     }
    97.     FallBack "Diffuse"
    98. }
    99.  
    Changes in this shader compared to the original:
    • Removed pragmas "finalgbuffer:finalGBuffer", "exclude_path:forward" and "noforwardadd"
    • Added pragma "alpha"
    • Added "_AlphaClip" for clipping out areas where alpha is near zero.
     
    Last edited: Jan 16, 2019
  16. Jribs

    Jribs

    Joined:
    Jun 10, 2014
    Posts:
    45
    @phosphorous_ dang awesome! That shader works great.

    I was having issues trying to use the deferred shaders. I load my assets using assetbundles and after loading, the decals looked like it was set to forward rendering somehow. Not sure if that's something with this asset, or something weird with how assetbundles work.

    But with the forward shader it works great even when loading from an assetbundle!

    Would you be able to provide all of the shaders in forward rendering mode? Shader code is a little beyond me at this point so I wouldn't feel comfortable editing them all.

    Thanks for the quick feedback!
     
  17. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    @Jribs great that it worked out!

    I will go through the shaders soon and convert them, also will update the package on the asset store with those added.
     
  18. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    New version with the forward rendering compatible shaders has been uploaded to asset store for review!
     
    ledbetterman and EvilGremlin like this.
  19. artilla

    artilla

    Joined:
    Jul 8, 2017
    Posts:
    3
    Hello, I have an error. please check it.
    I load Demo, add a decal in editor, and run but i get an error.

    NullReferenceException: Object reference not set to an instance of an object
    SkinnedDecals.SkinnedDecalBuilder.Initialize (SkinnedDecals.SkinnedDecalSystem ds) (at Assets/SkinnedDecal/Scripts/Core/SkinnedDecalBuilder.cs:48)
    SkinnedDecals.SkinnedDecalSystem.Initialize () (at Assets/SkinnedDecal/Scripts/Core/SkinnedDecalSystem.cs:81)
    SkinnedDecals.SkinnedDecalSystem.Awake () (at Assets/SkinnedDecal/Scripts/Core/SkinnedDecalSystem.cs:53)

    Unity version is 2018.3.5f1
     
  20. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    Hey, to get around this enable "Combine meshes of same decal type" on the Skinned Decal System -inspector when you create the decals in the editor OR disable "Find all child skinned meshes" and manually ensure that no editor decal meshes are on that list.

    Without "Combine meshes of same decal type" setting you might end up with empty decal meshes on the character, if the character is made of multiple skinned meshes and some parts do not have any decal vertices. This can cause this problem during runtime if you have "Find all child skinned meshes" enabled, because the decals you created in the editor are also skinned meshes and they will unnecessarily end up on that list.

    I will add a fix to the next version that will ensure that no empty meshes are created. The above advice regarding not using "find all child skinned meshes" still is recommended if you use both editor and runtime decals.
     
  21. tavovallejo

    tavovallejo

    Joined:
    Nov 22, 2014
    Posts:
    13
    Hi, would my character need to use a specific shader or can I use any? I'm using uber shaders.

    also; If I use smoothed tesselation on my character, would there be any visual glitch? I suppose it would be solved by using tesselation on the decals, with the same smoothing and camera distances configs.

    even without tesselation im interested, hope you dont remove this asset, out of no where like many others...
     
  22. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    @tavovallejo Thanks for your interest! You can use any shader, the system itself doesn't require any specific shader on the character.

    The decals do not take the characters GPU tessellation in to account and there will likely be glitches where the decal geometry appears to be under/over the characters skin if the characters tessellation causes a lot of displacement. This is because the decal system takes a snapshot of the characters skinned mesh on the CPU side and therefore will get the pre-tessellated geometry.

    The skinned decals tessellation feature is designed to give the decals themselves depth, so you can create effects like the image below. In this I have exaggerated the displacement from the default 0.015 to 0.075.
     
  23. chiblue3D

    chiblue3D

    Joined:
    Apr 25, 2012
    Posts:
    19
    I have got this tool work pretty well, my only issue is that it does not always create the decal, I am using a ray that hits colliders on the bones, this gives me a more accurate body impact results. However when I get a ray hit, I call the createdecal function passing in the ray origin and direction, I know I am getting a hit but the skinned decal system does not always place the decal, it adds the gameobject for the decal to the mesh, but does not add the decal... this seems to happen significantly on parts of the mesh that has a lot of animation motion like the head and the forearms, any help on this would be appreciated... Also I am calling the function multiple times per frame, if this a problem, i.e. multiple impact points, I seem to get upto 3 hits but actually had 20 hits that called the function.

    I just read the post about the tessellation, that answered my multiple hit question, I will need to create a decal to represent multiple hits and average hits... easy enough thanks
     
    Last edited: Mar 3, 2019
  24. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    Hey, nice to hear it works out for you! About the the system not registering hits, I am wondering what is the time between those hits?
     
  25. ifisch

    ifisch

    Joined:
    Jul 15, 2012
    Posts:
    25
    No matter what I do, the decal still shows up on both sides of my skinned mesh renderer, when adding a decal in the editor (not sure about at runtime. Haven't tried it).
    Yes, I set Normal clip to 0.
     
  26. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    Hey, that's strange. How the system clips the back side is based on the mesh normals as you know. Couple questions:
    • Does the included demo-scene work as intended in your setup (you can test both editor- and runtime-decals there)?
    • Is it possible the normals on your model are facing the wrong way?
    If you continue to have problems with it and want to send me the model you are using, I can take a look at it.
     
  27. ifisch

    ifisch

    Joined:
    Jul 15, 2012
    Posts:
    25
    It seems to work as expected on your demo scene models. Here I added 2 "Slash02" decals, and neither showed up on the other side of the model.
    upload_2019-3-10_18-17-13.png upload_2019-3-10_18-17-28.png
    However, on my model, it always shows through to the other side:
    upload_2019-3-10_18-25-48.png upload_2019-3-10_18-26-9.png
     

    Attached Files:

  28. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    Ok, thanks for the images! Could you send me your model so I could see if it is something about it that the system doesn't support? You can send it privately by email to info@ironsight.fi
     
  29. ncho

    ncho

    Joined:
    Feb 1, 2014
    Posts:
    80
    Hi, sorry I don't know much about coding and wanted to integrate this asset with Opsive Ultimate Character Controller. I know I have to call the CreateDecal function according to the manual but I am unsure how to do this exactly. The controller has an event system where you can execute scripts for example on a character taking damage. Alternatively I suppose I could insert it in the decal system logic of the controller but I am still confused about how to go about this. I tried looking at the demo scene but it seems all the scripting is in compiled code? Has anyone done this yet and could help me out?
     
  30. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    Hey, unfortunately I am not familiar with Opsive controller, but this is how I would approach this:
    1. Create a script that listens to Opsives OnHealthDamage-event.
    2. Add a reference to the characters SkinnedDecalSystem to that same script.
    3. Also add reference to the decal you want to use.
    4. When OnHealthDamage-event is raised call CreateDecal using the parameters included in the event.
    The vectors needed in CreateDecal are "origin" aka where the bullet came (the muzzle of the shooter) and "direction" aka the direction the bullet is flying. You should be able to calculate these based on the parameters included in the event.

    I put together this example script for you based on information on this page: https://opsive.com/support/documentation/ultimate-character-controller/attributes/health/

    Please note that this is not tested but is intended to give you an idea how it could work.

    Also note that in the example script I used attacker.transform.position as the origin, but that is likely the attackers root position on the ground.

    Code (CSharp):
    1. using UnityEngine;
    2. using Opsive.UltimateCharacterController.Events;
    3. using SkinnedDecals;
    4.  
    5. public class DamageDecalCreator : MonoBehaviour {
    6.  
    7. public SkinnedDecalSystem skinnedDecals;
    8.  
    9. public SkinnedDecal damageDecal;
    10.  
    11. public void Awake() {
    12. // Subscribe to OnHealthDamage-event
    13. EventHandler.RegisterEvent<float, Vector3, Vector3, GameObject, Collider>(gameObject, "OnHealthDamage", OnDamage);
    14. }
    15.  
    16. private void OnDamage(float amount, Vector3 position, Vector3 force, GameObject attacker, Collider hitCollider) {
    17. // Where the bullet came
    18. Vector3 origin = attacker.transform.position;
    19. // Bullet travel direction
    20. Vector3 direction = (position - origin).normalized;
    21. // Create decal
    22. skinnedDecals.CreateDecal(damageDecal, origin, direction);
    23. }
    24. }
     
  31. ncho

    ncho

    Joined:
    Feb 1, 2014
    Posts:
    80
    Thank you very much. I'll see if I can piece this together based on that.
     
  32. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    You're welcome! Feel free to ask if you run into further problems
     
  33. ncho

    ncho

    Joined:
    Feb 1, 2014
    Posts:
    80
    So, the script itself seems to work, I think? But I've just noticed that the decal rendering as a whole seems borked for me somehow. So in just the demo scene, there is lots of odd clipping with the skinned decals going on that based on your YouTube videos doesn't seem normal. See here: https://imgur.com/a/wboujkh

    Then in my own project, if I simply add any random model to a scene, then the Skinned Decal System and drag in one of the premade decals for editing in the editor and alt click on it, nothing shows up on the model. If I use the script you made in conjunction with one specific model (the Opsive character) I have in the scene at runtime, it works, but only on the head, the decal looks stretched and constantly disappears/reappears depending on camera position: https://imgur.com/a/oNnrcYm

    So is this actually just a rendering issue now? What might be the reason? I've switched between forward and deferred rendering with no luck.
     
  34. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    The clipping on the first gif looks as if the decals meshes are moving slightly out of sync with the character and then getting left under the characters skin, which I haven't seen before.

    I noticed you are using a Mac with Metal as your graphics API, I read there are some shader incompatibilities with it. Could you try changing it to OpenGLCore at "Edit->Project Settings->Player->Other Settings", uncheck "Auto graphics API for mac" and drag OpenGLCore as the first option.

    The second video looks like the shader is not rendering correctly, check the camera for forward/deferred in that one because that is how it looks when its the wrong shader for the mode.

    As for the decal showing up only on one part of the mesh, that is likely because the character has multiple submeshes. This problem came up before and has a simple fix which is not yet updated on Asset Store:

    SkinnedDecalBuilder.cs lines 56-57:
    Code (CSharp):
    1. originalTriangles = new List<int>();
    2. originalMesh.GetTriangles(originalTriangles, 0);
    Change that to read as follows:
    Code (CSharp):
    1. originalTriangles = new List<int>();
    2. for(int i = 0; i < originalMesh.subMeshCount; i++) {
    3. List<int> submeshTris = new List<int>();
    4. originalMesh.GetTriangles(submeshTris, i);
    5. originalTriangles.AddRange(submeshTris);
    6. }
    I will PM you the script with that fix already made for your convinience.
     
    Last edited: Mar 12, 2019
  35. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    One more thing regarding this, you could try to change the shader to one that doesn't have tessellation, for example "SkinnedDecals/Parallax" or "SkinnedDecals/Specular" and see if that is causing the problem.
     
  36. ncho

    ncho

    Joined:
    Feb 1, 2014
    Posts:
    80
    Thanks so much!! Everything works perfectly now.
     
  37. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    Awesome. :) Consider leaving a review for us on the asset store if you like it!
     
  38. songpwc

    songpwc

    Joined:
    Nov 6, 2018
    Posts:
    3
    impressive. I am very new to shader especially to Tessellation. is this "Tessellation" make the depth effect on wound?
    you have include bullet wound in this package. then if i need some other depth effect wound, how can i get those. for example if i need sword slice depth effect wound , do i need to build some specific map for Tessellation by myself?
     
  39. phosphorous_

    phosphorous_

    Joined:
    Jul 25, 2016
    Posts:
    30
    Yeah, tessellation generates more polygons on the GPU to give the decals more detail and makes it possible for parts of the decal to portrude outwards. There is also Parallax effect included in the shaders that create a depth effect on the parts of the decal that are under the surface.

    The textures you need are: Albedo map, Specular map, Normal map and Height map. In the manual under the title "Shaders" (page 7) there are specified the needed maps for each included shader.



    The most important map for the depth effect is the Height map. Here is a important note from the manual regarding Tessellation shaders and how the height map needs to be setup:
    In otherwords, pixels on the height map that are on level with the surface should be at 0.5, values under that will have the parallax effect and values over that will be displaced outwards or portruding.

    Included in the package are 4 bullet wounds, 2 slash wounds and 2 bullet armor hits.
     
  40. stevenwanhk

    stevenwanhk

    Joined:
    Jul 20, 2016
    Posts:
    100
    1. Does it support animated decal?
    Reference:
    (13:22)

    2. Is it possible to add a feature for not combining same decalType into one skinned mesh so we can add and remove specific decal in runtime?
     
    Last edited: Mar 28, 2019
  41. stevenwanhk

    stevenwanhk

    Joined:
    Jul 20, 2016
    Posts:
    100
    I created another
    Code (CSharp):
    1. private Dictionary<string, SkinnedDecalMesh> _combinedMeshes = new Dictionary<string, SkinnedDecalMesh>();
    and use
    Code (CSharp):
    1. decalType.name + "_" + GetDecalMeshCount(decalType)
    as the key.
    By calling
    Code (CSharp):
    1. IncrementDecalMeshCount(decalType);
    in `CreateDecal`, we can create one combined skinned mesh for each decal
     
  42. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    559
    Hello any chance this works with unity 5.6 ?
     
  43. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,515
    does this support hdrp?
     
  44. chiblue3D

    chiblue3D

    Joined:
    Apr 25, 2012
    Posts:
    19
    Firstly, I have integrated this solution into my project and really like the effects I am getting,

    Secondly, I am now working through my multiplayer logic and when I try to compile my project I am getting the error below:

    CSharp]Shader error in 'SkinnedDecals/Forward Rendering/Tessellated Parallax': invalid subscript 'instanceID' 'UnitySetupInstanceID': no matching 1 parameter function at line 225 (on d3d11)

    FIXED - I set the quality settings in my project to use anti-aliasing any everything compiled normally. Love this addon thanks..
     
    Last edited: Apr 12, 2019
  45. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    559
    So first off let me say that this looks like a great looking system and I'm definitely interested but I'm also a little shy about purchasing assets that don't get very good support and obviously forum support isn't great has anybody emailed them to see how that support is?
     
  46. wavyeye

    wavyeye

    Joined:
    May 2, 2014
    Posts:
    4
    I dropped an email asking about LWRP support today, but now I'm starting to get concerned as I just noticed the dev hasn't been on here in nearly 2 months.

    However, it is an excellent asset and so far has worked brilliantly for me.
     
    Last edited: May 18, 2019
    Jribs likes this.
  47. praagmatic

    praagmatic

    Joined:
    Mar 23, 2014
    Posts:
    5
    has anyone managed to get this working on skinned mesh renderers without bones?
    Part of my model has separate skinned meshes (for the face) which do not have bones and so the system throws an error (at Assets/SkinnedDecal/Scripts/Core/SkinnedDecalBuilder.cs:75)
     
  48. Jribs

    Jribs

    Joined:
    Jun 10, 2014
    Posts:
    45
    @wavyeye did you ever get a response to your LWRP question? I also am curious about that support
     
    JBR-games likes this.
  49. wavyeye

    wavyeye

    Joined:
    May 2, 2014
    Posts:
    4
    @Jribs No, I never got a relpy.
    However I got Skinned Decals working in LWRP (without tesselation) by using Amplify Shader to create a new shader for it, it was quite simple to do actually.
     
    JBR-games likes this.