Cool stuff right there. I think this is the same thing they've used in The Division. @Grimwolf Because this way You don't need the baked texture. Face weighted normals do the job just fine and You can make many different guns using the same material.
I'm confused. Why not just place those details directly in the texture? This seems like it would be less efficient, both to create and to render.
Also consider object scale. You could have very large objects (like vehicles) which use tiling textures (and fwvn where it makes sense to do so) broken up with decals. So you get the benefit of super-efficient texture use while not being limited when it comes to adding unique details wherever you like.
However — I've just noticed one annoying limitation with this method. The normals are overwritten, not overlayed. So if you're using say a detail normal map on your base object (which seems likely) you also need to use that map in your decal texture. But of course that will never match up perfectly (not really necessary because the detail will be quite small), but more importantly, if you had planned to use stretched UV's for your decals to make the most of your decal sheet (which also seems incredibly likely / almost certain) then your detail normal map won't match anyway. Though I suppose you can circumvent this issue by using two UV sets for your decal mesh; the second one containing the regularly scaled (matching your base objects texel density) UV's and plugging the detail normal map into that, as well as separating your decal meshes by materials if their dtNM differs. But that's not exactly ideal.
What you could do for some sort of blending is cranking the intensity of the normal map waaaaay high up and lowering the alpha slightly so that it blends through a little bit, though this isn't a complete solution.
you could "overlay" them by using the blend angle corrected normals node and an another uv channel .. But then you are back at the "matched uvs" method so its not really efficient...
I guess you could also use triplanar projection for the detail normal map in both the decal shader and the main shader to make sure they match up perfectly, though it'll be a bit costlier as well and you'll run into stretching issues at some angles.
I'll probably just try and work around its limitations rather than making super complex shaders once we migrate to 4.13 at work.
Adopting to 4.13 and mesh decals instead of projected 2nd uv channel decals comes with a lot of restrictions unfortunately. One of them is that in cases where you use Color (Albedo) in the decal shader, you override the metalness value of the underlying material. it's also not possible to do metallic decals since metalness is not available. same with bump offset. We still opted for mesh decals even losing all the benefits we had before as it's appears to be more robust (no need to project uvs in 3dsmax and no lightmap uvs/space required). Still would love to know more about these limitations, so I`m trying to get some response here: https://answers.unrealengine.com/questions/485322/mesh-decal-limitations-or-bug.html
wait it doesn't overlay the normals? as far as i know the cryengine mesh decal shader does, isn't that what this was meant to emulate? I hope it does overlay the normals or at least have some transparency/dithering to blend between the normals i'll have to play around
wait it doesn't overlay the normals? as far as i know the cryengine mesh decal shader does, isn't that what this was meant to emulate? I hope it does overlay the normals or at least have some transparency/dithering to blend between the normals i'll have to play around
You can use the opacity mask to blend between them if you'd like. At 100% opacity it completely replaces the underlying normal.
I've just been playing around with this - very cool, and thanks for the video @Millenia.
Only question I have is, is it possible to have edge wear on these decals while keeping the underlying base colour of the main mesh (and using the base colour of the decal material as the texture for edge wear)? Wasn't quite sure if there would be some sort of trickery to blending opacity maps or some such.
it is quite nice step towards what star citizen is using but there is still room for improvement. World aligned texture doesn't work if you set material domain as Deferred decal.
Thanks for the share, love it! Question, do you need to add a draw call to the decals when you view the object from a distance? I am going to give it a bash, looks like lots of fun
I'm confused. Why not just place those details directly in the texture? This seems like it would be less efficient, both to create and to render.
We used this method for a ton of assets on Black Ops 3. The benefit is you can get away with using and sharing a lot of generic tileable materials across your entire game that aren't unique to each asset saving a lot of memory on texture streaming, disk space, etc.
Then creating decal sheets of trims, vents, pipes, etc you can cut them out into decals and place them on models and depending on the shader setup they can contribute to the normals only (deferred method) or add to the entire material adding color,spec,gloss,normals,emissive,etc to the base layer under it.
Also because they aren't baked into the assets base normal map fine details like bumps, text, bolts, etc can be much higher res than they would be if you were to bake them into the base normal map and materials.
Were any normals baked for the Object you are using? With using this technique i take it will reduce the amount of Textures etc loaded in since many objects will be using that one Normal sheet? Thanks for the video as well it was pretty neat.
Were any normals baked for the Object you are using? With using this technique i take it will reduce the amount of Textures etc loaded in since many objects will be using that one Normal sheet? Thanks for the video as well it was pretty neat.
No baked normals, just some custom vertex normals on the chamfers. You're right in that the main benefit of this technique is massively decreasing the texture footprint of your project, but it also works faster than having to bake unique normal maps for every single asset. You can also get much higher resolution results from a few tiling materials used in a smart fashion & one or two shared decal normal sheets.
Thanks but no. The parallax function works fine with surface material domain, but not with deferred decal. At least not in this standard way. When I've set it to deferred decal, it had like a huge offset, and it really didn't look correct. I tried to play around with the depth and reference plane parameters but it didn't help. I tried this with decal volume and mesh decal as well.
Thanks but no. The parallax function works fine with surface material domain, but not with deferred decal. At least not in this standard way. When I've set it to deferred decal, it had like a huge offset, and it really didn't look correct. I tried to play around with the depth and reference plane parameters but it didn't help. I tried this with decal volume and mesh decal as well.
I see, might be worth posting on the the Unreal forum as they are super active and refining the materials........or use Amazon Lumberyard
just a heads up: if you are using deferred decals don't upgrade to 4.14.
Scenes containing deferred decal materials have become highly unstable
resulting in frequent editor crashes. I`ve submitted a bug report which
can be tracked here: https://issues.unrealengine.com/issue/UE-38709 Unfortunately
Deferred Decals don't seem to be a priority for epic as stated on the
answerhub thread: "Please be aware that this issue may not be
prioritized or fixed soon."
last time I have tried it, my ue4 have freeze... (after activating the settings)
@agitori To revert this, having enabled Dbuffer Decals: go to the root folder of your project(as the option is per-project)>config folder>open defaultengine.ini>search for the line r. DBuffer=True and change it to False.
Unfortunately, this is not a solution as you can't use the option in the project but, try again with a fresh project as this crashing behaviour should be rare enough.
Is anyone experiencing some random textures flickering after activating the dbuffer decals?
It could be Zfighting. Is your pivot slightly below the mesh?
Nope, actually the weird about the textures flickering is that it doesn't involve the textures in the models I am using the decals lol. It's a random texture which feels weird, seems like a bad topology problem tbh (it's not even my model, it's just a random scene in unreal), but before I click on "activate" on the dbuffer decals option and reset my editor it wasn't showing.
Idk if it's related to the dbuffer decals been active but it was right after activating it, so yeah...
@NoRank Here's a list detailing where Mesh Decals are at at the moment. It's written by Tim Hobson at the UE answers forum. It seems to be a sort order/early Z-buffer pass issue.
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.
Hi everyone! Im pretty beginner to UE4 so maybe asking a dumb question but: after all, when all model will be covered with "details decals", does the bullet decals will work good? And it is possible to put some big dirt decals (like big splat of blood, etc.) which will cover all other detail decals?
Found a bug in mesh decals workflow for Unreal 4. Everything seemed to work fine , however i have in one room one very huge mirror . So i used planar reflections to make it look more correct and cool. However it appears that the planar reflection does not reflect any of my mesh decals on the opposite side wall. Someone else encounter that and found a solution for it ?
Replies
@Grimwolf
Because this way You don't need the baked texture. Face weighted normals do the job just fine and You can make many different guns using the same material.
However — I've just noticed one annoying limitation with this method. The normals are overwritten, not overlayed. So if you're using say a detail normal map on your base object (which seems likely) you also need to use that map in your decal texture. But of course that will never match up perfectly (not really necessary because the detail will be quite small), but more importantly, if you had planned to use stretched UV's for your decals to make the most of your decal sheet (which also seems incredibly likely / almost certain) then your detail normal map won't match anyway. Though I suppose you can circumvent this issue by using two UV sets for your decal mesh; the second one containing the regularly scaled (matching your base objects texel density) UV's and plugging the detail normal map into that, as well as separating your decal meshes by materials if their dtNM differs. But that's not exactly ideal.
I'll probably just try and work around its limitations rather than making super complex shaders once we migrate to 4.13 at work.
You can use the opacity mask to blend between them if you'd like. At 100% opacity it completely replaces the underlying normal.
Only question I have is, is it possible to have edge wear on these decals while keeping the underlying base colour of the main mesh (and using the base colour of the decal material as the texture for edge wear)? Wasn't quite sure if there would be some sort of trickery to blending opacity maps or some such.
Question, do you need to add a draw call to the decals when you view the object from a distance?
I am going to give it a bash, looks like lots of fun
Then creating decal sheets of trims, vents, pipes, etc you can cut them out into decals and place them on models and depending on the shader setup they can contribute to the normals only (deferred method) or add to the entire material adding color,spec,gloss,normals,emissive,etc to the base layer under it.
Also because they aren't baked into the assets base normal map fine details like bumps, text, bolts, etc can be much higher res than they would be if you were to bake them into the base normal map and materials.
With using this technique i take it will reduce the amount of Textures etc loaded in since many objects will be using that one Normal sheet? Thanks for the video as well it was pretty neat.
https://www.youtube.com/watch?v=4gBAOB7b5Mg
Unfortunately, this is not a solution as you can't use the option in the project but, try again with a fresh project as this crashing behaviour should be rare enough.
Idk if it's related to the dbuffer decals been active but it was right after activating it, so yeah...
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.
Im pretty beginner to UE4 so maybe asking a dumb question but: after all, when all model will be covered with "details decals", does the bullet decals will work good?
And it is possible to put some big dirt decals (like big splat of blood, etc.) which will cover all other detail decals?