Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Decal System

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

  1. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    @janpec: The Decal System is freely available, you can just download it. Decal projectors are automatically combined into one mesh if possible to keep the draw calls as low as possible. This is also explained at the end of the introduction video.
     
  2. Ken-T

    Ken-T

    Joined:
    Jun 15, 2012
    Posts:
    19
    Thanks!
     
  3. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    Hey there,
    thanks for an awesome piece of gamedev tech that had been missing from the Unity arsenal for way too long :)

    I'm using the BulletExampleCS code right now and I'd like to ask, is it possible to use layers to restrict the decal creation ?
    The decal prefab I'm using has the layer mask set, but it looks like its not being used when creating new decals by script.

    Thanks in advance, Patrick
     
  4. Dantus

    Dantus

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

    You can certainly use layers. The layer mask in the decal projectors is only used in the editor for the filtering. When you implement something on your own you need to check that in your code. Check if the hit game object belongs to the layer or not.

    Hope this helps!
     
  5. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    Sorry, I should have explained myself better.
    Actually, the raycast hit testing is working fine with layers.

    Here's what I'm trying to achieve :
    I'm sawing this windshield in two, projecting decals to draw the cut. Later, the roof will be lifted off, taking the top half of the windshield with it.
    The window is pre-cut, the top and bottom part are in different layers.
    I create decals on both halves of the window and hoped that the layer mask would clip them to the window half that they are projected on but so far I have been unable to achieve that.
     
  6. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    For such a situation you need to have two DS_Decals, one for each part of the window. The best solution from my point of view is to make them children of the individual window parts, such that they are moved with them.
    What I explain is very much what is covered in that video. At least it will help you to understand what I mean.
     
  7. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    Cool, I'm relieved to hear that it's within the possibilities of the decal system.
    Thanks for the link, I will dive into this first thing tomorrow morning, time for bed now.

    Ciao, Patrick
     
  8. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    I downloaded the package from the unity store, imported it into my existing project, dropped the gizmo into the correct folder, and attempted to create a decal using an existing material. I am getting the following error:


    Unity version 3.5.6f4

    What have I done wrong?
     
  9. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    @Shane C: Welcome to the forum!

    The mesh onto which you want to project a decal has both vertices and normals. Unfortunately the number of vertices and normals is not equal, meaning your mesh has a wrong format.

    Is this mesh procedurally generated? If it is an imported one, you have probably got an error message.
     
  10. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    Dantus, thanks very much for your help.
    I've found a workaround to control the geometry that is being projected on by script.
    You just have to explicitly specify which collider you want to project on in DecalCreator.AddDecal()

    In case somebody else is having the same problem, here's my changes.

    Ciao, Patrick
     
  11. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Thanks Patrick for sharing the script!
     
  12. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    297
    Hi Dantus, one more question:
    The performance I'm getting on iPad is not sufficient.
    I think the best way to overcome this is to pre-create the decal geometry (preferably by script) and show it when needed at runtime.
    What would be the easiest way to save the generated decal meshes ?
     
  13. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    To save a generated mesh, you always have to use the AssetDatabase. From my point of view that's the best most practical and reliable way.
     
  14. Shane-C

    Shane-C

    Joined:
    Nov 9, 2012
    Posts:
    211
    Thanks for the quick reply, Dantus, but your advice isn't helping. I have hundreds of models in my scene.

    The mesh I tried to project onto is a cube. I can't even grab the transform gizmo to attempt to project onto something else, because as soon as I touch it, the gizmo and box disappears, and I get thousands of that error in the console, locking up the project for a good few seconds.

    I did manually move coordinates around.. even into thin air at one point, and still got the same error.
     
  15. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    @Shane C, it seems that the Decals instance got into an invalid state due to the invalid mesh data. Have you tried to press the Update Child Projectors or Update All Projectors buttons in the inspector?
     
  16. fano_linux

    fano_linux

    Joined:
    Jan 1, 2012
    Posts:
    909
    just can't beleave my eyes...Thank you man... i'll try it for sure
     
  17. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    :)
    I am curious to hear what you think about it!
     
  18. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    For your information: The issue reported by Shane C is now resolved in my code base and will be in the next release. Thanks for reporting!
     
  19. alex1560

    alex1560

    Joined:
    Sep 3, 2012
    Posts:
    15
    Hi, I just got your decals system, working very nice, but I am using a shader from EasyRoads3d.. to make the roads draw first instead of the terrain, that's causing the shader of the material on the decal to be blocked.. I've changed it to the easyroads shader as well.. but now I get a flickering ... any way of getting around that ? maybe another shader for the roads but still keeping them on top of the terrain.. I am interested to make a $50 donation if you can help me with this issue.. send me a PM if you can help me and if there is available a donation page...

    Other than that.. good work..
     
  20. alex1560

    alex1560

    Joined:
    Sep 3, 2012
    Posts:
    15
    I just created another shader to use for my roads.. I used the geometry Queue and did solved the issue.. I also had to rise the road a bit from the ground to avoid the flickering..

    Everything else is just fine.. I will look into the donation thing by my self and hopefully you will be able to put more work into this and get this on the assets store for sale.. because this will add a lot on the scene if used properly.. Good luck!
     
  21. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Great, you found a solution on your own!
    There will be a paid extension for the Decal System earlier or later. I just didn't have the time to put everything together.
     
  22. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I have been contacted by the awesome alex1560. The solution to the issue was to raise the Offset in the shader. So everyone who has the same issue in relation with EasyRoads3D or any other package. In general you need to make sure that offset of the decal shader is higher that the one of the mesh onto which you are projecting.
    Thanks alex1560 for that information!
     
  23. underdog3dee

    underdog3dee

    Joined:
    Aug 17, 2012
    Posts:
    4
    Is there a way to change the index of the UV rectangle of a single projector without having to "update all projectors"? I want to switch an existing projectors UV index on the fly with out having to incur the cost of updating all the projectors. Currently I do "projector.uv1RectangleIndex = N", where N is some index pre-defined but there is a noticeable lag when I update all projectors. Seems like I should be able to update just a single projector? Thanks.
     
  24. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    @underdog3dee, the easiest way to do that at runtime, is to remove the projector, add it again with the new uv rectangle index and add all the affected meshes. This should work in most cases and should also be fast enough, as long as you don't want to display an animation in that way. There would be other ways to achieve a good performance for animations. You would need to access the uv data directly in the decals mesh.

    Hope this helps.
     
  25. nsxdavid

    nsxdavid

    Joined:
    Apr 6, 2009
    Posts:
    476
    @dantus So when I put a decal in my scene and start dragging it around, I get the following spamming the console:

    Shader wants tangents, but the mesh doesn't have them
    UnityEditor.DockArea:OnGUI()


    It still functions properly, but that doesn't look happy. Am I doing something wrong?

    David
     
  26. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    @nsxdavid, there are two ways. Use a shader that doesn't require tangents, or change the projection for the decals. If you need the tangents because you are using a bump shader, you need to change the Projection of the Decals to BumpedDiffuse.
     
  27. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Daaaaamn! Just grabbed this off the asset store, it was exactly what I needed!
    One thing I noticed about the Bootcamp decals were that they had to be at *just* the right orientation, otherwise they became massively stretched in one direction. Really annoying. For some reason, they were also calling GC.Collect upon the decal being created, which of course with bullet holes became incredibly laggy.
    This, however, doesn't seem to have any issues like that, which is perfect! :D
    My only regret is that I can't really afford to donate right now. For that, I apologize :C
     
  28. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    @PhobicGunner, thanks for the kind words! About the stretching, you can somehow avoid it, if you don't use the forward direction of the bullet as orientation, but the normal of the surface which gets hit. There is no solution from my point of view that works in all situation, that's why I just picked one of them.
     
  29. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    That's not what I was talking about. Stretching with glancing angles is fine. With the bootcamp system, however, like if I have a decal pointing straight down on a completely horizontal surface, for whatever reason different rotations around the y-axis would cause it to stretch off into infinity (and then get clipped by the decal frustom, resulting in a bizarre smear as if the texture repeat on the x-axis were set to zero)
    This doesn't seem to suffer from that issue, however. For that, I'm happy :D
     
  30. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Ahh! Got it :)
     
  31. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    please release a skinned mesh version, will pay for it.
     
  32. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I would love to publish a working skinned decals version. The basic implementation that already exists now would need to be modified a little, but the real main complexity is to get all the edge cases working which is a HUGE amount of work. My main concern right now is that I am unsure if it would work good enough afterwards.
    Be assured that I will look into that topic again in the future, but it is not very high in the priority list right now. This is too complex to solve within a few days!
     
  33. mvxy

    mvxy

    Joined:
    Nov 28, 2012
    Posts:
    3
    Hi

    i'm using Decal System in 2 different Unity Projects, with
    the same texture, material, shader and the same parameters in the Decal System (e.g. meshoffset).
    and i get 2 different results. Why?

    The images of the resutl are in the attachments.

    $image02.jpg $image01.jpg

    thx

    mvxy
     
    Last edited: Nov 28, 2012
  34. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    @mvxy, welcome to the forum!

    I guess, even if you stated it differently, that two different shaders are used. The area where the two decal projectors are intersecting is very different. In the first picture you can only see the upper decal projector. While in the second one, the color values seem to be multiplied/added or something in that direction. That's why assume that two different shader were used.

    Hope this helps.
     
  35. mvxy

    mvxy

    Joined:
    Nov 28, 2012
    Posts:
    3
    No, in both examples I'm using "Decal/Transparent Diffuse".
    And I have opend both shaders in the editor, they are identically.

    Marcus
     
  36. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Can you post a reproduction of the issue here? Meaning two nearly empty projects that only contain the relevant parts, such that the issue is visible.
     
  37. mvxy

    mvxy

    Joined:
    Nov 28, 2012
    Posts:
    3
    Dantus thank you for your help.

    I have found an workaround for the moment.

    The two projects have differnent lighting. To achieve that the colorvalues are not addad i changed one line in the "Decal/Transparent Diffuse" Shader. Using emission instead of albedo and at the moment it works.

    Code (csharp):
    1.  
    2. void surf (Input IN, inout SurfaceOutput o) {
    3.     fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
    4.     //o.Albedo = c.rgb;   // old
    5.     o.Emission = c.rgb;  // new
    6.     o.Alpha = c.a;
    7. }
    8.  
    thx

    Marcus
     
  38. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Marcus, it's good you found a way that works in your context!
     
  39. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Just started using this last week and it's absolutely awesome!

    One question though, the system seems to create a series of "Decals Mesh x" meshes that reside in the \Assets folder. Can I move these or somehow change where they are saved to? I'm using quite a few decals in my scene and it would be nice to be able to remove them from cluttering up my Project panel view.
     
  40. gord0x64

    gord0x64

    Joined:
    Nov 28, 2012
    Posts:
    7
    Hi there, I've taken your bullet example and modified it to suit my needs. The scene in which I'm working on has some statues that birds poop on. The poop leaves poop splatter decals on the statues.

    As you can see in the code below I put a number of debugs in to check the vertex count of the decal mesh. After the CutDecalsPlanes method there are 0 vertices. The result is that you see no decal. If I comment out the line. It uses the entire original mesh of the object (in this case the whole statue) and it tiles the portion selected in the atlas all over the statue.

    I'm probably missing something simple, but would appreciate any help you can provide.

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4. using System.Collections.Generic;
    5. using Edelweiss.DecalSystem;
    6.  
    7. public class PigeonProblemsPoopSplatDecal : MonoBehaviour
    8. {
    9.  
    10.     // The prefab which contains the DS_Decals script with already set material and
    11.     // uv rectangles.
    12.     public GameObject decalsPrefab;
    13.  
    14.     // The reference to the instantiated prefab's DS_Decals instance.
    15.     private DS_Decals m_Decals;
    16.     private Matrix4x4 m_WorldToDecalsMatrix;
    17.  
    18.     // All the projectors that were created at runtime.
    19.     private List<DecalProjector> m_DecalProjectors;
    20.  
    21.     // Intermediate mesh data. Mesh data is added to that one for a specific projector
    22.     // in order to perform the cutting.
    23.     private DecalsMesh m_DecalsMesh;
    24.     private DecalsMeshCutter m_DecalsMeshCutter;
    25.  
    26.     // The raycast hits a collider at a certain position. This value indicated how far we need to
    27.     // go back from that hit point along the ray of the raycast to place the new decal projector. Set
    28.     // this value to 0.0f to see why this is needed.
    29.     public float decalProjectorOffset;
    30.  
    31.     // The size of new decal projectors.
    32.     public Vector3 decalProjectorScale = new Vector3(0.2f, 2.0f, 0.2f);
    33.     public float cullingAngle = 90.0f;
    34.     public float meshOffset = 0.001f;
    35.  
    36.     // We iterate through all the defined uv rectangles. This one indices which index we are using at
    37.     // the moment.
    38.     private int m_UVRectangleIndex = 0;
    39.  
    40.     protected bool _bPositionSet; //have we been placed where we need to be?
    41.     protected Vector3 _destination; //where we need to be
    42.     protected MeshCollider _targetCollider; //collider of what we're to project on
    43.  
    44.     void Awake()
    45.     {
    46.         m_DecalProjectors = new List<DecalProjector>();
    47.         decalProjectorOffset = 0.5f;
    48.         _bPositionSet = false;
    49.         _destination = Vector3.zero;
    50.         _targetCollider = null;
    51.     }
    52.  
    53.     private void Start()
    54.     {
    55.         // Instantiate the prefab and get its decals instance.
    56.         GameObject l_Instance = Instantiate(decalsPrefab) as GameObject;
    57.         m_Decals = l_Instance.GetComponentInChildren<DS_Decals>();
    58.  
    59.         if (m_Decals == null)
    60.         {
    61.             Debug.LogError("The 'decalsPrefab' does not contain a 'DS_Decals' instance!");
    62.         }
    63.         else
    64.         {
    65.             // Create the decals mesh (intermediate mesh data) for our decals instance.
    66.             // Further we need a decals mesh cutter instance and the world to decals matrix.
    67.             m_DecalsMesh = new DecalsMesh(m_Decals);
    68.             m_DecalsMeshCutter = new DecalsMeshCutter();
    69.             m_WorldToDecalsMatrix = m_Decals.CachedTransform.worldToLocalMatrix;
    70.         }
    71.     }
    72.  
    73.     private void Update()
    74.     {
    75.         if (_bPositionSet) //if our position is set
    76.         {
    77.             // Calculate the position and rotation for the new decal projector.
    78.             Vector3 l_ProjectorPosition = /*l_RaycastHit.point*/_destination - (decalProjectorOffset * -Vector3.up);
    79.             Vector3 l_ForwardDirection = Camera.main.transform.up;
    80.             Vector3 l_UpDirection = -Camera.main.transform.forward;
    81.             Quaternion l_ProjectorRotation = Quaternion.LookRotation(l_ForwardDirection, l_UpDirection);
    82.  
    83.             // Randomize the rotation.
    84.             Quaternion l_RandomRotation = Quaternion.Euler(0.0f, Random.Range(0.0f, 360.0f), 0.0f);
    85.             l_ProjectorRotation = l_ProjectorRotation * l_RandomRotation;
    86.  
    87.             if (_targetCollider!=null) //if we have a target
    88.             {
    89.                 // We hit a collider. Next we have to find the mesh that belongs to the collider.
    90.                 // That step depends on how you set up your mesh filters and collider relative to
    91.                 // each other in the game objects. It is important to have a consistent way in order
    92.                 // to have a simpler implementation.
    93.  
    94.                 MeshCollider l_MeshCollider = _targetCollider;
    95.                 MeshFilter l_MeshFilter = _targetCollider.gameObject.GetComponent<MeshFilter>() as MeshFilter;
    96.  
    97.                 Debug.LogError("(_targetCollider.gameObject.GetComponent<MeshFilter>() as MeshFilter).sharedMesh.vertices.Length: " +
    98.                                (_targetCollider.gameObject.GetComponent<MeshFilter>() as MeshFilter).sharedMesh.vertices.Length);
    99.  
    100.                 Debug.LogError("_targetCollider.sharedMesh.vertices.Length: " + _targetCollider.sharedMesh.vertices.Length);
    101.  
    102.                 if (l_MeshCollider == null) { Debug.LogError("l_MeshCollider is null!"); }
    103.                 if (l_MeshFilter == null) { Debug.LogError("l_MeshFilter is null!"); }
    104.  
    105.                 if (l_MeshCollider != null || l_MeshFilter != null)
    106.                 {
    107.                     Mesh l_Mesh = null;
    108.                     if (l_MeshCollider != null)
    109.                     {
    110.                         // Mesh collider was hit. Just use the mesh data from that one.
    111.                         l_Mesh = l_MeshCollider.sharedMesh;
    112.                     }
    113.                     else if (l_MeshFilter != null)
    114.                     {
    115.                         // Otherwise take the data from the shared mesh.
    116.                         l_Mesh = l_MeshFilter.sharedMesh;
    117.                     }
    118.  
    119.                     if (l_Mesh != null)
    120.                     {
    121.                         //Debug.LogError("about to make the projector");
    122.                         Debug.LogError("l_Mesh.vertices.Length: " + l_Mesh.vertices.Length);
    123.                        
    124.                         // Create the decal projector.
    125.                         DecalProjector l_DecalProjector = new DecalProjector(l_ProjectorPosition, l_ProjectorRotation, decalProjectorScale, cullingAngle, meshOffset,
    126.                                                                              m_UVRectangleIndex, m_UVRectangleIndex);
    127.  
    128.                         // Add the projector to our list and the decals mesh, such that both are
    129.                         // synchronized. All the mesh data that is now added to the decals mesh
    130.                         // will belong to this projector.
    131.                         m_DecalProjectors.Add(l_DecalProjector);
    132.                         m_DecalsMesh.AddProjector(l_DecalProjector);
    133.  
    134.                         // Get the required matrices.
    135.                         Matrix4x4 l_WorldToMeshMatrix = _targetCollider.renderer.transform.worldToLocalMatrix;
    136.                         Matrix4x4 l_MeshToWorldMatrix = _targetCollider.renderer.transform.localToWorldMatrix;
    137.  
    138.                         m_Decals.gameObject.transform.position = _destination; //place it where we need it
    139.                        
    140.                         // Add the mesh data to the decals mesh, cut and offset it before we pass it
    141.                         // to the decals instance to be displayed.
    142.                         m_DecalsMesh.Add(l_Mesh, l_WorldToMeshMatrix, l_MeshToWorldMatrix);
    143.                         Debug.LogError("m_DecalsMesh.Vertices.Count: " + m_DecalsMesh.Vertices.Count);
    144.                         m_DecalsMeshCutter.CutDecalsPlanes(m_DecalsMesh);                        
    145.                         Debug.LogError("m_DecalsMesh.Vertices.Count: " + m_DecalsMesh.Vertices.Count);
    146.                         m_DecalsMesh.OffsetActiveProjectorVertices();
    147.                         Debug.LogError("m_DecalsMesh.Vertices.Count: " + m_DecalsMesh.Vertices.Count);
    148.                         m_Decals.UpdateDecalsMeshes(m_DecalsMesh);
    149.  
    150.                         // For the next hit, use a new uv rectangle. Usually, you would select the uv rectangle
    151.                         // based on the surface you have hit.
    152.                         NextUVRectangleIndex();
    153.                     }
    154.                 }
    155.             }
    156.             _bPositionSet = false; //lower flag
    157.         }
    158.     }
    159.  
    160.     public void setTarget(Vector3 impactPosition, MeshCollider targetCollider)
    161.     {
    162.         gameObject.transform.position = impactPosition;
    163.         _destination = impactPosition;
    164.         _targetCollider = targetCollider;
    165.         _bPositionSet = true; //note we've been placed where we need to be and have the target collider
    166.     }
    167.    
    168.     // Move on to the next uv rectangle index.
    169.     private void NextUVRectangleIndex()
    170.     {
    171.         m_UVRectangleIndex = m_UVRectangleIndex + 1;
    172.         if (m_UVRectangleIndex >= m_Decals.uvRectangles.Length)
    173.         {
    174.             m_UVRectangleIndex = 0;
    175.         }
    176.     }
    177. }
    178.  
     
  41. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    @bigkahuna: Yes, this is possible. Select the Decals Mode (first one from the toolbar in the inspector when the decals game object is selected), then you find a Prefab section which has a Mesh Asset Folder field. At the very right of it, there is a button to change the folder where those meshes are stored. Change it and the meshes will be moved to that folder.
     
  42. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    @gord0x64, welcome to the forum! I love the name of this class PigeonProblemsPoopSplatDecal, awesome :)

    The only section that looks wrong to me is the computation of the rotation. Your idea was likely to make the projections independent of the camera, because everything you want to project is falling down. As a consequence, you also need to make the rotation independent of the camera. Those are the lines 78 and 79 which must use the absolute coordinates. Basically you don't need them in this case and it should work to just replace projector rotation (line 80) with the identity rotation.
    Hope this helps!
     
  43. gord0x64

    gord0x64

    Joined:
    Nov 28, 2012
    Posts:
    7
    Thanks!...almost :p

    Making the adjustments you mentioned above certainly did fix the CutDecalsPlanes issue, however now the decals are not visible : / I've scrolled around in the editor to see if maybe they were visible but in a place they're not supposed to be, but at every angle, there are no visible decals on the statues. The game objects are however in the right place (Decals prefab etc).

    edit: after closer inspection, some of the decals still have 0 vertices, some have more. Either way the decals are not visible.

    edit: after even closer inspection, I alowed many impacts to happen and out of all of them only a few became visible but were very tiny and seemingly in the wrong place. When I manualy move a projector in the editor the decal shows up as large as it should. So maybe identity isn't the rotation i need? Or miscalculations elsewhere?
     
    Last edited: Nov 30, 2012
  44. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    It sounds as if the matrix which transforms the spaces between the decals and the impacted meshes is wrong. I can't check it right now, but I will have a look at it over the weekend.

     
  45. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Thanks, that seemed to do it.
     
  46. gord0x64

    gord0x64

    Joined:
    Nov 28, 2012
    Posts:
    7
    Thanks, I really appreciate the help.
     
  47. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    I checked the code I couldn't find the issue. Though it would be a lot easier to find the cause with a minimized project. Would it be possible for you to make a reproduction project?
     
  48. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    Hello, I've just started testing this decal system and so far I have to say I'm very impressed! I just have a little question regarding the gizmo icons for the decals. In your videos I see a nice "D" icon with some lines, but in my scene they show up as a solid white rectangle (I'm on Unity 4). Am I doing something wrong?
     
  49. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    You need to move the Gizmos from Assets/Plugins/Decals System/Gizmos to Assets/Gizmos. Unfortunately it is not possible to publish it like that in the Asset Store due to limitations it their tools.
     
  50. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    Excellent, thank you Dantus, that does it. I should have read the manual! :)