Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Decal System

Discussion in 'Assets and Asset Store' started by Dantus, Jun 29, 2012.

  1. kchandra

    kchandra

    Joined:
    Oct 24, 2015
    Posts:
    1
    Hi Dantus,

    Fantastic plugin!

    I have a robot that's made up of cubes with decals generated in runtime thats placed over several cubes.

    You are able to edit the robot by adding/removing more cubes and the decal plugin works great here where it molds accordingly.

    However, when the robots are in battle, the cubes can be shot of and the decals need to look cut off instead. Is this achievable with the plugin? or do you know a way i will be able to achieve this?

    Thank you!
     
  2. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Hi kchandra,

    When you are dealing with dynamic object or meshes and the Decal System, each of those dynamic objects should have its own Decal System. If your robot consists of a tremendous amount of cubes, this would consume a huge amount of resources. But, it there are just some cubes, I would give it a try. This is pretty much the standard approach.
    If this isn't an option for you, could you share a few more details about how the robot looks, whether it is one or several meshes and how it is being modified? If you can't or don't want to share this information in public, don't hesitate to mail me directly. In order to help you, I simply need a few more details.

    Hope this helps!
     
  3. xion1984

    xion1984

    Joined:
    Nov 6, 2015
    Posts:
    2
    Hi Dantus,

    Bought your Decal System a few months back and am trying it on a scene I am currently working on. Love the decal system but I am currently having problems with the lightmapping tool since its casting a shadow onto the mesh behind it. I think it has something to do with the AO pass, if so, is there a way to disable AO being cast by your decal system? Here is an image that I am currently having a problem with.

    Thanks!
     

    Attached Files:

  4. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Hi xion1984,
    I didn't spend enough time so far to get an in depth understanding of the new light mapping tools in Unity.
    I am currently finishing the update of the Decal System to Unity 5 and will have a look at the issue as soon as this is done.
     
  5. xion1984

    xion1984

    Joined:
    Nov 6, 2015
    Posts:
    2
    Thanks Dantus,

    Looking forward to your update!
     
  6. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    780
    @Dantus - is the update likely to still be a couple of weeks off? I was just about to start using the Decal system pro but I could do it all in photoshop if I had to, I would prefer not to if at all possible so a rough estimate of when the update might land would be appreciated.
     
  7. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    It's days, definitely not weeks!
     
  8. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    780
    That's great I'll await the update and get on with something else until it turns up.
     
  9. DoGames

    DoGames

    Joined:
    Jun 6, 2015
    Posts:
    3
    Hi there,

    Sorry to ask that but is it possible to use the feature of your plug via PlayMaker? In other words could I create decals at run-time via a PlayMaker FSM (like spreading blood on the background)?

    Thank you
     
  10. KainAsylum

    KainAsylum

    Joined:
    Mar 26, 2013
    Posts:
    52
    Hello, Does the latest version of Decal System Pro work with IL2CPP?
    Right now, we are using the old discontinued version because the project was started very long ago.
    When compiling with IL2CPP active, we get the following error:
    Code (csharp):
    1. Fatal error in Mono CIL Linker
    2. System.Exception: Error processing method: 'UnityEngine.Transform Edelweiss.DecalSystem.Decals::get_LightProbeAnchor()' in assembly: 'DecalSystem.Runtime.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.Transform UnityEngine.Renderer::get_lightProbeAnchor()
    3.  
    It seems that it was using renderer.lightProbeAnchor, which is not available in the Unity version we are using 5.2.3. We need to use Unity 5 because Unity 4 is no longer supported for Playstation 4 development.

    We will definitely switch to PRO if anyone can confirm compatibility with IL2CPP, but it seems as if the package currently in the asset store was submitted with Unity 4.0.1, and I am not sure if was tested with the latest version of Unity.
     
    Last edited: Nov 23, 2015
  11. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    780
    @Dantus - any news on the update? I've got to start on these decals and given that the update is now clearly not 'days' is it awaiting approval by Unity or not yet submitted? and given that Unity seems to take 2 weeks to clear this stuff, it would be handy to know, I don't want to start buggering about in photoshop if the update will land on Monday, if you are still unsure when it will be finished then I'll use other means to do the job.
     
  12. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    The delay is not caused by anyone from the Asset Store. I have been working on it during the past few days and it is currently at a point where I am confident to say, that it will be finished this weekend.

    I am sorry to everyone who is waiting for this update!
     
  13. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    780
    No need to apologise, I'm aware there are delays when doing this sort of stuff, like everyone you have a life and other priorities, I was merely asking so I know where I am in regards to moving the project along. Might it be possible to get a download on Monday if it is done (obviously I will provide proof of purchase)? If that's not possible I will just get on and do stuff in photoshop, I'm not taking you to task over the matter, I've just reached the stage where I need to decide how to do this thing either in photoshop or with decal pro.
     
  14. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Of course! Please send me a mail with your invoice number and I will do that.
     
  15. ruj

    ruj

    Joined:
    Feb 28, 2013
    Posts:
    113
    @Dantus,
    I am working with Kain, and we have purchased the pro version to see if it will address our issues. Is there any chance I could also get a version of the 5x package? Do I contact you through the website? Thanks for the amazing piece of software!

    Stephen
     
  16. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    780
    Well I started a converstion with Dantus and sent my invoice and email and heard nothing back so tomorrow I will do the job in photoshop, clearly the decal system is not yet ready.
     
  17. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Hi everyone!

    I just sent the update to everyone who purchased the Decal System Pro and asked me to send an update. In the case that you haven't got the update, please contact me by mail with the invoice number of your purchase.

    I am certainly going to update it in the Asset Store, but according to other publishers, the review time seems to be relatively long at the moment.
     
  18. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    780
    Thanks very much for getting decal pro to me, it is much appreciated.
     
  19. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    780
    @Dantus - Does the decal system with all other shaders when getting the target bump map i.e. one can use Unity PBS, Candela SSR, Uber or Alloy, and it makes no difference?
     
  20. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    You can use any shader for the Decal System that you want. At the moment, there are no shaders that show the decals with Unity's new PBS, but those will be added step by step. If you are currently using the Standard shader, you most likely want to show the decals with the same kind of rendering to get a consistent appearance. There are no special shaders for that right now, but it is planned to create decal shaders for at least the Standard shader if needed.
    If you need something special, let me know. If it fits with the Decal System, I may be able to create it now and integrate it. Otherwise I may be able to help you about how you can achieve it.
     
  21. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    780
    @Dantus - okay, thanks, that clarifies a few things.
     
  22. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Hi there Dantus,

    I have send you a mail with my invoice number for the update. Can you check it?
     
  23. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I am going to send you the update within the next few days. I didn't miss the mail, but made the mistake to mark it as read. Sorry about that!

    Edit: I am currently not using the computer on which I have the development version of the Decal System, that's why I can't send it to you right now.
     
    Project-Mysh likes this.
  24. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    945
    Been looking at getting your decal system for a while but have a quick question for you. I did a very simple decal system myself a little while back but ran into a problem when trying to add decals at runtime to static objects when Static batching is turned on, Unity gives an error about accessing vertices on combined meshes. Does your system allow the adding of decals at runtime to static meshes with static batching on, or do I need to turn of static batching on my build or make any object I want to apply a decal to non static?
     
  25. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    It is not possible in Unity to make a mesh static at runtime or to extend it. However, the Decal System allows you to project decals onto static meshes if the mesh data is available at runtime (e.g. through a collision mesh).
    I am not entirely sure whether this answers your question, so don't hesitate to ask for more classifications.
     
  26. Taorcb

    Taorcb

    Joined:
    Mar 15, 2015
    Posts:
    39
    Hey,
    I'm trying to use a modified version of the Bullets demo script that I can call from my bullets using a ray and a raycastHit as parameters. The problem is, the function is called correctly but the decal fails to appear. Nothing is visible in the hierarchy. Here's the function (It's more or less copy/pasted):

    Code (CSharp):
    1. public void AddDecal(Ray l_Ray, RaycastHit l_RaycastHit)
    2.     {
    3.         Debug.Log("AddDecal() was called!");
    4.         // Calculate the position and rotation for the new decal projector.
    5.         Vector3 l_ProjectorPosition = l_RaycastHit.point - (decalProjectorOffset * l_Ray.direction.normalized);
    6.         Vector3 l_ForwardDirection = -l_RaycastHit.normal;
    7.         Quaternion l_ProjectorRotation = Quaternion.LookRotation(l_ForwardDirection);
    8.         TerrainCollider l_TerrainCollider = l_RaycastHit.collider as TerrainCollider;
    9.  
    10.         if (l_TerrainCollider != null)
    11.         {
    12.             // Terrain collider hit.
    13.             Terrain l_Terrain = l_TerrainCollider.GetComponent<Terrain>();
    14.             if (l_Terrain != null)
    15.             {
    16.                 // Create the decal projector with all the required information.
    17.                 DecalProjector l_DecalProjector = new DecalProjector(l_ProjectorPosition, l_ProjectorRotation, decalProjectorScale, cullingAngle, meshOffset, m_UVRectangleIndex, m_UVRectangleIndex);
    18.                 // Add the projector to our list and the decals mesh, such that both are
    19.                 // synchronized. All the mesh data that is now added to the decals mesh
    20.                 // will belong to this projector.
    21.                 m_DecalProjectors.Add(l_DecalProjector);
    22.                 m_DecalsMesh.AddProjector(l_DecalProjector);
    23.  
    24.                 // The terrain data has to be converted to the decals instance's space.
    25.                 Matrix4x4 l_TerrainToDecalsMatrix = Matrix4x4.TRS(l_Terrain.transform.position, Quaternion.identity, Vector3.one) * m_WorldToDecalsMatrix;
    26.  
    27.                 // Pass the terrain data with the corresponding conversion to the decal mesh.
    28.                 m_DecalsMesh.Add(l_Terrain, l_TerrainToDecalsMatrix);
    29.  
    30.                 // Cut the data in the decals mesh accoring to the size and position of the decal projector. Offset the
    31.                 // vertices afterwards and pass the newly computed mesh to the decals instance, such that it becomes
    32.                 // visible.
    33.                 m_DecalsMeshCutter.CutDecalsPlanes(m_DecalsMesh);
    34.                 m_DecalsMesh.OffsetActiveProjectorVertices();
    35.                 m_Decals.UpdateDecalsMeshes(m_DecalsMesh);
    36.  
    37.                 // For the next hit, use a new uv rectangle. Usually, you would select the uv rectangle
    38.                 // based on the surface you have hit.
    39.                 //NextUVRectangleIndex();
    40.             }
    41.         }
    42.         else
    43.         {
    44.             // We hit a collider. Next we have to find the mesh that belongs to the collider.
    45.             // That step depends on how you set up your mesh filters and collider relative to
    46.             // each other in the game objects. It is important to have a consistent way in order
    47.             // to have a simpler implementation.
    48.             MeshCollider l_MeshCollider = l_RaycastHit.collider.GetComponent<MeshCollider>();
    49.             MeshFilter l_MeshFilter = l_RaycastHit.collider.GetComponentInParent<MeshFilter>();
    50.  
    51.             if (l_MeshCollider != null || l_MeshFilter != null)
    52.             {
    53.                 Mesh l_Mesh = null;
    54.                 if (l_MeshCollider != null)
    55.                 {
    56.                     // Mesh collider was hit. Just use the mesh data from that one.
    57.                     l_Mesh = l_MeshCollider.sharedMesh;
    58.                 }
    59.                 else if (l_MeshFilter != null)
    60.                 {
    61.                     // Otherwise take the data from the shared mesh.
    62.                     l_Mesh = l_MeshFilter.sharedMesh;
    63.                 }
    64.                 if (l_Mesh != null)
    65.                 {
    66.                     Debug.Log("Hit a non-static object and found a mesh. Theoretically creating decal.");
    67.                     // Create the decal projector.
    68.                     DecalProjector l_DecalProjector = new DecalProjector(l_ProjectorPosition, l_ProjectorRotation, decalProjectorScale, cullingAngle, meshOffset, m_UVRectangleIndex, m_UVRectangleIndex);
    69.  
    70.                     // Add the projector to our list and the decals mesh, such that both are
    71.                     // synchronized. All the mesh data that is now added to the decals mesh
    72.                     // will belong to this projector.
    73.                     m_DecalProjectors.Add(l_DecalProjector);
    74.                     m_DecalsMesh.AddProjector(l_DecalProjector);
    75.  
    76.                     // Get the required matrices.
    77.                     Matrix4x4 l_WorldToMeshMatrix = l_RaycastHit.collider.GetComponentInParent<Renderer>().transform.worldToLocalMatrix;
    78.                     Matrix4x4 l_MeshToWorldMatrix = l_RaycastHit.collider.GetComponentInParent<Renderer>().transform.localToWorldMatrix;
    79.  
    80.                     // Add the mesh data to the decals mesh, cut and offset it before we pass it
    81.                     // to the decals instance to be displayed.
    82.                     m_DecalsMesh.Add(l_Mesh, l_WorldToMeshMatrix, l_MeshToWorldMatrix);
    83.                     m_DecalsMeshCutter.CutDecalsPlanes(m_DecalsMesh);
    84.                     m_DecalsMesh.OffsetActiveProjectorVertices();
    85.                     m_Decals.UpdateDecalsMeshes(m_DecalsMesh);
    86.  
    87.                     // For the next hit, use a new uv rectangle. Usually, you would select the uv rectangle
    88.                     // based on the surface you have hit.
    89.                     //NextUVRectangleIndex();
    90.                 }
    91.             }
    92.         }
    93.     }
    Both of the added Debug.Log()s fire, so I'm at a loss.
     
  27. ZoltanErdokovy

    ZoltanErdokovy

    Joined:
    Aug 23, 2012
    Posts:
    100
    Hi. I have a weird problem: I dusted off an old project of mine and wanted to move it to from Unity 4.3 to Unity 5. It uses the free version of the decal plugin. At some point while the editor is running my antivirus (Comodo Internet Security) kills the DecalSystem.Runtime.dll because it's supposedly contains a trojan. I tried all my backups but I don't have a different version of that dll, each one gets deleted if used. I checked the asset store to get the package but couldn't find the plugin. How could I get a definitely clean version of the decal system's 1.4.1 version?
     
  28. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    @Taorcb, which version of the Decal System are you using? Which value are you using for the decalProjectorOffset? What's the size of the actual projector?

    @ZoltanErdokovy, the free version of the plugin doesn't exist anymore. Feel free to pm me your email address. I can send you the old version, though chances are high that it is a false positive and you are getting the same problem with that one.
     
  29. ZoltanErdokovy

    ZoltanErdokovy

    Joined:
    Aug 23, 2012
    Posts:
    100
    Thank you Dantus. I suspect it is indeed a false positive but I want to be sure before contacting Comodo about it.
     
  30. ZoltanErdokovy

    ZoltanErdokovy

    Joined:
    Aug 23, 2012
    Posts:
    100
  31. mkenneally

    mkenneally

    Joined:
    Feb 26, 2016
    Posts:
    2
    If I have a decal manager class and want to apply decals to both skinned and unskinned meshes, what's the best way to go about this? Right now I have two versions of the DS_SkinnedDecal and DS_Decal and all the other classes that go along with each. Is there a way to just define one DS_Decal/DS_SkinnedDecal that can be used by both skinned and unskinned meshes?
     
  32. davimusprime

    davimusprime

    Joined:
    Feb 23, 2016
    Posts:
    10
    @Dantus, would I be able to use this asset to get dynamic text to wrap around a model via script?
     
  33. davimusprime

    davimusprime

    Joined:
    Feb 23, 2016
    Posts:
    10
    @Dantus, it possible to get the decals to act more like stickers and less like projections? I've got a sphere that I want a decal to wrap around but not stretch when it starts wrapping around the middle. Using culling angle to get it to project to the lower half of the sphere, btw.
     
  34. andympage101

    andympage101

    Joined:
    Jun 7, 2013
    Posts:
    12
    Hey, I've just setup the pro version on a project for unity 5 but i'm getting all sorts of errors, having checked the download from the asset website it looks like it has not been updated in a long while but there are talks of a new version, am I missing something or do I need to contact the developer for the new version?
     
  35. andympage101

    andympage101

    Joined:
    Jun 7, 2013
    Posts:
    12
    Im guessing this has been abandoned?
     
  36. GuyP88

    GuyP88

    Joined:
    May 24, 2016
    Posts:
    6
    @andympage101
    "Im guessing this has been abandoned?"
    -I hate to say it but, probably...His last post is from Feb 12, 2016, and I think his last 'product' post is from this thread on Jan 25, 2016. No idea why (maybe Unity 5 / sick / just got tired of it, who knows).
     
  37. HummerBumble

    HummerBumble

    Joined:
    Apr 13, 2013
    Posts:
    20
    @GuyP88
    I think so too, although he seemed to be quite an active member of the community so he may return at some point. I sent one or two emails about a month ago an he hasn't replied so could be on holiday, or as you said "just got tired of it". I've abandoned minor (but free) products in the past so I understand that, but I've just bought this product which stands at over $100 (with tax) so it sucks that there wasn't a notice somewhere which said it wasn't being supported any longer or whatever.
     
  38. GuyP88

    GuyP88

    Joined:
    May 24, 2016
    Posts:
    6
    @HummerBumble
    I can completely appreciate that as well. But unless someone that knows him says anything, I don't know how we would ever know. Maybe you could try sending Unity something about an asset that is still being sold but has no support? I don't know if there is some rule about 'having to provide support' or not.
     
  39. RussellFincher

    RussellFincher

    Joined:
    Sep 30, 2012
    Posts:
    57
    Disappointing. This asset looked perfect for me.
     
  40. Bas-Smit

    Bas-Smit

    Joined:
    Dec 23, 2012
    Posts:
    155
    Yeah this asset is abandoned, I chatted to the creator early 2016 but he never got around to updating it.
     
  41. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,726
    Abandoned is a strong word. It would be abandoned if there are existing bugs which should be fixed, or no support for 5.5.

    It is not abandoned, if it is complete and doesn't have bugs. It's simply done. If there are bugs and it's $100, then you're welcome to post reviews, it's what they're for. Be sure to update once bugs are fixed though.
     
  42. Bas-Smit

    Bas-Smit

    Joined:
    Dec 23, 2012
    Posts:
    155
    It was last updated on Jan 10th, 2014 using 4.0.1, and does not compile on 5x. With a little work Im sure you could get it to work, but it's no longer supported by the author.

    (I bought this package almost a year ago btw, perhaps unity's auto upgrade feature can fix it now, but it couldnt at the time)
     
    Last edited: Nov 25, 2016
  43. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,726
    I see, well that's abandoned then.
     
  44. RussellFincher

    RussellFincher

    Joined:
    Sep 30, 2012
    Posts:
    57
    I hope the creator is doing OK, he does seem to have just disappeared. I'm hesitant to post this, but for those that are desperate for an asset like this and found yourself disappointed by not being able to use it with current versions of Unity, there is another full-featured decal system in the Asset Store for a third of the price that seems very similar. I'm trying it out and it's working well with Unity 5.4+.
     
    Last edited: Nov 25, 2016
  45. Unplug

    Unplug

    Joined:
    Aug 23, 2014
    Posts:
    245
    a few question, im trying to get projection on tessellated ground surface. actually trying to make vinesfx to work on tessellated ground surface. Does your system support it ?
     
unityunity