A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by Sycoforge, Oct 28, 2014.
Any word on the reported issue yet?
We are currently investigating this issue. We have successfully reproduced it, but haven't pinpointed the cause.
Okay, we found the issue. It's caused by the sub-meshes of the tree. Until this issue got fixed in the framework, I recommend exporting the mesh with 3 child objects instead of 1 object with 3 materials.
Thank you for the reply
I tested it out and it's not the same for me. I separated the tree into submeshes and copied the same decal 3 times. I put one on the terrain, one on the wall, and one on the submesh of the tree. As you can see only the one on the basic unity cube gets rendered. The one on the terrain is just a black blob, and the one on the tree is still invisible regardless.
I put up 4 inspectors so you can clearly see that the tree has a separate mesh and that the decals are not working as they should. The first inspector is the tree, the second one is the black spot on the terrain, the third is the visible one on the unity box, and the fourth one is the one in front of the tree that isn't working.
The black rendered decal is because you have forgotten to enable "Calculate Normals" and "Calculate Tangents". Decals with a shader that renders a normalmap need to have tangents.
Where did you put the collider component? When having it on the parent game object (Tropical_Tree_Big_Kapok_002) you need to tell the decal projector to also include the children for mesh target lookup. Please enable "Recursive Lookup" und set the mode to "Down". You can find this setting in the "Constraints" tab.
Thank you for the help. Now it's working fine!
Glad to read! Have fun!
I do have one more question. Do you plan on implementing the feature where you can have more materials on one mesh and have the decals still work? At the moment it's a deal breaker for us.
Yes. We have added it to our TODO list. But unfortunately, I cannot give you an ETA. What you can do though is to switch the projector to the Deferred or Plane (plane only for simple surfaces).
We'll drop you an experimental version to your email once we have something to test. But these versions are not tested very well and are not recommended for production environments.
@Murkawski Dropped a version supporting submeshes via PM.
Oh. Nice, I'll give it a go and report back
Hi im interested in this asset but is it dll ? Ive had bad luck in the past with dll asset being deprecated and no way to use them once unity updates to a newer version.
You can access the source over our website.
Hello, I have a problem with box decals projected on a mesh within a parent with negative scale, I'm using baked lights, seems like decal has normals flipped. Using two sides material make decals almost black after baking light, but the flip normals switch hides the decal completely, how can i fix that?
Could you please post some screenshots illustrating the issue and the settings used on the decal?
Here you go.
All the settings are identical for both decals and walls.
Only difference is that first wall with selected outline has z scale = -1 and you can see normals of decals as they are enabled on "Extras" tab, but you can only see the decal with digit 7 only from the back, as on second row.
The third row is what I see if I enable Flip Normals - decals, normals and vertices completely disappear.
Thanks for these illustrative screenshots. The box projector does indeed dislike negative scales. I added this to our to-further-investigate-list. For now, I would recommend going with the plane or ssd projector on mirrored objects.
Thanks for looking into the problem. Negative scale geometry is a big deal in many cases, e.g. when you want to reuse the assets, say for symmetric levels, like this example.
AlsoI can't use plane projection, cause the surfaces under projector are often very complex and plane projection generates not perfect mesh that generates AO when baking lights. And also I can't use ssd because that's a mobile project.
Just grabbed this and imported to 2019.1. Got several warnings for mixed line endings. Obviously extremely simple for anyone to fix but just wanted to alert you.
You are right. I did add this one to our list. In an ideal world mirroring is supported on every level in an engine. But in Unity, you are better off not to mirror object as this will most likely break your lightmaps and lead to weird looking normals. We had to ban mirroring completely from our pipeline because of the reasons above. Instead of mirroring things, we already take this fact into account when planning the models and modules and make them symmetrical on the y-rotation axis. This way, we can only rely on rotational symmetry. I hope this was somehow useful.
Is there a way to sort Box decals (maybe based on hierarchy?) so that the textures aren't z-fighting when they overlap? I'm using them for splatter effects but when there's 2 with different colors overlapping some weird clipping is occurring. Currently I'm using the EasyDecal/Legacy/Transparent Soft Unlit shader for all of them. I attached an example screenshot.
How to start a Fade Out if a character entered the trigger?
I tried but nothing works
public class DecalRemuve : MonoBehaviour
public EasyDecal DecalPrefab;
if (hide == true)
for (int i = 0; i < DecalPrefab.Length; i++)
DecalPrefab[i].FadeOut = true;
DecalPrefab[i].FadeoutTime = 3;
private void OnTriggerEnter(Collider other)
hide = true;
Maybe it helps if you add enabled = false; after your for loop.
I believe I was able to solve the z-fighting issue by adding these lines to the subshader. I know nothing about shaders so this may have adverse repercussions.
I'm using Easy Decal for a Mobile VR project.
My performance drops dramatically if I have [Decal Root] in the scene, even if there's no actual decal objects.
Similarly instantiating a single decal into my scene (baked on awake) immediately causes the GPU to go into overdrive (clocks itself up about 50%). This coincides with [Decal Root] being automatically added.
Any idea why this would happen?
Edit: It seems Easy Decal adds a command buffer when active to the camera. This is a huge performance hit on mobile and Oculus heavily advises against it (same with render textures, blit etc). I don't suppose there is a way of setting up Easy Decal so it doesn't add this command buffer? Currently I'm using cam.RemoveAllCommandBuffers() to remove it (which works). Is there a more elegant way?
How does Easy Decal find the "Decal Root" scene singleton? It seems to find it by object name, rather than by type or the usual singleton methods, which I find a little annoying because I like to arrange and name things my way. Perhaps this is buried in one of the DLLs.
Has anyone used Easy Decal deferred decals (SSD or just deferred) with MicroSplat terrain shader? I'm new to ED, so I may be missing something... but I can see deferred decals on regular meshes, and regular terrain, but not terrain when it's using MicroSplat shader(s). The ED is just not there.
Plane, box, etc. work with MicroSplat, but I'd really like to have a normal-only shader for my terrain decals.
Has anyone tried creating a cylindrical projector by implementing the IMeshProcessor interface as described here? I need to be able to project decals around objects so the planar projection provided by the plane and box projectors isn't enough.
Will this work with unity terrain that uses CTS shader?
Hi! I've been playing with the box projector and hit a few issues:
- Firstly it seems like meshes are cached somewhere? I have some procedural meshes and the decal reflects earlier geometry... Is there a call to flush it?
- Secondly I've just seen comments here about decals not supporting meshes with multiple materials. Did that end up fixed and in the asset store version?
Does anybody else have any issues with LateBake() not working? The documentation says the decal geometry will be baked on the next frame, but it isn't happening. Even feeding a specific number of frames doesn't work unless I set it to LateBake(5) or higher. But then surely it's recalculating the decal geometry five times when it shouldn't be necessary to do so?
I'm getting this error when a decal overlaps a dog model I have:
"Not allowed to access uv4 on mesh 'Dog..Remap' (isReadable is false; Read/Write must be enabled in import settings)"
Is it recommended to just make the model read/write as suggested in the eror?
So we've compared several decal systems in the asset store, and thought I'd mention what we found relative to this one.
Easy Decal has a rather great setup for hand placing atlased decals. We use it in defered mode for performance and lighting.
Unfortunately it is less well suited for large numbers of decals (like bullet sprays). The performance suffers badly.
Decalicious, on the other hand, is well optimized for this scenario and just screams. We can bullet spray an environment to ridiculous levels and hardly impact the render time.
Decalicious, however, has none of the satisfying tools for atlasing etc. that Easy Decal has.
As the source code is not included for Easy Decal (Boo!), it's hard to isolate precisely why there is such a performance gap, but it would seem that one major component is a lack of instancing. Decalicious uses instancing, near as I can tell, there doesn't seem to be a way to do that in Easy Decal. Or maybe I missed something?
If Easy Decal could get the same performance as Decalicious, it'd be the run away top pick. As it is, we can't use it in our use-case.
Hey Will this script also make the bullet hole curve around a corner?
You have to sample a few points around the impact position to get an average orientation. Please have a look at the following example: http://nu.sycoforge.com/learn/easy-decal/advanced-bullet-holes
Thanks for your extensive post. We have had a performance regression with the culling system which got disabled in the 2019.2 version. We have also added a new mode for deferred decals that do not change their transformation after instantiation. Please download the latest version from our website and let me know if the performance is better when disabling the new "Is Dynamic" option.
This will change in the next patch. Also, you can download the source from our website. Just send us an email with your invoice number.
The mesh decals will work for sure. The deferred ones should work too. You can request access to the evaluation version to be sure.
Yes. The box projector needs to access the geometry data to cut the decal.
There is a problem when baking lightmaps in "Shadowmask" mode - decals look dark.
https://prnt.sc/opn4fu - dark decal
https://prnt.sc/opn4x7 - In "Baked Indirect" mode no have it problem.
How know how fix it?
I would recommend converting all the static decals to regular meshes (using the decal manager) before the final bake.
Just updated to the latest version, and something is broken.
The "Calculate Tangents" option has completely disappeared for Box Projection! This means I can no longer use normal maps as my decals get rendered completely black?? (Unless I switch to Plane Projection, then the Calculate Tangents option comes back).
The "Calculate Tangents" option is only needed for the Plane projection-type because the tangents now get sampled from the original mesh to reduce CPU time. Normal maps should work as usual. Do you experience a rendering issue such as black decals?
Yep, they're completely black.
Same decal, without normal map:
Update - seems that it's only broken on terrains. Works fine on regular geometry.
Does your model come with tangents data? If your mesh is not created procedurally, please check if the Tangent property is set to either Calculation or Import in the import settings of the model. We'll re-add the option, in the next patch with a warning message. Thanks for bringing this up.
Just updated my previous post (which I don't know if you saw), to say that it's only rendering black on terrains - regular geometry seems fine.