Search Unity

Easy Decal - Decals everywhere

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

  1. vikas14

    vikas14

    Joined:
    Jan 17, 2017
    Posts:
    7

    Is the the decal not showing up when you bake it in the editor? : YES
     
  2. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Started a private conversation to initiate remote support.
     
  3. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    Can you use this asset to project a decal into a texture of a skinned mesh (at runtime)? I.e. alter the actual texture of the skinned mesh.
     
  4. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Unfortunately, this is currently not part of the feature set. But we have plans to support direct texture projection sometime in the future just to have support for all the possible decals modes. :)
     
  5. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    976
    Thanks for your reply.

    That's really cool. Please let me know when that happens, if it's not too much trouble.

    Basically, what we want to do is enable our users to decorate characters/clothing with tattoos/symbols. So a system like this would be really useful.
     
  6. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    You're welcome! :)

    Basically, this is already possible using the new Skinned Box projection feature. The skinned projector is in an early stage of development, but as long as your character is not containing more than one skinned mesh everything should be fine.

    easy_decal_skinned_kyle.gif

    Alpha version limitations
    • Only one skinned mesh gets recognized by the projector
    • Pose baking is very limited
    • Level-order search is not implemented
    • SkinnedDecalReceiver is not implemented -> Bone-mesh-linking
     
    ZJP likes this.
  7. LunaTrap

    LunaTrap

    Joined:
    Apr 10, 2015
    Posts:
    120
    Hi, im having problems with spawning decal on static batched colliders, see, my game is procedurally generated and isometric angle of 45, but the level generator im using only generates level straigth with 0 rotation, so what i do is generate the level, and after is done i set its rotation to 45, achieving isometirc perspective

    How its spawned:

    After rotation to achieve isometric perspective:



    Then, since the static batching does not works for procedurally generated content, i do this code to set the level ready to be batched

    Code (CSharp):
    1.     //Adds the proceduraly generated level for static batching.
    2.     private void RecombineStaticLevelGeometry()
    3.     {
    4.         var meshes = LevelRoot.GetComponentsInChildren<MeshRenderer>();
    5.         var batchableObjects = new List<GameObject>();
    6.         for (int i = 0; i < meshes.Length; i++)
    7.         {
    8.             GameObject go = meshes[i].gameObject;
    9.             if (go.isStatic)
    10.             {
    11.                 batchableObjects.Add(go);
    12.             }
    13.         }
    14.         StaticBatchingUtility.Combine(batchableObjects.ToArray(), LevelRoot.gameObject);
    15.     }
    But, the problems is that for some reason this breaks decal projection, this is how the decal is spawned using raycasting:



    It does not projects correctly, it only works if i move it forwards, and this is the result:


    See? the decal is in mid air, i checked lots of times and there is no collider there, i dont know why its doing this, if i dont do the static batching call, it works perfectly,

    This is on a wall that is not static:



    What could be happening? i know it has something to do with the static batching combine, any clues?
     
  8. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    @LunaTrap We'll rebuild your use case and take a good look at this. Will come back to you as soon as we got a solution or we need further information.
     
  9. LunaTrap

    LunaTrap

    Joined:
    Apr 10, 2015
    Posts:
    120
    To reproduce it you can follow theses steps

    1- Create a room wtih 4 walls and floor
    2- Set the room rotation to 45 on the Y axis
    3- Set the whole room as static
    4- Run the game so the room is batched to a combined mesh
    5- Project or spawn a considerable size decal with box projection method (0.01 distance) with contraints angle set to 45 and colliders only set to tue (im using PooloManager spawn instead of the EasyDecal built in projection)

    Observe effect
     
  10. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Thank you for the detailed report. Reproduced and fixed. :) There was an issue with the space conversion when reconstructing geometry data from a box collider on static meshes.

    You can download the patch from our website. Please make sure that you have at least version 1.6.4 installed when applying the patch.

    Please let me know if this fixed your issue.
     
    hopeful likes this.
  11. LunaTrap

    LunaTrap

    Joined:
    Apr 10, 2015
    Posts:
    120
    Oh good lord, you are the best! I swear that if you ever release another asset, i will buy it without hesitation! 11/10 support!
     
  12. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Glad to hear and thank you for your nice words! :)
     
  13. unity2

    unity2

    Joined:
    Jan 10, 2013
    Posts:
    23
    Anyway to ignore a layer while creating decal at runtime?
     
  14. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Yes sure.

    Either you can exclude layers directly on your specific decal prefab

    ed_decal_layer_mask.jpg

    or by specifying a custom layer mask after instantiation in script.

    Code (CSharp):
    1.                    
    2. LayerMask mask = ~(1 << LayerMask.NameToLayer("IgnoreDecal"));
    3.  
    4.  // Instantiate the decal prefab according the hit normal
    5. EasyDecal decal = EasyDecal.ProjectAt(DecalPrefab.gameObject, hit.collider.gameObject, hit.point, hit.normal);
    6. decal.Mask = mask;
    7.  
     

    Attached Files:

  15. unity2

    unity2

    Joined:
    Jan 10, 2013
    Posts:
    23
    Thanks :)
     
  16. Nenad_Rajkovic

    Nenad_Rajkovic

    Joined:
    Jan 29, 2017
    Posts:
    4
    Hi We have a problems with your decal system. Our problem is about performance. As you can see on image method GetDefferedDecals has impact on CPU usage around 14% and in inspector you can see that We have zero deferred decals on scene. Can you tell me is this some kind of bug or how can We avoid this?
     

    Attached Files:

  17. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Hi. Thank you for reporting this issue. There's always small overhead for each camera in the scene, but in your case - with zero deferred decals - it should be around 0.1ms per camera and not 0.6ms. This will be fixed in the next update. But be careful with multiple cameras (I noticed you have 7 in your scene) as this can lead to a massive performance hit, especially when targeting low-end devices.
     
  18. Nenad_Rajkovic

    Nenad_Rajkovic

    Joined:
    Jan 29, 2017
    Posts:
    4
    Thank you for the answer and the tips. As for multiple cameras issue the thing is that only one camera is drawing decals and this is set by layer and camera layer culling. Is it possible that GetDefferedDecals method is called only for camera that is drawing decals?
     
  19. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    There are a lot of unexposed properties and options in the deferred decal framework because the deferred projection is still in beta and there are frequent changes. But with version 1.6.5 (which get released next week) the system will automatically exclude unused cameras from the rendering queue.
     
  20. Nenad_Rajkovic

    Nenad_Rajkovic

    Joined:
    Jan 29, 2017
    Posts:
    4
    Looking forward for new version. Thank you for good support.
     
  21. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    You're welcome! :)

    We'll let you know when the new version is available.
     
  22. qaisarehman

    qaisarehman

    Joined:
    Nov 1, 2012
    Posts:
    2
    Hi, I recently bought the package and tried it on one of my project! I notice some issues which I would like to share!

    1- My floor on which I want the decals have 23k triangles. When I try to use Box projector, I got this error and the Decal texture wont show.

    Failed setting triangles. Some indices are referencing out of bounds vertices. IndexCount: 66915, VertexCount: 14
    UnityEngine.Mesh:set_triangles(Int32[])
    ch.sycoforge.Decal.Projectors.Geometry.DynamicMesh:ConvertToMesh(Mesh)
    ch.sycoforge.Decal.EasyDecal:AddDynamicMesh(DynamicMesh)
    ch.sycoforge.Decal.Projectors.BoxProjector:project()
    ch.sycoforge.Decal.EasyDecal:Update()

    I cut the floor to a small piece and the Box projector was working fine. Please share any method to fix this as I cant cut the floor into so many small pieces. thanks

    2-Using plane projector for decal, when i duplicated the projector Ctrl+D, and If I move the Duplicated projector to a different place which have different height! it causes the parent projector to auto align the height with child projector, and in another case! if I just move the duplicated projector down! the parent projector's texture move up in the space!

    please advice solution!
    thanks

     

    Attached Files:

  23. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    @qaisarehman Thank you for getting in touch.

    The Box projector uses an internal optimization when cutting the geometry of the receivers. This makes the algorithm "fast" for small scaled objects, but it will fail on objects with a huge amount of vertices. This behaviour will change in the upcoming version - the optimization will automatically get turned off or on.

    Ctrl+D just makes a shallow copy of the decal. This means that the decals share one mesh instance. This only makes sens when the decals are located on a similar surface. I would recommend using ALT+D in this case.

    Shallow Duplication (CTRL + D, CMD + D)
    The standard duplication makes a shallow copy of the decal object. The geometry gets shared between the instances. This duplication mode is suitable for decals that are on a similar surface (e.g. on a flat wall or floor). The original decal remains.

    Prefab Duplication(SHIFT + D)
    If the decal is an instance of a prefab, a new instance gets instantiated otherwise the system creates a deep copy of the current decal object. This duplication mode is suitable for prefab decals. The original decal remains.

    Deep Duplication (ALT + D)
    The deep duplication makes a deep copy of the decal object. The geometry gets cloned and is not shared between the instances. This duplication mode is suitable for decals that need the same properties, but need to be placed on different surfaces. The original decal remains.

    I hope this was helpful. :)
     
  24. qaisarehman

    qaisarehman

    Joined:
    Nov 1, 2012
    Posts:
    2
    Thanks for the feedback! yes i have checked the Duplication methods it work fine now! Looking forward for the box projection fix for the heavy meshes! thanks :)
     
  25. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Version 1.6.5 available for download.

    Changelog

    Features

    • Core: Exposed OnTechniqueChanged event.
    • Core: Replaced SDD projection core. Performance increased by ~450%.
    • Core: Box Projector automatically disables optimization for large meshes.
    • Core: Box Projector's performance increased by ~15%.
    • DSSD: Deferred decals no longer need a direct light source.
    • DSSD: Added support for Specular-Smoothness and Emission Maps.
    • DSSD: Added support for ambient light.
    • DSSD: Added support for baked and realtime shadows.
    • Editor: Expanded the stats in the Decal Root component.
    • Shader: Added priority particle shaders.

    Fixes
    • Core: Fixed coroutine error while fading out decal on deactivated parent.
    • Core: Fixed missing material when changing projection technique to 'Skinned Box' without reassigning a material.
    • Core: Fixed aspect correction not working properly (introduced in 1.6.4).
    • Core: Fixed aspect correction not working with last UV rect.
    • Core: Fixed issue with space conversion when reconstructing mesh data from static box collider.
    • Core: Fixed issue with not assigned SharedMesh property when OnProjectionFinished gets fired.
    • Core: Fixed memory allocations on fading out decal that was baked before.
    • Editor: Fixed UI freeze when created asset from baked scene decal.
    • Editor: Fixed regression when converting decal to mesh.
    • Editor: Fixed slow down on frequent use of undo/redo.
    • Atlas: Fixed issue with random region selection (last index was excluded from selection).
    • Shader: Fixed issue in 'ED Multiply' shader.


    Changes
    • Core: Made the methods OnChangedOrientation(), OnChangedAtlasIndex() and OnChangedTechnique() virtual.
    • Core: Changed CommandBuffer handling.
    • Core: Changed that deferred decals only allocate memory in the frame of instantiation.
     
  26. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    The cut optimization gets automatically disabled on heavy meshes now. But make sure that you dont use box projector mesh decals on such large meshes at runtime. When you need dynamic decals (placed at runtime) on such heavy meshes it's probably better to switch the Technique to Deferred or SSD . Those decals have a constant CPU time consumption and therefore their performance is predictable.

    You can download the latest version here.

    Please let us know if it's working now. :)
     
  27. LunaTrap

    LunaTrap

    Joined:
    Apr 10, 2015
    Posts:
    120
    Awesome! :D

    I would like to know how many triangles are too much for box the projection method? im refering to the problem @qaisarehman had, thanks!
     
  28. LunaTrap

    LunaTrap

    Joined:
    Apr 10, 2015
    Posts:
    120
    Updated to 1.6.5 and it messed up my decals, any idea? they seem like super zoomed in, im not using decal atlas for now, so these are using a material directly.



     
  29. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    It's hard to guess what's the max vertex amount as it depends on a lot of things (platform, usage, ..). But the cutter has a complexity of O(2n). This means that when you triple the vertices you have 6x the CPU time. So keeping the vertices (and combined mesh groups) as small as possible but as high as needed. :)

    Seems like the new core has a bug in the UV projection module when not using an atlas. o_O Thank you for reporting! Will be fixed in the next patch. Will let you know when it's online.
     
  30. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    @LunaTrap Fixed in patch 1 of version 1.6.5 (downloadable from website). Thank you very much for the fast report! :)
     
    Last edited: Feb 12, 2017
  31. LunaTrap

    LunaTrap

    Joined:
    Apr 10, 2015
    Posts:
    120
    Worked perfectly :) thanks!
     
  32. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    You're welcome! :)
     
  33. Zaki_X

    Zaki_X

    Joined:
    Jul 5, 2016
    Posts:
    55
    Hi nu!

    Two questions about "Easy Decals":

    Is there a way of creating decals that would have not only diffuse with alpha channels but for example normal and specular/metallic channel? :) I was thinking about creating puddles with decals.

    Does your decals system work with both deferred and forward rendering workflows?

    I thank you kindly in advance for a reply.

    - Mike
     
  34. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Hi Mike!

    Mesh Decals
    You are free to chose what ever material you want. Easy Decal comes with ports of the most important shaders to support vertex colors (mostly for fading puposes) and offsetting to suppress z-fighting. Both forward and deferred are supported.

    Deferred Decals
    Since version 1.6.5 (pending UAS but already available on our website) deferred decals come with support for Albedo, Normals, Specular -Smootheness and Emission maps. Only supported in deferred pipeline.

    For puddles I would recommend using mesh decals and combine them to a mega mesh to render them in one draw call.

    I hope this answers your questions! :)
     
    Last edited: Feb 18, 2017
  35. Zaki_X

    Zaki_X

    Joined:
    Jul 5, 2016
    Posts:
    55
    NU- omg! seriously? Thank you sooo much! :)
     
  36. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    You are welcome! :)
     
  37. HelloNan

    HelloNan

    Joined:
    Aug 10, 2012
    Posts:
    18
    I'm fresh to know about this plugin.
    1. I want to combine the drawcall at runtime. such as Bullet Hole.prefab, combine to one drawcall。 But from the demo of scene_tunnel, I found the drawcall increase when shot one prefab. How to reduce drawcall at runtime? I know the combine group manager, but it seems just work on editor and not dynamic.
    1111111111111111111.png
    2. The mesh not support vertex color design. Can support this in the future? As I see in other decal preject, there exist vertex color design of the decal mesh. So that I can't design different color of my decal just use vertex itself.
     
  38. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Currently, Easy Decal has no native support for geometry combining. But the framework comes with every callback and properties you'll need to implement an auto batcher on a per-receiver basis.

    Attach script to a empty child object to a possible decal receiver:

    Code (CSharp):
    1. using ch.sycoforge.Decal;
    2. using UnityEngine;
    3.  
    4. [RequireComponent(typeof(MeshFilter))]
    5. [RequireComponent(typeof(MeshRenderer))]
    6. public class DecalBatch : MonoBehaviour
    7. {
    8.     //--------------------------------
    9.     // Properties
    10.     //--------------------------------
    11.     public bool HasGeometry
    12.     {
    13.         get { return combinedFilter.sharedMesh != null && combinedFilter.sharedMesh.vertexCount > 0; }
    14.     }
    15.  
    16.     //--------------------------------
    17.     // Fields
    18.     //--------------------------------
    19.     private MeshFilter combinedFilter;
    20.     private MeshRenderer combinedRenderer;
    21.  
    22.     //--------------------------------
    23.     // Unity Methods
    24.     //--------------------------------
    25.  
    26.     private void Start()
    27.     {
    28.         combinedFilter = GetComponent<MeshFilter>();
    29.         combinedRenderer = GetComponent<MeshRenderer>();
    30.     }
    31.  
    32.     //--------------------------------
    33.     // Methods
    34.     //--------------------------------
    35.  
    36.     public void BatchDecal(EasyDecal decal)
    37.     {
    38.         if (decal == null) { return; }
    39.  
    40.         int lenOffset = HasGeometry ? 1 : 0;
    41.  
    42.         CombineInstance[] toCombine = new CombineInstance[1 + lenOffset];
    43.  
    44.         if(HasGeometry)
    45.         {
    46.             toCombine[0].mesh = combinedFilter.sharedMesh;
    47.             toCombine[0].transform = Matrix4x4.identity;
    48.         }
    49.         else
    50.         {
    51.             combinedFilter.mesh = new Mesh();
    52.         }
    53.  
    54.         toCombine[lenOffset].mesh = decal.SharedMesh;
    55.         toCombine[lenOffset].transform = decal.transform.localToWorldMatrix;
    56.  
    57.         // Add renderer and assign material
    58.         combinedRenderer.material = decal.DecalMaterial;
    59.  
    60.         // Create new mesh and combine
    61.         combinedFilter.mesh = new Mesh();
    62.         combinedFilter.mesh.CombineMeshes(toCombine);
    63.     }
    64. }
    65.  
    Change instantiator code to trigger batching when possible:

    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. namespace ch.sycoforge.Decal.Demo
    4. {
    5.     /// <summary>
    6.     /// Demo class for runtime decal placement.
    7.     /// </summary>
    8.     public class Instantiator : MonoBehaviour
    9.     {
    10.         //------------------------------------
    11.         // ExposedFields
    12.         //------------------------------------
    13.         public EasyDecal DecalPrefab;
    14.  
    15.  
    16.         //------------------------------------
    17.         // Methods
    18.         //------------------------------------
    19.  
    20.         public void Start()
    21.         {
    22.             if (DecalPrefab == null)
    23.             {
    24.                 Debug.LogError("The DynamicDemo script has no decal prefab attached.");
    25.             }
    26.         }
    27.  
    28.         public void Update()
    29.         {
    30.             if (Input.GetMouseButtonUp(0))
    31.             {
    32.                 // Shoot a mouseRay thru the camera starting at the mouse's current screen space position
    33.                 Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    34.                 RaycastHit hit;
    35.  
    36.                 // Check if mouseRay hit something
    37.                 if (Physics.Raycast(ray, out hit, 200))
    38.                 {
    39.                     // Instantiate the decal prefab according the hit normal
    40.                     EasyDecal decal = EasyDecal.ProjectAt(DecalPrefab.gameObject, hit.collider.gameObject, hit.point, hit.normal);
    41.                     decal.OnProjectionFinished += decal_OnProjectionFinished;
    42.                 }
    43.             }
    44.         }
    45.  
    46.         void decal_OnProjectionFinished(EasyDecal decal, Mesh mesh)
    47.         {
    48.             DecalBatch batch = decal.transform.parent.gameObject.GetComponentInChildren<DecalBatch>();
    49.  
    50.             // Owns the decal reciever a batch component?
    51.             if (batch != null)
    52.             {
    53.                 batch.BatchDecal(decal);
    54.             }
    55.  
    56.             decal.Baked = true;
    57.             Destroy(decal.gameObject);
    58.         }
    59.     }
    60. }
    61.  
    If have attched a example scene using this approach.

    Easy Decal version 2.x will come with vertex color manipulator and physics driven vertices (melting, grivity, etc)

    I hope this was helpful! :)
     

    Attached Files:

  39. HelloNan

    HelloNan

    Joined:
    Aug 10, 2012
    Posts:
    18
    How to project decal to mesh, not collider? As our RPG game can't every scene use meshcollider, and disable. How to set the decal editor to implement directly create decal mesh by project to mesh?

    I found there is maybe staticProxyCollection component. But I don't try it out how can use it without collider to decal.

    I also don't understand SSD mean? The document I think need a example, not just step!
     
  40. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Projection to colliderless meshes is possible, but not recommended, at least at runtime. Disable the Colliders Only option the Constraints tab to allow colliderless meshes as projection targets. But keep in mind that this method performs a linear scene search to find possible candidates.

    This is a possibility for keeping the mesh data around, but this will enlarge the overall memory footprint of your application.

    This is an acronym and means Screen Space Decal. Currently there's only one forward SSD shader included (multiply).
    Forward or deferred screen space decals would be the other way to go if you have a lot of static geometry with simplified colliders. But the SSD batching functionality will only be available in the Easy Decal 2.0 beta which will start in a few weeks and is open for all current users.
     
  41. cbc550

    cbc550

    Joined:
    May 10, 2013
    Posts:
    7
    Hello,

    I keep running into an issue using Shift-D to duplicate a prefab. It's often unresponsive. It seems that if the Hierarchy is focused Shift-D won't work. So to reproduce I'm selecting the prefab object in the hierarchy then hitting Shift-D. Nothing happens. It works fine if I selected the object in the Scene View.

    Thanks for any help you can give me.
     
  42. cbc550

    cbc550

    Joined:
    May 10, 2013
    Posts:
    7
    Me again,

    I was also wondering if there was some way to disable Smart Placement. Just in case I need those hotkeys for something else.
     
  43. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Thanks for getting in touch. We'll take a good look into this issue.

    Please keep in mind that Ctrl+D just makes a shallow copy of the decal. This means that the decals share one mesh instance. This only makes sens when the decals are located on a similar surface. I would recommend using ALT+D in this case.

    Shallow Duplication (CTRL + D, CMD + D)
    The standard duplication makes a shallow copy of the decal object. The geometry gets shared between the instances. This duplication mode is suitable for decals that are on a similar surface (e.g. on a flat wall or floor). The original decal remains.

    Prefab Duplication(SHIFT + D)
    If the decal is an instance of a prefab, a new instance gets instantiated otherwise the system creates a deep copy of the current decal object. This duplication mode is suitable for prefab decals. The original decal remains.

    Deep Duplication (ALT + D)
    The deep duplication makes a deep copy of the decal object. The geometry gets cloned and is not shared between the instances. This duplication mode is suitable for decals that need the same properties, but need to be placed on different surfaces. The original decal remains.


    Unfortunately no. But this will change. All hotkeys will be configurable in a future version.
     
  44. RemexChris

    RemexChris

    Joined:
    Aug 4, 2015
    Posts:
    16
    Hi there,
    Do your decals work on Unity terrain?
    Thanks
     
  45. LunaTrap

    LunaTrap

    Joined:
    Apr 10, 2015
    Posts:
    120
    Yes they do, very well
     
    Sycoforge and RemexChris like this.
  46. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Please excuse the late reply, we are in SF at the GDC and haven't that much time! As @LunaTrap said they work on terrains. When using mesh decals (Box, Plane) the LOD gets not reflected so one have to tweak the distance property.
     
  47. Netbandit

    Netbandit

    Joined:
    Feb 16, 2014
    Posts:
    18
    Hi

    I'm using the Honey Framework for a Hex-Map. In this Framework Hills and Mountains are generated by a vertex shader from a height texture.
    Now I want to have markers on this map (for example for the current active unit). I tried to use the Unity build in projector shader, but this does only work on flat terrain and the projection sprite is always below the hills at the ground level.

    Thus I wonder, if I it would work with this decal system? Any guesses about this?
     
  48. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    I think you can achieve this with deferred decals as they get injected before reflections. But mesh decals probably wont work as they geometry data is not around at the time needed.
     
    Netbandit likes this.
  49. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Hey, does this system work this scenario. Baked static lightmap and decal added at runtime? will it use light probes to lit correctly?
     
  50. Netbandit

    Netbandit

    Joined:
    Feb 16, 2014
    Posts:
    18
    Thanks for the answer. Can the deferred decals be attached to an object that is moving over the map, thus the unit highlighter is always at the same position where the unit is? And is it possible to ignore the unit mesh itself (I don't want to see the highlighter at the unit, but at the terrain below the unit).

    Do you also offer a Pro version with source code included? I have never seen the case so far where a asset from the store fits 100% to my needs. Often it fits almost and having the code would allow me to adapt it to really fit my needs. Which means not having the code is a massive drawback.