[Technique Showcase] Unreal 4.13 Mesh Normal Map Decals

Replies
-
Yeaaaass! been waiting so long for this feature in UE4
thanks for the example
-
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.
-
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. -
Grimwolf said: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.
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
-
last time I have tried it, my ue4 have freeze... (after activating the settings)
-
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
-
Kobalt Kiwii said: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.
-
Hey Millenia! Thanks for this tut! Have you thought on doing this but with the POM technique like in Star Citizen?
-
Not entirely sure how it would work with this method. I think Epic might have to add support for it.
-
Unfortunately parallax doesn't work...
-
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 -
Thanks for sharing your tips, great vid
-
Grimwolf said: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.
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. -
Nice work!
-
-
Kiory_Freeman said:
-
I've featured this thread on our company page. Keep up the fantastic work, Hans!
-
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. -
Ladygrace said: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.
-
Obscura said:Can you please show me or explain how did you do this?
https://www.youtube.com/watch?v=4gBAOB7b5Mg
-
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.
-
Obscura said: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.
-
Yeah, would also be interested in getting POM to work on decals. It used to give hard crashes, now it just doesnt work.
-
Just wanted to copy akaChris's warning here: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."from: http://polycount.com/discussion/155894/decal-technique-from-star-citizen#latest
-
Hi guys, any news regarding combination of this technique with POM?
-
-
agitori said:last time I have tried it, my ue4 have freeze... (after activating the settings)
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?
-
NoRank said:Is anyone experiencing some random textures flickering after activating the dbuffer decals?
-
musashidan said:It could be Zfighting. Is your pivot slightly below the mesh?
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?
-
Depends on the blending mode setup and sorting order but yes, it should.
-
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 ?Cheers