Search Unity

Easy Decal - Decals everywhere

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

  1. BitAssembler

    BitAssembler

    Joined:
    Jul 13, 2017
    Posts:
    90
    The cut-off shaders work also out-the-box because they get rendered before transparency.
     
  2. BitAssembler

    BitAssembler

    Joined:
    Jul 13, 2017
    Posts:
    90
    Version 2020.2.5 has a dedicated background-color setting in the Preferences.
     
    StenCG and Sycoforge like this.
  3. kadejsan

    kadejsan

    Joined:
    Sep 26, 2013
    Posts:
    4
    Are SSDecals for URP working? I cannot make them work. I can only use Easy Decal/Particles/Alpha Blended shader and it works:
    upload_2020-11-5_15-14-37.png
    but I cannot follow the SSD pipeline using any of the SSD materials.
     
  4. BitAssembler

    BitAssembler

    Joined:
    Jul 13, 2017
    Posts:
    90
  5. DriesVrBase

    DriesVrBase

    Joined:
    Mar 24, 2020
    Posts:
    66
    He anwers very fast on mail
     
    BitAssembler and Sycoforge like this.
  6. Unplug

    Unplug

    Joined:
    Aug 23, 2014
    Posts:
    256
    so far It doesnt seem to work or to react to light probe. they just "pop out" instead of being blended in the scene... ill try different variation

    there is also a nasty bug when you have 2 decals on top of each other, depending on the angle you look at them one will pop over the other one despite that they are physically on top of each other and not exactly at the same coordinate
     
  7. BitAssembler

    BitAssembler

    Joined:
    Jul 13, 2017
    Posts:
    90
    Have you enabled the lightprobe option? You can also always access the decal mesh renderer to control settings that may not be exposed usingthe component UI.

    That's not an actual bug, but a result of planar faces rendering pixels in the same location - it's called z-fighting - pixels fight for their z-position in clip space. This can be avoided by offsetting decals in normal direction with the Distance porperty.
     
  8. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    @Sycoforge @BitAssembler Hey there, Easy Decal doesn't seem to work on Unity 2020.2.0 that was released this week. Is this a known problem? Thanks.
     
  9. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    There's a known issue with screen space decals in URP in Unity 2020.2. The mesh decals are successfully tested in 2020.2. What issues are you experiencing?

    Edit: The URP 10.x content is downloadable from our website.
     
    Last edited: Dec 20, 2020
  10. AGregori

    AGregori

    Joined:
    Dec 11, 2014
    Posts:
    527
    @Sycoforge there was a red timeout error involving Easy Decal, but turned out it was a conflict with NGTools, an editor extension, been sorted. :)
     
  11. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Glad to read everything's working! :)
     
  12. raisaleemcp

    raisaleemcp

    Joined:
    Feb 18, 2020
    Posts:
    17
    Does Edit -> Project Settings -> Quality -> Anti Aliasing works without URP/HDPR package?
     
  13. minad2017

    minad2017

    Joined:
    Dec 1, 2016
    Posts:
    50
    I want to generate a Skinned Box system at runtime, but it doesn't work.
    I used AdvancedBulletHoles.cs to set the SkinnedBox on the Decal Prefab.
    The decal is not projected even though it is generated in the correct position.
    Calling LateBake () didn't work either.
    What else do I need to do to generate a SkinnedBox system at runtime?
     
    Last edited: Jan 2, 2021
  14. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Unfortunately, skinned box decals are currently design-time only. You can find a quick introduction here.
     
  15. minad2017

    minad2017

    Joined:
    Dec 1, 2016
    Posts:
    50
    Thank you for your quick reply.
    Are there any plans to implement runtime generation in the future?
     
  16. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Yes, skinned mesh projector for runtime usage is on the roadmap, but we can not give an ETA. Currently, we propose to place a bunch of damage decals at design time (kind of damage areas) and enable/disable them on demand. This involves more setup steps but in return, it's super great for performance.
     
  17. minad2017

    minad2017

    Joined:
    Dec 1, 2016
    Posts:
    50
    When projecting using the Skinned Box system.
    Is it possible to respond to changes in BlendShapes?
     
  18. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Blend shapes are currently not officially supported and may lead to weird and unexpected results.
     
  19. acartayfun1

    acartayfun1

    Joined:
    Dec 22, 2017
    Posts:
    8
    Hello there,

    I have a mobile car game and I want to add car sticker modification with Easy Decal.

    I have some questions;

    1. The car is constantly moving by the player, so it's not static like a wall. Is this possible for the Easy Decal mobile vehicle project?
    2. What features should I use for mobile?
    If I choose the Box technique, Everything can be done very easily and looks perfectly on my computer, but I have a serious performance problem on my mobile device (2 - 3 Fps). Texture of Atlas sticks to the car perfectly.
    https://ibb.co/TkNqWS6

    If I choose the Plane technique, the Texture of Atlas does not exactly stick to the car and the texture is constantly appearing and disappearing during the gaming scene. But my game does not show any performance issues on mobile.
    https://ibb.co/R9X6CgC

    3. Should I pay attention to an adjustment in Unity Light Rendering screens for a performance run?

    Thanks,
    Tayfun
     
  20. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Have you baked the decal? Once parented and bake to the car, the baked should consume almost zero CPU time.
     
  21. kypronite

    kypronite

    Joined:
    Apr 15, 2013
    Posts:
    21
    Z fighting issue when decal overlap

    I used Easy Decal/Ed standard shader and i still get flickering issue.

    For context, I have enemy vomit toxic projectile at player,
    when player evade, projectile hit the floor and spawn decal at floor.
    If multiple of same projectile hit the floor at same position, multiple decal is projected
    at same position and flickering happened.

    Currently I offset the decal distance by increment distance by .001f for each decal instantiate
    but this feel like hack.o_O
    Am I missing something?
     
  22. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Offsetting decals is the way to still benefit from auto batching. The other way is to offset the material in the render queue, but this creates a new instance which then leads to a new draw call per decal. A further option is switching to a commutative blending equation such as "multiply". However, multiply is more related to blood effects.
     
    kypronite likes this.
  23. Quittern

    Quittern

    Joined:
    Oct 9, 2018
    Posts:
    19
    I've been having some issues lately with the decals not showing up in the android build, even though they work in the editor. Any decal that's placed directly in the scene seems to work fine, but the ones that are attached to an instanced object just dont work. They used to work, and we have not changed any settings since they did. Any idea why this happens?
     
  24. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Can you double-check whether the shaders are included in the build? You can add the shader in question to the Always Include list in the Unity settings.
     
  25. kbm

    kbm

    Joined:
    Aug 7, 2014
    Posts:
    84
    @Sycoforge Hi there,

    ever since I switched to Unity 2020.3.3f1, I am getting weird console errors:



    I am on Easy Decal version 2019.2 and using built-in render pipeline.
    I am using mostly baked Box decals and a couple of SSD decals.

    Any hint & help would be greatly appreciated as we're close to shipping our game.
     
  26. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Thanks for connecting. Do you have any skinned box decals in your scene?
     
  27. kbm

    kbm

    Joined:
    Aug 7, 2014
    Posts:
    84
    No, they're just regular box decals, here's the config:



    I get the error every time I save the scene or enter play mode or build the project.

    I am not using skinned meshes in any way in the entire project.

    UPDATE: Upgrading to the latest version of Easy Decal did not fix this.
     
    Last edited: Apr 17, 2021
  28. Blomidev

    Blomidev

    Joined:
    Dec 16, 2015
    Posts:
    11
    I'm using a Box decal to fake a shadow under a character. I recently switched my character to move on FixedUpdate, and now the decal jitters up and down significantly when the character jumps. Does easyDecal use the Update method? Is there any way to switch it to use the FixedUpdate?
     
  29. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Yes, the system calls project in the Update() method. You could get the source code on our website and make the changes yourself. However, we cannot give extensive support when altering the source.
     
  30. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Thanks for the additional information. Until now, we have not been able to reliably reproduce it. However, we have received a similar report some time ago, where this error got thrown too, but there was no impact in functionality. I guess, you do experience the same issue here, so it's safe to ship because it's an error message not an exception that interrupts the system in the build. We do further investigation on this.
     
  31. kbm

    kbm

    Joined:
    Aug 7, 2014
    Posts:
    84
    Thanks for looking into it, a fix would be *greatly* appreciated, as it's a super annoying bug. It throws an error message literally every time we do anything.

    Might have had something to do with me disabling game object hierarchies that contained Easy Decal objects, saving the scene, then re-enabling them again. The error only occurred until after I re-enabled said gameobjects with decals on them, SSD decals to be more precise.

    Update:

    Upon reimporting all assets, I get a BUNCH of shader warnings, too:



     
    Last edited: Apr 18, 2021
  32. Quittern

    Quittern

    Joined:
    Oct 9, 2018
    Posts:
    19
    Yes, the shader is in the always include list. Is it something you have to do when the object it's attached to is instantiated? Since the ones that are placed directly into the scene works.
     
  33. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Are you URP? If yes, try enabling Depth Texture on the camera.
     
  34. Quittern

    Quittern

    Joined:
    Oct 9, 2018
    Posts:
    19
    Yes, sorry, we're on URP 2020.1.5f1. Depth texture is enabled.

    Apparently the android log says that the game objects have missing or unknown components. I get no errors or warnings in the editor though.
     
  35. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Hard to tell what's going on there. Can you do a minimal demo scene just including one decal and build again? Maybe in a fresh project?
     
  36. VarunMhatre

    VarunMhatre

    Joined:
    Mar 9, 2021
    Posts:
    1
    Hi!

    I've been using the Easy Decal plugin for a bit. It's really great, thanks for making it!

    I had a few questions regarding the hard bake functionality (reference image attached to show exactly what I'm referring to):

    1) Is possible to detect when the Save as Assets: Save button is pressed via script through an event trigger, callback or anything else.
    2) After pressing the Save button, I also wanted to save the file at a specified path via script as opposed using a Save Window, is there a wat to do that?
    3) Finally, can we access and modify the Instantiate after Save toggle via script?

    Thanks!
     

    Attached Files:

  37. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Thanks for your nice words! Currently, there's no callback for those editor-based flows. However, you can do all those changes in the source. You can hook into the following method in the EasyDecalEditor.cs file
    Code (CSharp):
    1. private static void CreateDecalAsset(EasyDecal original, bool instatiateAfterExport)
    Hope that helped! :)
     
  38. jinil_neo

    jinil_neo

    Joined:
    Jun 29, 2020
    Posts:
    3
    Hello,
    I want to use Easy decal on an object with LOD group.
    However, this decal will be projected on all LOD
    Cull invisibles is on and the technique is using Box
    i'm using Unity 2020.3 + URP

    Easy Decal doesn't work properly in Unity LOD Group?
     
  39. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    The proposed LOD workflow is as follows:
    1. Project decal to ever LOD level
    2. Hard bake decal for all levels
    3. Assign the decal renderers to the respective LOD group level
    The other solution is to restrict decal receiving to LOD0. Otherwise, the decal would have to project every time the LOD changes, which would an overkill.
     
  40. jackcaplin

    jackcaplin

    Joined:
    Jul 29, 2020
    Posts:
    4
    can i use it in urp project?
    it works fine in build-in project.
    all the shaders are in build-in pipeline, i change my project to urp, can i still use this?
    now all the effects are missing, what should i do?
     
  41. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Yes, you can. You have to import the extension packages shipped with Easy Decal.
    Import them in the following order:
    1. easy_decal_URP_content_2020_2
    2. easy_decal_URP_content_2020_3
     
  42. jackcaplin

    jackcaplin

    Joined:
    Jul 29, 2020
    Posts:
    4
    thx for reply.
    i still got a question. that is in urp project. will the decal have different reaction in different light condition like other materil with shader wirten in hlsl. cause we are using it for makeup which might require good quality. :)
     
  43. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    In URP, we have no deferred rendering, thus no g-buffer based lighting. So unfortunately, decals can no blend with normals of other shaders.
     
  44. jackcaplin

    jackcaplin

    Joined:
    Jul 29, 2020
    Posts:
    4
    thanks for your reply. its a good decal plugin anyway! ! it makes our job much easier
     
  45. hauwing

    hauwing

    Joined:
    Dec 13, 2017
    Posts:
    69
    hi, can the decal be used on a mesh that will deform during runtime? if not can I bake the decal to the texture beforehand in editor? thx
     
  46. unitynewb

    unitynewb

    Joined:
    Feb 22, 2009
    Posts:
    243
    Anyone have any performance issues on more complex mesh when applying during runtime? I ran the profiler and it looks like EasyDecal.Update() is running at 99 percent and it looks like it's BoxProjector.Project -> MeshCutter taking up the majority of the resources then it's BoxProjector.ProjectUsingEnvironment.

    Would there be a way to not apply it every frame or as a coroutine to not freeze up the game? My use case is a little different though where I don't need the decal to apply immediately and can have the user wait a second or two to update as they apply the decal.

    Maybe I can get some suggestions on applying decals to a more complex model?
     
  47. IronHelmet

    IronHelmet

    Joined:
    May 2, 2017
    Posts:
    85
    Hey All, anybody know if there is a way to prevent a screen space decal stretching up the side of geometry that is parallel to the projection?

    upload_2021-6-17_14-32-0.png

    The box and plane projection method don't seem to work at all for our project.

    I was thinking it would be good if you could modify the opacity based on the depth of the projection you could "fade out" the stretch marks which would look OK for an explosion scorch mark. Do you think that would be possible by modifying the shader somehow?


    update:

    I found this with some side stretching prevention built in.
    https://github.com/ColinLeung-NiloCat/UnityURPUnlitScreenSpaceDecalShader
     
    Last edited: Jun 17, 2021
  48. redactedohno

    redactedohno

    Joined:
    Jun 9, 2021
    Posts:
    2
    Hey.

    Using HDRP and the Box technique, decals cast shadows. For the attached image, the 'Distance' setting has been increased to 0.1 to make it more obvious to see.

    Anything I or you can do about this?
     

    Attached Files:

  49. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,490
    Hi, is there a atlas texture pack for this asset, I am looking for a bunch of rust/dirt ones, any help would be welcome.
     
  50. FM-Productions

    FM-Productions

    Joined:
    May 1, 2017
    Posts:
    72
    Hi!
    I'm using the Builtin Render Pipeline and the forward rendering path and wanted to know if it was possible to achieve something like the HDRP decals, feature-wise, which are then created at runtime and not design time? (Supporting this for static scene objects is enough)
    More specifically if there was a way to have lighting support for screen space decals on the forward rendering path? Or if this was impossible?
    If it wasn't impossible, how could that possibly be approached?

    Looking at the URP lit SSD shader parameters, it would also be great to have normal map, emission map, AO map and metallic + smoothness support. But the lighting support would be the most important feature for me here.

    If it's hard or nearly impossible to achieve this, I'm curious what URP features to make this possible (I haven't tested it yet, but it looks like the URP lit SSD shader would work for forward rendering?)

    If there is no way to achieve this, I might consider switching to the deferred rendering pipeline, but having less usable stencil bits to work with for custom features and possible transparency issues make this a tough choice.

    I also tried to play around with the box projector, the Standard ED material provides me with all the properties I want but I couldn't get the projection results I wanted. Trying to get it to behave similarly to how the screen space decals wrap around the visible geometry for the full volume of the projector box probably can't work I assume? (Since there is only a projection in one direction etc.) And when it doesn't check against only colliders, the meshes from the reflection probes are included in the projection surfaces too (I guess I could deactivate them until the baking process has finished)
     
    Last edited: Aug 8, 2021