Search Unity

Easy Decal - Decals everywhere

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

  1. SimonsCat

    SimonsCat

    Joined:
    Mar 11, 2015
    Posts:
    49
    You could keep the arrays (vtx, tris, uv, color) you create when creating a new mesh for the decal. If you update your local arrays and then set (without getting it first) them to the mesh directly you will not create new allocations. As you said, at the expense of a bigger memory footprint, but it is not so big for normal decals, especially if re-used from a pool. Box projection has always an identical mesh right? So the data structure does not change during the lifetime.

    Updating the vertex colors means that you allocate memory for the array of colors (at least). Is it possible that you switch to material alpha fading? At least as an option? Not sure but I think you can change the material alpha without allocations.
     
  2. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    I downloaded the latest version of Easy Decal from your website 1_6_4_P1 in order to start playing around with Skinned Mesh decals. I realize it's only in Alpha stage but wanted to say thank you for including Skinned Meshes in your development. I'm currently attempting to use a different Asset for showing runtime damage to my skinned mesh characters and it has a lot of problems. So I'm hoping Easy Decal will be a better option.

    I noticed in your demo scene, you have the Kyle robot with some pre placed sci-fi decals using the Skinned Box Technique and they look good. However when I attempted to switch the Bullet Hole Decals over to Skinned Box Technique and shoot them during runtime, the Bullet holes do not render correctly on Kyle. They just appear as grey squares. Is this because Skinned Box does not yet support runtime decals? Or is it because the Bullet Hole decals use decal animation?

    I'm just wondering if I am doing something wrong.

    Thanks
    Allan
     
  3. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Yes. That's exactly what the upcoming projection core will do. Since the runtime decals were introduced the projection state was binary: Project when not baked, freeze when baked. The new projection core will be completely event driven (transform observer, intersection observer, manual triggers, ...). So even an unbaked decal in a stationary environment will consume much less CPU time.

    We will add an option for this. There will be also an new event called OnAlphaChanged to hook custom actions to.

    The first property change will clone the actual material (onetime alloc) after that no more allocations are done, but an additional draw call per frame.

    It's always a balancing act between runtime allocations, memory footprint and drawcalls.
     
  4. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Thank you for getting in touch, and moreover thank you for the report. :) You were doing everything right. But there was a bug when changing the technique to Skinned Box when the source mode is set to Material.

    We have fixed this in the latest patch downloadable from our website.

    Please let me know if come across further issues with the Skinned Box projector.
     
  5. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Thanks for responding so quickly and posting the patch.

    Bullet Holes: Distance setting
    After applying your latest patch, Skinned Box Technique is working on Skinned Meshes however I noticed that as I shoot Kyle, sometimes the decal textures appear but most of the time the decal textures do not appear even though the decals are being applied. After thinking about this, I adjusted the Distance value on the Bullet Hole prefab and I am able to get the Bullet Holes to appear more consistently. But I had to increase the distance value pretty high between .04 and .05, a factor of 4 - 5X before the Bullet Holes appeared consistently. Is this something you're working on or just a limitation of the projection method used or perhaps due to the animation option?

    Splatters: Black edges/artifacts, possible shader problem
    I switched over to using Splatter A and B prefabs and changed the technique to Skinned Box. The decals are applied with black edges/artifacts that appear to be the transparent edges of the texture or normal map. I think what I am seeing are the edges of either the splatter texture or the normal map in black. This leads me to believe it's either a shader problem or a problem with the texture settings. I tried turning Generate Mip Maps on and off on all splatter textures and normal maps and changed the Wrap mode but that made no difference.

    Edit: Switching to a cutoff shader fixed the black edges problem. Does this mean only a cutoff shader can be used with Skinned Box technique or is this a bug?

    Thanks again. It's looking real good so far for an alpha release. :)

    Allan
     
  6. SimonsCat

    SimonsCat

    Joined:
    Mar 11, 2015
    Posts:
    49
    And of course the question :) When is the estimated date we can get the changes? Beta, Final?
     
  7. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    I think this has to do with the collider setup. Currently the collider setup is very basic, meaning that the demo setup just need/have one collider either on the object (containing the SkinnedMeshRenderer) itself or in one of its parent or child levels (depending on the Recursive Lookup settings in the Constraints tab). Siblings on the same hierarchy level currently don't get recognized by the projector. But this will be changed when the SkinnedDecalReceiver and DecalBone components get merged into the release branch.

    Leaked :) concept:
    ed-skinned-colliders-setup.jpg

    The SkinnedDecalReceiver component gets placed on the object holding the skinned mesh. The SDR then automatically creates decal bone links from the model's rig.

    Unfortunately, I was not able to reproduce this with Unity 5.3.6 (dev version). What Unity version are you using? Could you please post a screenshot showing the problem?

    ed-decal-skinned-splatter.jpg
     
  8. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    We have a functional freeze until GDC, meaning that we only deliver patches and hot fixes. But maybe some parts of the new core will be included in the next patch/update.

    I guess 10-14 days after the GDC a first version of the new projection core will be ready to get shipped. :)
     
  9. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    I'm using the release version of Unity 5.5.0f3.

    And now I have to apologize. For some reason I'm not seeing the black edges using any of your shaders. The only thing I did between now and then is reboot Unity. Man that's annoying. Well if it happens again, I'll grab some screenshots before the problem disappears.

    Other than that it's looking really good! I've been trying a relatively new asset called UVPaint for applying damage to skinned Mesh characters but that solution does not like the Standard shader and it currently does not work with normal maps.

    Allan
     
  10. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Glad to hear. :)

    A Unity restart or package reimport solves about 15% of the issues. We know this from our own experience. :)

    UVPaint looks promising, especially for beat 'em up styled games where not so many different receivers are in use and the damage is peristent over a session. Basically, one has three different ways to realize a decal:
    • Generate conforming mesh -> Mesh Decals
    • Render it using a dedicated shader -> Screen Space Decals
    • Project it to an additional texture -> Plain Texture Decals
    Every technique has its advantages, disadvantages and limitations. :)
     
  11. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Question and a bug report:

    - When using PoolManager to spawn decal transforms, do you recommend not parenting the decal to the receiving collider. I'm using PuppetMaster (Asset) ragdolls for my characters and at first I thought to parent the decal to the ragdoll collider that is hit because that's how I handle blood spurts particle effects. But the decals really did not like that. I just wanted to know your recommendation on that.

    I'm seeing the following errors fairly consistently. They don't show up with every collision but it's at least every 2nd or 3rd collision between my two characters.

    Errors:
    - Bone influences do not match bones. (This one starts spamming in the console until I stop play mode)
    - Bone influences do not match bones. UnityEditor.DockArea:OnGUI()

    Not having the source, I can't tell what these errors are referring to.

    Here is the code I use for applying decals to both characters when weapon props hit the opposing ragdoll colliders.
    Code (CSharp):
    1.  if (!decalAppliedOnce)
    2.             {
    3.                 decalAppliedOnce = true;
    4.                 StartCoroutine(DecalsParticlesDelay());
    5.  
    6.                 int randIndex = Random.Range(0, damageDecalsList.Count);
    7.                 Transform damageDecalRand = damageDecalsList[randIndex];
    8.                 Quaternion decalRotation = Quaternion.AngleAxis(decalRotationAxis, contact.normal) * Quaternion.FromToRotation(Vector3.up, contact.normal);
    9.                 //Transform damageDecal = PoolManager.Pools["Decals"].Spawn(damageDecalRand, contact.point, decalRotation, behaviorPuppet.puppetMaster.muscles[m.muscleIndex].transform);
    10.                 EasyDecal decalClone = PoolManager.Pools["Decals"].Spawn(damageDecalRand, contact.point, decalRotation).GetComponent<EasyDecal>();
    11.                 decalClone.Reset(true);
    12.                 decalClone.LateBake();// Bake the decal after one projection cycle
    13.  
    14.                 int randIndex1 = Random.Range(0, bloodSplatterPrefabList.Count);
    15.                 PoolManager.Pools["Particles"].Spawn(bloodSplatterPrefabList[randIndex1], contact.point, Random.rotation);
    16. }
    17. }
    Since this bug has to do with bones, here is a screen shot of the hierarchy of my PuppetMaster character (This is the typical setup for PuppetMaster characters) Note the PuppetMaster child object contains all of the ragdoll colliders and the Skinned Meshes are on a seperate child object both sharing a common parent. Also the bone structure is under the Armature object and that's a seperate object from the PuppetMaster Colliders. Additionally my characters are equipped with their weapon props (and associated colliders) on startup so if you are doing any kind of bone mapping on startup, that may be an issue.
    Hierarchy.PNG

    And just in case this has something to do with the colliders being on seperate objects from the meshes, I tried using the recursive feature on the decals but it didn't make any difference.

    Decal Setup:
    DecalSetup1.PNG DecalSetup2.PNG

    Thanks
    Allan
     
  12. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    It's hard to recommend a best practice as there will be a lot of changes until the skinned projector is out of alpha. When the SkinnedDecalReceiver component will be part of the package, the decals can be parented to the respective bone/collider as they have a link to the skinned meshes. If you want to use it in its current state I would recommend a similar setup as seen in the Kyle demo.

    I guess this is caused by the current limitations of the skinned projector. The alpha version is meant to be a proof of concept, so many use cases get not handled.

    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
    Nonetheless, we highly appreciate your active tests and reports! This is very precious for the further development. :)
     
  13. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    You're welcome. I look forward to future updates.

    Allan
     
  14. cbc550

    cbc550

    Joined:
    May 10, 2013
    Posts:
    7
    Hello,

    It looks like I'm having a problem undoing decals. Each subsequent undo on a decal takes longer and longer for the editor to process. After undoing about 10 to 12 times, the editor locks up for about 10 to 15 seconds. I managed to replicate this in an empty scene by creating a plane, placing a new decal on it (not a prefab), plugging in an existing decal atlas, and repeatedly moving the decal to a random place on the plane then undoing. Eventually this makes using undo impossible, even on objects that are not decals. Trying to undo movement on the plane after undoing 12 times on the decal has the same effect, the editor freezes. If I restart Unity and try undoing multiple times on anything other than a decal it doesn't have the same effect.

    The decal I was using to replicate this had all default values except I changed it to use Box projection and use an existing decal texture atlas.

    I would appreciate any help you can give me to solve this problem. Thank you for your time!
     
  15. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Thank you for the report. We have successfully reproduced this issue. It seems that the UnityEditor.MaterialEditor class floods the memory when performing consecutive undo steps. We have fixed this in patch 3 for version 1.6.4. You can download the latest patches from our website.

    Please let me know when the issue is solved now.
     
  16. cbc550

    cbc550

    Joined:
    May 10, 2013
    Posts:
    7
    I almost forgot to respond today! Yes that patch worked great. I'm no longer seeing undo slowdown problems with the decals. Thank you for the quick response and fix!
     
  17. unity2

    unity2

    Joined:
    Jan 10, 2013
    Posts:
    23
    Hi,

    Asset looks great. I have one question. In my case I have a bomb which a player throws and have a collider for trigger. I want to put decal on object on which the collider trigger. As triggering only contains collider data, can we use this decal system in that case. If yes then how?

    Thanks
     
  18. Sycoforge

    Sycoforge

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

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    As long as the mesh is accessible at runtime this should work without problems. If the meshes are set to static they must have either a MeshCollider or a perfect fitting BoxCollider attached to reconstruct the mesh data from it.

    How does your scene setup look like?
     
  20. unity2

    unity2

    Joined:
    Jan 10, 2013
    Posts:
    23
    my scene have some static objects (building and all) and some dynamic object (enemies, vehicles moving around). Enemies have skin meshed renderer and capsule colliders whereas vehicles have box colliders.

    Do I have to calculate decal position and rotation by own or asset will take care of it? In example scene, for dynamic decals we have to pass the raycast info and in triggering thats not the case.
     
    Last edited: Jan 13, 2017
  21. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    If your static objects have a mesh collider everything should be fine.

    When using the API you don't have to worry about rotation. For example you could instantiate a decal using a given hit point and its corresponding surface normal. You can find a demo snippet here.

    I hope this answers your questions. :)
     
  22. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    Ed Standard (metallic, vertex alpha) ..totally messed up and black....


    legacy/Alpha Edge Bleed ...I guess its fine but no normal map support for this old shader.. at least it looks like the texture I put on it for the decal unlike the above shader..


    this is using 1.6.4 p3 and with deleting the old shaders as mentioned somewhere above.... changelogs on your site don't get updated with these minor patch updates.. maybe post the patch updates here aswel. Anyway... a fix on for that would be good not sure if I'm doing anything wrong in the setup?



    Why doesn't this just have its own built in pooling system anyway? Where we can specify a default starting amount that we estimate will be needed? A redesign of the runtime projection sounds useful.. I been using box projecting and as mentioned earlier the gc alloc is pretty high when fading out..

    Also we gonna see this with actual source.. like I haven't used this in a while infact only just gotten around to implementing in main game project now, but just little things that annoying me with the documentation or even little things like heads up..like don't have a too high a fadeout time it will cause more gc.

    Things like EasyDecal.ProjectAt() which I found supports specifying a rotation.. Where float rotation the summary info for that is lame, like zip all info on exactly what sort of values that it should be fed... ofc it doesn't help visual studio being such a pile of crap when it comes to looking at dll classes.. unlike monodev providing a decent assembly viewer to check a dll and show me the actual c# and how it was using the float rotation... allowed me to figure out what values to feed it... wasted my time doing it though and probably why i'm not in favor of closed source assets anymore.. it doesn't benefit anyone really does it? and I find it just more of hassle to go make minor changes or hooks in the main source of an asset for things, especially as its not exactly hard to check source either, infact its probably the best thing when documentation doesn't tell everything and also adding minor improvements to the actual asset would be a lot easier aswel.

    oh another thing.. The atlas thing doesn't support packing a bunch of materials/decals that have been setup with seperate textures into a larger texture.. I thought it was cool at first until I realized that i have to pack all the textures for a decals I want for my own atlas, manually and its not an automatic supported featured in the asset? or am I missing something?

    One last thing, you seen an snow splat decals around? :D Had to make some of my own, thought the internets might have had some more source material to work from or guides on making those kinda things.. hopefully it snows more around here :D
     
  23. LunaTrap

    LunaTrap

    Joined:
    Apr 10, 2015
    Posts:
    120

    Please i would like to ask you to put this in first priority :D not having that memory allocation when fading out would be awesome.
     
  24. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    It looks like there are missing tangent information. Have you enabled the Calculate Tangents option in the Geometry tab?

    ed-decal-tangents.jpg

    Easy Decal will inherit the pooling technology from our Vivaldi extension in a future version.

    In general there should not be more than one sentence per argument in a method summary. Adding more information will just confuse the users. Copied from the method summary:

    rotation, Type: float, The rotation along the receivers normal axis.

    I really don't know what's more to say about the rotation property. What's missing in your opinion?

    Yes. The atlas editor currently only manages the individual UV regions. A texture packing feature is planned but not yet included. We never mentioned that the atlas editor also packs the textures for you. The people who know our studio always know: What you see is what you get. We never do false advertisment. What's in the description, is also included in the package.

    We had heavy snowfall in the few last days. Maybe I'll throw a snowball at my neighbor's facade and take close-up of it. :)
     
  25. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    We'll give it special priority! :)
     
  26. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    @Player7
    Frosty greetings! :) Next big update we'll maybe include a 2x2 or 3x3 snow splat atlas.

    ed_snow_splat.jpg

    As it's too big to post here, you can download it from our website.
     
    hopeful likes this.
  27. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    nice .. been having trouble making mine look decent, I think that example gives some tips on how to do it right for snow splats :D

    are you using the photoshop nvidia plugin for doing the normal map generation?
     
  28. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    Also Calculate Tangents and Calculate Normals ... did fix the issue with black decal texture.. I must have turned it off in testing what things did and when I went to using the legacy shader forgot about it.
     
  29. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Made the normal map with our plugin Map Lab using a 3 layer frequency split. :)
     
  30. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Glad to hear! :)
     
  31. cbc550

    cbc550

    Joined:
    May 10, 2013
    Posts:
    7
    Hello,

    Back again. I got this error after trying to separate a combined atlas group:

    NullReferenceException: Object reference not set to an instance of an object

    ch.sycoforge.Decal.EasyDecalManager.Activate (IEnumerable`1 decals, Boolean active)

    ch.sycoforge.Decal.EasyDecalManager.SeparateAtlasGroup (ch.sycoforge.Decal.DecalTextureAtlas atlas)

    ch.sycoforge.Decal.Editor.EasyDecalManagerWindow.DrawCombinedDecalUI ()

    ch.sycoforge.Decal.Editor.EasyDecalManagerWindow.OnGUI ()

    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

    Not really sure what caused it or how to replicate it. It happens upon clicking the uncombine button.
     
  32. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Thank you for the report.

    How frequent did you see this error? Or was it the only time this error occured?
     
  33. unity2

    unity2

    Joined:
    Jan 10, 2013
    Posts:
    23
    The issue is onTriggerEnter() we are not getting hit normals!!
     
  34. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Please excuse that I've not posted an example right away. Please have a look at the demo code below.

    You'll find two different ways of an approximated collision information reconstruction to feed the Easy Decal API. When your team need to have the "Project Settings -> Physics -> Queries Hit Triggers" option disabled you can use the InstantiateApprox(Collider collider) method, otherwise InstantiateRaycast(Collider collider).

    Code (CSharp):
    1. using ch.sycoforge.Decal;
    2. using UnityEngine;
    3.  
    4. /// <summary>
    5. /// Simple decal projection example without explicit collision information.
    6. /// </summary>
    7. public class TriggerInstantiate : MonoBehaviour
    8. {
    9.     //------------------------------
    10.     // Exposed Fields
    11.     //------------------------------
    12.     public EasyDecal Prefab;
    13.  
    14.     //------------------------------
    15.     // Unity Methods
    16.     //------------------------------
    17.  
    18.     private void OnTriggerEnter(Collider collider)
    19.     {
    20.         Debug.Log("Trigger Enter");
    21.  
    22.         // When "Project Settings -> Physics -> Queries Hit Triggers" is enabled.
    23.         InstantiateRaycast(collider);
    24.  
    25.         // When "Project Settings -> Physics -> Queries Hit Triggers" is disabled.
    26.         //InstantiateApprox(collider);
    27.     }
    28.  
    29.     //------------------------------
    30.     // Methods
    31.     //------------------------------
    32.  
    33.     private void InstantiateRaycast(Collider collider)
    34.     {
    35.         Vector3 p = this.transform.position;
    36.  
    37.         // Approx hit point
    38.         Vector3 hitPoint = collider.ClosestPointOnBounds(p);
    39.  
    40.         Vector3 dir = (hitPoint - p).normalized;
    41.  
    42.         Ray ray = new Ray(p, dir);
    43.  
    44.         RaycastHit hit;
    45.         if(Physics.Raycast(ray, out hit))
    46.         {
    47.             EasyDecal instance = EasyDecal.ProjectAt(Prefab.gameObject, collider.gameObject, hit.point, hit.normal, 0.0f);
    48.         }
    49.     }
    50.  
    51.     private void InstantiateApprox(Collider collider)
    52.     {
    53.         Vector3 p = this.transform.position;
    54.  
    55.         // Approx hit point
    56.         Vector3 hitPoint = collider.ClosestPointOnBounds(p);
    57.  
    58.         Vector3 dir = (hitPoint - p).normalized;
    59.  
    60.         EasyDecal instance = EasyDecal.ProjectAt(Prefab.gameObject, collider.gameObject, hitPoint, dir, 0.0f);  
    61.     }
    62. }
    63.  
     
    Last edited: Jan 16, 2017
  35. unity2

    unity2

    Joined:
    Jan 10, 2013
    Posts:
    23
    Thanks for your help!

    One problem regarding FPS on iOS device (iPad 4). In my scene after 6-7 decals, fps is dropping significantly. I checked in profiler, CPU consumption is 60-70 % for EasyDecals.update (which is in dll).
    Any help how to solve this?

    Check screenshot of EasyDecals.update in profiler. hike in usage is while creating another decal.
     

    Attached Files:

    Last edited: Jan 16, 2017
  36. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    The spike in the frame of creation is normal, but after the projection the single decal should only be producing a very small logic overhead. Did you forget to bake some of the static scene decals or accidentally unbake them from the script? (The API automatically bakes the decals).
     
  37. cbc550

    cbc550

    Joined:
    May 10, 2013
    Posts:
    7

    It was happening each time I tried to separate a group and it didn't actually do the separation. I ended up fixing it by deleting the Decal Root object out of the scene then combining again. That let me regain control over separating a group again.
     
  38. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    We try to somehow reproduce this. Could it be that you have had some previous Unity version updates or app crashes that may prevented it from proper serializing the root reference? Thanks again.
     
  39. vikas14

    vikas14

    Joined:
    Jan 17, 2017
    Posts:
    7
    Screen Shot 2017-01-17 at 1.20.59 PM.png
    On enabling the "Bake Geometry", the decal is not rendering properly, in fact, the white sprite like image is shown,
    instead it seems good on disabling the same.
    I have attached the screenshot.
     
  40. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    It seems that, for some reason, the gizmos weren't loaded/imported properly. Are the two Easy Decal gizmos present in your Gizmos folder?

    ed-gizmo-folder.jpg
     
  41. vikas14

    vikas14

    Joined:
    Jan 17, 2017
    Posts:
    7
    GIZMOS FOLDER IS EMPTY.
     
  42. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    OK. This is a package import failure. Please try to reimport the package. In case that you have imported a patch version, import a full version first.
     
  43. vikas14

    vikas14

    Joined:
    Jan 17, 2017
    Posts:
    7
    Screen Shot 2017-01-17 at 6.33.23 PM.png Screen Shot 2017-01-17 at 6.33.08 PM.png
    It is not working like demo scene in package.
    Decal is not visible in "Game View", and appears like "ED.." in the "SceneView".
    I have attached screen shots.
     
  44. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Let's troubleshoot this.
    If it's working in the demo scene, most likely one of the points listed below prevent the decal from being rendered:
    1. Does your receiving game object has a collider of some sort?
    2. Was the decal baked after the cube came in reach?
    3. Is the decal's mask set to Everything?
    4. Have you assigned a valid material with textures?
    Please post a screenshot of your scene setup, decal inspector and 3D cube inspector, if the points above doesn't solve your issue.
     
  45. vikas14

    vikas14

    Joined:
    Jan 17, 2017
    Posts:
    7
    Screen Shot 2017-01-17 at 7.03.07 PM.png Screen Shot 2017-01-17 at 7.11.50 PM.png Screen Shot 2017-01-17 at 7.02.39 PM.png
     
  46. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    @vikas14 Next bunch of questions: :)
    1. Do you instantiate the decal in DecalTesting.cs script? Could you please post your instantiation code (if different from the demo code)
    2. You said the included demo scene are working, right?
    3. If you just drag 'n' drop the decal onto your cube, are you seeing the decal? If not could post a screenshot of the decal's inspector within the scene?
     
    Last edited: Jan 17, 2017
  47. vikas14

    vikas14

    Joined:
    Jan 17, 2017
    Posts:
    7

    1. The instantiation code is same as in Demo. (Screenshot attached)
    2. no, On enabling the "Bake Geometry", the decal is not rendering properly,
    instead it seems good on disabling the same.
    3. Did the same, but the results are not acceptable. (Screenshot attached) Screen Shot 2017-01-18 at 10.35.40 AM.png Screen Shot 2017-01-18 at 10.36.04 AM.png Screen Shot 2017-01-18 at 10.36.16 AM.png Screen Shot 2017-01-18 at 10.36.43 AM.png Screen Shot 2017-01-18 at 10.37.07 AM.png
     
    Last edited: Jan 18, 2017
  48. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    @vikas14 I just rebuilt your test scene and found what went wrong:

    ed_decal_scale.jpg

    Please test the editor decal placement with a larger decal prefab like one of the graffiti.

    The animated bullet hole prefabs are meant to be dynamically instantiated at runtime and that's the reason that they don't look right when placed in the editor at design time. For the case that it's still not working we could provide you support using screenshare.
     
    Last edited: Jan 18, 2017
  49. vikas14

    vikas14

    Joined:
    Jan 17, 2017
    Posts:
    7
    Adhering to aforesaid remarks of yours, the things don't work on Enabling "Bake Geometry", hence, raising a performance issue.
    Help this out!
     
  50. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Please excuse, maybe I've misunderstood you. What is exactly not working on your side? Is the the decal not showing up when you bake it in the editor?

    I tried to reproduce it in any way without luck.

    ed_baked_decal.jpg