Mesh Decal Limitations or Bug?

UPDATE2:
found another bug: mesh decals clip through geometry in front of it.

if you create a plane with a mesh decal in front of it (approx 0.1cm distance and another plane on top at about 10-30cm distance (distance doesn’t matter really it even clips through larger distances than that) and you move the camera away a couple of meters the mesh decal starts popping through the front plane. (see image)

This is not related to translucency issues and can’t be fixed using early prepass methods.

As far as I can see there are no exposed parameters to tweak clipping for mesh decal.


UPDATE1:

using a translucent material in an object where mesh decals are used seems to have unwanted side effects (flickering mesh decals, normal maps in mesh decals not working,etc)


ORIGINAL POST:
It’s a bit difficult without documentation to really know which parts of Mesh Decals are due to permanent limitations, which elements are subject to change and respectively which issues could be filed as bug. Like:

  • Metallic: Using Dbuffer Translucent Color (in any combination) in Material > Decal Blend Mode overrides the metalness in the underlying material it blends with. Not a problem for non metal materials but using a deferred decal ontop of a metal material looks weird

  • Node: BumpOffset not supported

  • Node: WorldAlignedTexture not supported (We use worldalignedTexture+PrecomputedAOMask for Dirt and currently our mesh decals are on top of the dirt always appearing weirdly clean. would be great if we could feed the same dirt into the mat/uvs into the mesh decal for continuity)

thanks in advance for any hints and pointers…

Hi!

This is little example how to use Mesh Decals.

thank you for the link. I`m actually active in that thread and have been asking for mesh decals for almost a year now coming from Cryengine, so I do get how to use the mesh decals in general. The question is more about it’s limitations as written above.

Hi Chris,

Here are the limitations that I’m aware of.

Areas tested with mesh decals:

  • DBuffer and non DBuffer decals
  • emissive
  • WPO
  • Static and Skeletal Meshes
  • With and Without Baked lighting
  • Shader Model 4

Areas not tested with for the initial implementation:

  • read normal in a decal material does not output to normal
  • Stereo/Split screen rendering
  • volumetric decals (shouldn’t work anyway, but there may not be an editor error or warning about this)
  • tessellation (should work, though)

These need a fix/feature implementation:

  • Sort order
  • Tangent Space support
  • Shader Overdraw/Overdraw functionality is missing

Areas that need polish:

  • Automatic/adjustable DepthBias (currently you can do an offset in the mesh or use some WPO math in the shader)
  • Fade out the receiver depth is too far behind (currently you could do this in the material graph)
  • Sort by depth to avoid artifacts when many layers overlap
  • Sort with Deferred Decals
  • Better material editor preview
  • Correct instructions count

There are a few other things that could probably be mentioned but this about sums up the major things. It’s still experimental in a lot of cases and over time will have some of these if not all of them resolved, although I’m not aware of any timeframe for this. I hope this helps answer your question.

awesome! this helps a big deal! thanks very much for the detailed summary!

Hey, i also ran into the problem, cause of a large mesh. I played around with the Decal Material. Idk why but if you hit D3D11Tessellation Mode to Flat Tessellation it works for me. Then i put the WPO Parameter to -0.01 do avoid the z-fighting, when i get closer to mesh.

Iam not sure, if this is correct, but at least it works.

Please correct me if, if its something i should not do :smiley: i did not test it, but if you subdivided your decal mesh in maya/max or what ever, it also could work.

1 Like

Hi, is there anything new toward that topic? I am using U4 4.16 must I update my engine to a newer version? Is this issue gone now? Thanks.

Well, well, your trick worked! Do you have some additional information on to why this fix the problem?

not really :frowning: its a while ago i was working on it and i think i made trial and error. sorry

This! It worked for me too, i don’t understand how it could fix the issue but meh it worked sooooo thank you :smiley:

Legend! Worked perfectly

It worked great! Thank you friend! But won’t this lead to a decrease in performance?