Search Unity

Easy Decal - Decals everywhere

Discussion in 'Assets and Asset Store' started by Sycoforge, Oct 28, 2014.

  1. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    hi,
    using easy decal for 2018.2.3.. when i tried combining the atlas groups from the decal manager, disappeared from my editor. Upon uncombining them they reappeared.. previously on 2017.4 it works fine
    Please advised, i even double checked with the manual just to be sure i did not miss a step
    ed problem.png
     
  2. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Unfortunately, I couldn't reproduce this on our side. Do you see any objects in the game object called "[Decal Root]"? If yes, what mesh data do they have assigned?
     
  3. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    there's a decal root empty gameobject in scene, however i fixed that by using easy combine provided by your colleague
     
  4. Serk05

    Serk05

    Joined:
    Apr 20, 2014
    Posts:
    3
    Hi,

    I'm using EasyDecal with a complex, multi-textured material. One of the textures is a mask, of which there are multiple variations. This is the only texture that varies from decal to decal, the others are always identical.

    I want to atlas those masks into a single texture, but AFAIK that forces me to also atlas the other textures that don't have variations. So if I want to have 8 different masks, then I need to create atlases for each of the other textures in which all 8 regions will have the exact same content, wasting texture memory.

    Is there a way to avoid this? For example, having the atlased UV coordinates only apply to the main texture channel, while having the other channels retain the original (0,0)-(1,1) UVs?

    Thanks!
     
  5. BitAssembler

    BitAssembler

    Joined:
    Jul 13, 2017
    Posts:
    90
    The decals have their UV coords stored in the UV1 channel. So the offset/scale is geometry passed and independet from the shader. You could make your shader read the mask from the UV1 (the atlased one) channel and the color data from UV2/3/4 channel. Just make them (the additonal UVs) available using the input struct.
     
  6. Serk05

    Serk05

    Joined:
    Apr 20, 2014
    Posts:
    3
    I might be doing something wrong then. I've tried visualizing the texture channels, and they all seem to vary based on the selected atlas region:



    This is the visualization shader I'm using on the lower row, but I've tried all the other channels too with the same results. Please let me know if I'm making any mistakes?

    Code (CSharp):
    1. Shader "Unlit/testUV1"
    2. {
    3.    Properties
    4.    {
    5.        _MainTex ("Texture", 2D) = "white" {}
    6.        _MainTex1("Texture", 2D) = "white" {}
    7.        _MainTex2("Texture", 2D) = "white" {}
    8.        _MainTex3("Texture", 2D) = "white" {}
    9.    }
    10.    SubShader
    11.    {
    12.        Tags { "RenderType"="Opaque" }
    13.        LOD 100
    14.  
    15.        Pass
    16.        {
    17.            CGPROGRAM
    18.            #pragma vertex vert
    19.            #pragma fragment frag
    20.            
    21.            #include "UnityCG.cginc"
    22.  
    23.            struct appdata
    24.            {
    25.                float4 vertex : POSITION;
    26.                float2 uv : TEXCOORD0;
    27.                float2 uv1 : TEXCOORD1;
    28.                float2 uv2 : TEXCOORD2;
    29.                float2 uv3 : TEXCOORD3;
    30.            };
    31.  
    32.            struct v2f
    33.            {
    34.                float4 vertex : SV_POSITION;
    35.                float2 uv : TEXCOORD0;
    36.                float2 uv1 : TEXCOORD1;
    37.                float2 uv2 : TEXCOORD2;
    38.                float2 uv3 : TEXCOORD3;
    39.            };
    40.  
    41.            sampler2D _MainTex;
    42.            sampler2D _MainTex1;
    43.            sampler2D _MainTex2;
    44.            sampler2D _MainTex3;
    45.            float4 _MainTex_ST;
    46.            float4 _MainTex1_ST;
    47.            float4 _MainTex2_ST;
    48.            float4 _MainTex3_ST;
    49.            
    50.            v2f vert (appdata v)
    51.            {
    52.                v2f o;
    53.                o.vertex = UnityObjectToClipPos(v.vertex);
    54.                o.uv = TRANSFORM_TEX(v.uv, _MainTex);
    55.                o.uv1 = TRANSFORM_TEX(v.uv1, _MainTex1);
    56.                o.uv2 = TRANSFORM_TEX(v.uv2, _MainTex2);
    57.                o.uv3 = TRANSFORM_TEX(v.uv3, _MainTex3);
    58.                return o;
    59.            }
    60.            
    61.            fixed4 frag (v2f i) : SV_Target
    62.            {  
    63.                //return fixed4(i.uv.xy, 0, 1);
    64.                return fixed4(i.uv1.xy, 0, 1);
    65.                //return fixed4(i.uv2.xy, 0, 1);
    66.                //return fixed4(i.uv3.xy, 0, 1);
    67.            }
    68.            ENDCG
    69.        }
    70.    }
    71. }
    72.  
     
  7. BitAssembler

    BitAssembler

    Joined:
    Jul 13, 2017
    Posts:
    90
    Did you already try to write a custom vertex processor that overrides/creates UVn data? You can find an example here. Easy Decal doesn't create them by default. I would suggest to normalize them according their local xy-position.
     
  8. Serk05

    Serk05

    Joined:
    Apr 20, 2014
    Posts:
    3
    Oh, I see. I misunderstood you then, I thought Easy Decal was already providing normalized coordinates on the other channels.

    Thanks for the link, I'll take a look at it and see if I can make it work.
     
  9. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Hi, I have owned this for a while but havent used it yet. I'm looking into using it now for our bullet holes.

    We are currently on 2017.4.11 but will Move to 2018.x later. We use single pass today and will move to single pass instanced in 2018.x. We use SteamVR.

    Which decal method would work best for my use case? Performance is important but also, since VR the decal must follow the mesh perfect without floating.
     
  10. Liam-C

    Liam-C

    Joined:
    Mar 6, 2017
    Posts:
    18
    I came across a frustrating problem in the editor when viewing lots of decals one at a time. After viewing 64 decals the console was spamming errors and the inspector would be broken until i restarted unity. It seems like the MaterialEditor created in EasyDecalEditor wasn't being disposed, so i changed the EasyDecalEditor.OnDisable method to call DestroyImmediate (materialEditor).

    I'm using Unity 2018.2.10 and Easy Decal 1.6.8. Though i recently upgraded this project from unity 5.3 and a much older version of Easy Decal.

    Errors attached, these 3 errors were repeated constantly until i restart the editor.
     

    Attached Files:

  11. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    Hello, I am currently interested in using Easy Decal but there are some issues. I'm streaming content dynamically and the Awake() and OnEnable() methods of Easy Decal add a lot of lag for only a few decals on the initial load frame

    Would it be possible to add a way for me to enable them manually in my load cycle, and remove the Awake() and OnEnable() callbacks from the files completely (so they aren't added to Unity's script manager)? Perhaps something like StreamedDecal.cs that could take an Initialize(bakeOnLoad = false) function?

    Thanks so much!
     
  12. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    108
    >1.6.8.B Features Unity 2018 Support. Fixes Core: Fixed recurisve lookup regression.

    Is it compatible with Unity 5.6.x? README in newly imported asset shows a version 1.6.6

    P.S. With Unity 2017, I downloaded latest Easy Decal.unitypackage.
    Next step: install it to Unity 5.6.6f, and checked Recursive Lookup works well, but have error:

    System.TypeLoadException: Could not load type 'UnityEngine.ImageConversion' from assembly 'ch.sycoforge.Unity.Editor'.
    at ch.sycoforge.Shared.GraphicsData.Get (System.String name) [0x00000] in d:\Repos\Sycoforge Libs\ch.sycoforge.Unity.Editor\Shared\GraphicsData.cs:35
    at ch.sycoforge.Shared.SharedGraphics.Initialize () [0x00000] in d:\Repos\Sycoforge Libs\ch.sycoforge.Unity.Editor\Shared\SharedGraphics.cs:228
    at ch.sycoforge.Shared.SharedGraphics..cctor () [0x00032] in d:\Repos\Sycoforge Libs\ch.sycoforge.Unity.Editor\Shared\SharedGraphics.cs:223
    UnityEditor.EditorAssemblies:processInitializeOnLoadAttributes()


    I believe this is an incompatibility with Unity 5.6.x :( (can't migrate to Unity 2018 until the project ends)

    Recursive Lookup is very indispensable for my LOD group, can you help me?
     
    Last edited: Oct 17, 2018
  13. TheDeepVR

    TheDeepVR

    Joined:
    May 8, 2018
    Posts:
    22
    Hi,

    I am unable to fix the issue with Skinned Box which follows bones incorrectly. So I have a skinned mesh which initially is idle then:
    1. Fire and instantiate Skinned Box decal prefab (it has Bake On Awake). It was instantiated in the correct position as expected.
    2. Animate the skinned mesh. The decal followed bones as expected.
    3. Fire and instantiate the same Skinned Box decal prefab. It was instantiated in the wrong position and doesn't follow bones as expected.

    I guess something wrong with Bake On Awake because it works fine in a case the skinned mesh is idle.

    I have GPU skinning switched off. There is only one skinned mesh render which receive decal by using Mesh Link Group and Skinned Mesh Links.

    I have linked video, I will provide the demo scene if you want.

    https://www.dropbox.com/s/1cfly947j8jt26y/Screen Recording 2018-11-13 at 20.24.56.mov?dl=0
     
  14. cloverme

    cloverme

    Joined:
    Apr 6, 2018
    Posts:
    198
    I took a huge performance hit with 3 decals enabled and was wondering if there's anything that can be done to minimize the perf hit? Frame rate drops by half or more when the decals are enabled (just using the demo graffiti images it comes with as a test).... I'm using 2018.
     
  15. hottabych

    hottabych

    Joined:
    Apr 18, 2015
    Posts:
    107
    Hi. I consider buying your asset.
    The problem in other decal systems is that if I stretch a decal horizontally I need to scale down texture tiling (and vise versa). There's no way to play around with texture tiling in decal settings, so I need to copy material and to tweak its tiling/offset for every stretched decal.
    Does your asset have a feature to change texture tiling/offset in local decals? Or I need to copypaste material every time?

    Also, does it support Unity 2018.2+ ?
     
    Last edited: Dec 5, 2018
  16. ArneStudio

    ArneStudio

    Joined:
    Sep 12, 2018
    Posts:
    29
    I'm looking to project a decal onto a convex surface. I don't want the decal to wrap onto the surface I want it to deform and get stretched as the flat image meets the mesh. The image should look correct when viewed from the front but look deformed when viewing the convex surface from any other angle. is this possible? Thanks for your help
     
  17. Amitloaf

    Amitloaf

    Joined:
    Jan 30, 2012
    Posts:
    97
    Three questions:
    1) We are doing an open world game, and it seems like your plugin doesn't support multiple scenes. When rendering the decals it creates one root in the active scene and puts all decals under it, no matter from which scene it is. Manually creating multiple roots work but it's very hard to do so. Is there a solution for this?
    2) Is there a way to disable the keyboard shortcuts? There are a lot of them and we do not like them.
    3) There is no good shader which shows a decal with transparency, which receives shadows - other then "deferred" but it takes 5 draw calls per decal which is out of the question. We might have more than a hundred decals and it doesn't batch. Do you have any other solution for that?
    Thank you very much!
     
  18. Guideborn

    Guideborn

    Joined:
    Jun 15, 2013
    Posts:
    231
    Having a strange problem with decals. They don't seem to be viewing properly, including the decals packaged with the asset. All of them appear as lines on projected objects. I messed around with settings, but nothing seemed to help. Any advice?

    The ones in the demo work fine, but not in my own scene. I cant figure out what in my scene is causing this.
     

    Attached Files:

    Last edited: Dec 12, 2018
  19. ArneStudio

    ArneStudio

    Joined:
    Sep 12, 2018
    Posts:
    29
    Hi all, I have some issues with the decals being displayed intermittently in both game and scene view. I'm using the default prefabs but I get the same result with ones I have created myself. as I move the decal across a mesh (simple sphere and quad used for examples) I can see the decal on half of the mesh only then it disappears. this is either the same or flipped in the game view. Also if I navigate about in the scene view I can get the result to flip without make any changes to the hierarchy. Here is a link to what I see.

    Any suggestions very welcome, Thanks
     
  20. ArneStudio

    ArneStudio

    Joined:
    Sep 12, 2018
    Posts:
    29
    Hi Is there a discord for this App/forum
     
  21. ArneStudio

    ArneStudio

    Joined:
    Sep 12, 2018
    Posts:
    29
    Not sure if this is the answer but it looks like the decals are being projected from above or below onto a parallel surface. have you tried changing the orientation. could be an easy fix...
     
  22. Egnech

    Egnech

    Joined:
    Aug 27, 2015
    Posts:
    27
    Hi!

    I have a strange issue with performance using Deferred Decals.

    I'm using deferred decals to implement blood splats, and after some period of time I can have about 120-150 decals at the screen simultaneously - performance drops from ~80fps to ~10fps.

    I've looked at Profiler and found that each Gfx.WaitForPresent is might be an issue.
    Screen Shot 2018-12-17 at 9.48.40 PM.png

    I think this can be somehow related to cloverme issue.
    Has anybody faced with similar problems?
     
  23. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    waitForPresent is just vertical sync time. turn off vertical sync and it will go away.
     
  24. Egnech

    Egnech

    Joined:
    Aug 27, 2015
    Posts:
    27
    I've already tried to disable V-sync, and it is didn't help at all. I have a fealing that if nobody else has faced with something similar, that may be it is something within my code, but have no idea what it can be.
     
  25. Deleted User

    Deleted User

    Guest

    Does Easy Decal work with LWRP? And will it run on iOS and Android?
     
    pachermann and glacuesta like this.
  26. ArneStudio

    ArneStudio

    Joined:
    Sep 12, 2018
    Posts:
    29
    Has anyone tried to maintain scale? I'm trying to bring in artwork and have it transpose 1-1 inti UNITY. My artwork is 380mm high (2250ppi exported from Illustrator as PnG at 150DPI) My artwork is on a square artboard so no scaling in the atlas. My atlas regions are not square but as long as I select width or height aspect ration there is no warping on import. The issue is the resultant image when projected onto a flat cube of 1x1x1 (1m in unity scale) is approx. 1.5m high. Is there a another scaling operation happening somewhere I need to consider in the process?
     
  27. JakartaIlI

    JakartaIlI

    Joined:
    Feb 6, 2015
    Posts:
    30
    Hello, how can i fix this?
    (it become black and with edge when i select nox technique, and it not fixes back when i select plane techinque)
     

    Attached Files:

  28. ArneStudio

    ArneStudio

    Joined:
    Sep 12, 2018
    Posts:
    29
    Anyway to turn off the coloured wireframe bounding boxes (blue for box, pink for plane etc..) in the scene view?
     
  29. Jribs

    Jribs

    Joined:
    Jun 10, 2014
    Posts:
    154
    Can this plugin be used to put decals on a skinned mesh character without the use of colliders?
     
  30. Manul_

    Manul_

    Joined:
    Jul 28, 2015
    Posts:
    20
    Hi, is there a way to let the deferred screen space decals only be on objects of a lower Render Queue (2000)? Because changing the render queue of objects that should not be effected to higher queues breakes many things, like water.
     
  31. Evgenius

    Evgenius

    Joined:
    Sep 4, 2013
    Posts:
    21
    Hello! I have a problem with using proxies for colliderless gameobjects. I'm following the instructions in manual but get no result. So you have an example scene with it?

    P.S. example scenes that were in asset are missing or didn't have proxy links
     
    Last edited: Feb 8, 2019
  32. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Hi, I'm in Unity 2018.3.4f1 and constantly get this error after I deleted a decal in scene.

    ArgumentNullException: Argument cannot be null.
    Parameter name: mesh
    UnityEngine.Rendering.CommandBuffer.DrawMesh (UnityEngine.Mesh mesh, Matrix4x4 matrix, UnityEngine.Material material, Int32 submeshIndex, Int32 shaderPass, UnityEngine.MaterialPropertyBlock properties) (at D:/unity/Runtime/Export/RenderingCommandBuffer.cs:193)
    UnityEngine.Rendering.CommandBuffer.DrawMesh (UnityEngine.Mesh mesh, Matrix4x4 matrix, UnityEngine.Material material, Int32 submeshIndex, Int32 shaderPass) (at D:/unity/Runtime/Export/RenderingCommandBuffer.cs:206)
    ch.sycoforge.Decal.DecalRoot.RenderDecals (UnityEngine.Camera cam) (at d:/Repos/nu-assets/ch.sycoforge.Decal/DecalRoot.cs:260)
    ch.sycoforge.Decal.DecalRoot.OnRenderCamera (UnityEngine.Camera camera) (at d:/Repos/nu-assets/ch.sycoforge.Decal/DecalRoot.cs:105)
    UnityEngine.Camera.FireOnPreRender (UnityEngine.Camera cam) (at D:/unity/Runtime/Export/Camera.bindings.cs:341)
    UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr)

    Any ideas?
     
  33. hellobard

    hellobard

    Joined:
    Sep 26, 2012
    Posts:
    140
    Hi,
    Long time user of Easy Decals here, and starting a new project. Just wanted to hear what the future of this plugin looks like and if it's being supported? Is there/will there be support for LWRP soon?
     
  34. Evgenius

    Evgenius

    Joined:
    Sep 4, 2013
    Posts:
    21
    Is this asset is still supported?!
     
  35. JakartaIlI

    JakartaIlI

    Joined:
    Feb 6, 2015
    Posts:
    30
    The developer does not come here.
     
  36. Radiago

    Radiago

    Joined:
    Jan 7, 2014
    Posts:
    18
    I'm having an issue, recently upgraded our project from 2018.2 to 2018.3, and now the alt+c shortcut to convert a decal to a mesh no longer seems to be working, has anyone else seen this and/or know of a solution?

    Edit - Found out ProBuilder (at least the asset store version, don't know about the package manager version) has also bound that key combination to something and so the editor gets confused. Work around is just using the edit menu path.
     
    Last edited: Apr 2, 2019
  37. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    We also experienced a collision with ProBuilder here.
     
  38. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    If you don't receive an answer on the forums within 48h, just write us an email!
     
  39. dl290485

    dl290485

    Joined:
    Feb 4, 2018
    Posts:
    160
    That's a bit funny, because I'm actually just coming to the forum to try to get an answer because no one answered my e-mail in the last 48 hours...

    So anyway, I'm trying to get Playmaker actions I have seen mentioned on this thread. You instructed to go to your website and sign up and then yada yada. Well I tried to sign up but it ended saying fail and the site admin contacted. I then sent an e-mail but no reply.

    Is there a link or something you can provide for Playmaker actions?
     
  40. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Apologies for the inconveniences. Unfortunately, we have not received your email. Did you send it to the support email address published on the UAS? The playmaker actions are included in a Unity package archive (easy_decal_playmaker_1_0_0) that ships with the asset. You just have to extract it to your project.

    Please let us know if this solved your problem.
     
  41. dl290485

    dl290485

    Joined:
    Feb 4, 2018
    Posts:
    160
    Oh jeez... yep.. there it is, already have it. Ok thanks.

    Yeah and I sent the message using the contact page on your website. Maybe check test that form out or something.
     
  42. Jackless

    Jackless

    Joined:
    Jan 9, 2018
    Posts:
    19
    Is the new HDRP supported at the moment?
     
    NeatWolf likes this.
  43. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    The mesh decals fully support the HDRP because you can assign custom materials/shaders to it. The deferred decals get replaced by Unity's implementation in the SRP.
    Just make sure that you set the following property in your custom shaders: Offset -1, -1 this can be done using Amplify Shader Editor or directly in code.
     
    pachermann likes this.
  44. Muravu

    Muravu

    Joined:
    Nov 30, 2014
    Posts:
    53
    Hello. I have a problem with the asset in unity 2019.1.0f2. When I project the decal onto a terrain it renders black. When I try to use it on a custom made tree mesh it doesn't render at all. When used on a basic cube it renders fine. Do you have any idea what the problem is? You can see my settings on the picture I followed your documentation for setting the decals up.
     

    Attached Files:

    • SS1.jpg
      SS1.jpg
      File size:
      451.1 KB
      Views:
      778
    • SS2.jpg
      SS2.jpg
      File size:
      729.7 KB
      Views:
      961
    • SS3.jpg
      SS3.jpg
      File size:
      565.5 KB
      Views:
      709
  45. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Hi there! When in collider-based mode (best performance), the tree needs a collider to detect a hit. When using a material with normalmap support, you have to enable the normal and tangent calculation because the normalmaps are applied in tangent space. Hope that helped! :)
     
    Last edited: May 7, 2019
  46. Muravu

    Muravu

    Joined:
    Nov 30, 2014
    Posts:
    53
    The tree mesh does have the collider. I'm sending you the screenshots with the tree model import settings and the proof that it has a mesh collider
     

    Attached Files:

    • SS1.jpg
      SS1.jpg
      File size:
      722.3 KB
      Views:
      681
    • SS2.jpg
      SS2.jpg
      File size:
      745.4 KB
      Views:
      668
  47. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Hard to tell what's the issue here. Can you send us your demo scene with the tree model?
     
  48. Muravu

    Muravu

    Joined:
    Nov 30, 2014
    Posts:
    53
  49. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Great, received the files. The responsible person is currently out of the office. I guess you can expect an answer by tomorrow.
     
  50. Muravu

    Muravu

    Joined:
    Nov 30, 2014
    Posts:
    53
    I'm looking forward to your reply