Parallax Occlusion Mapping Decals (Using Custom Decal Response) UE5

  Рет қаралды 5,748

Alex

Alex

8 ай бұрын

Many have wanted to use POM and decals together to add details to an object or environment, only to find that the built in node breaks if it is rotated in any way - making it unusable as a decal.
This is because POM relies on mesh tangents to render correctly, and the decal cannot sample them. In my last video, we learned how custom decal responses could be used to allow working tangent space normal map decals. Using the same technique, we can give POM the tangents it needs by offloading the POM to the underlying mesh material, and viewing decals as a vessel for general purpose data.
How to rotate POM:
forums.unrealengine.com/t/pro...

Пікірлер: 48
@Brudiz
@Brudiz 8 ай бұрын
Hi, Alex. Actually, POM decals can be unsensitive to tangent without blueprint implementation, just by modifying function itself. I provided this solution in last video by link in the comments
@Ninja1Zombie1Master
@Ninja1Zombie1Master 8 ай бұрын
Your function is quite good. But without the true smooth mesh tangents, I did notice much more distortion on curved surfaces. Perhaps this is not such an issue since POM is best avoided on curved surfaces anyway. But regardless, I was able to combine the two techniques for the best of both worlds.
@Brudiz
@Brudiz 8 ай бұрын
@@Ninja1Zombie1Master Nice to hear that, thanks for your responce
@bartkoch1988
@bartkoch1988 8 ай бұрын
@Brudiz could you provide the link again? I can't find it.
@Brudiz
@Brudiz 8 ай бұрын
@@bartkoch1988 drive.google.com/file/d/1Gt8qx6Naq6iDpXFm1YPcmz76nKsWekxN/view?usp=sharing
@vaillecgart1854
@vaillecgart1854 8 ай бұрын
Amazing ! Thanks again for sharing ! I will try this soon. The previous Triplanar video blend pre sampling technique turned out to be great for my custom Texture Bombing system ! Really appreciated man
@Ninja1Zombie1Master
@Ninja1Zombie1Master 8 ай бұрын
Glad to hear- Thanks for watching!
@MIKELENZTIPS
@MIKELENZTIPS 5 ай бұрын
I was wondering if this was possible the other day! Thanxxx for outlining!
@Ninja1Zombie1Master
@Ninja1Zombie1Master 5 ай бұрын
Sure thing, thanks for watching!
@Hotrood999
@Hotrood999 8 ай бұрын
Amazing video! May I ask how did you do to place the decal aligned perfectly to the surface normals of the meshes at the beginning of the video?
@Ninja1Zombie1Master
@Ninja1Zombie1Master 8 ай бұрын
In the top right of the viewport there is a snap to surface setting, which also has a toggle for aligning the selection to the surface normal. Very handy for decals.
@Hotrood999
@Hotrood999 8 ай бұрын
Thank you!
@islingtonbel
@islingtonbel 8 ай бұрын
hey, Alex, great tutorial! Really appreciate your POM series. But I have an issue with really bad ghosting/shadowing effect around my character when he runs over POM or Tessellated floor or stands next to POM/Tess wall. it somewhat goes away if I add strong light source nearby, but I can't use this trick everywhere. any ideas what causes this? Thanks again!
@Ninja1Zombie1Master
@Ninja1Zombie1Master 8 ай бұрын
Ghosting issues are almost always a result of bad motion vectors combined with TAA / TSR. POM is prone to messing up motion vectors unless you use Pixel Depth Offset. Unfortunately it is impossible to use PDO with POM decals. Keeping the displacement levels very low will reduce ghosting too. Tesselation doesn't normally have that problem though, so I'm not sure why that would be happening.
@islingtonbel
@islingtonbel 8 ай бұрын
thank you! @@Ninja1Zombie1Master
@monsterhunter9748
@monsterhunter9748 Ай бұрын
Hey, idk if I missed anything super obvious, but I can't seem to get this method to work with sampling different decals for the same receiver. My idea would have been to pass some sort of id from the decal mat instance to the receiver which then switches the decal by offsetting the UVs on an atlas, but I haven't found a way to actually achieve that.. at this point I feel like this would start to just cost too much performance since our master material is already quite heavy, but I'd be curious if you had any ideas
@Ninja1Zombie1Master
@Ninja1Zombie1Master Ай бұрын
That should work just fine, and is basically what I show at 3:30. The decal is passing an index value to the base material, which offsets which part of the atlas is sampled, but could also alter anything else as needed.
@monsterhunter9748
@monsterhunter9748 Ай бұрын
​@@Ninja1Zombie1Master bruhh you even showed the setup already :(( thanks for pointing it out again tho. Guess I'll just have to fix the rotation center and it should be done
@pauljojo1318
@pauljojo1318 6 ай бұрын
Very cool. Does this work with textures too? So having a texture instead of grey and just "parallaxing" (so to speak) that texture with the decal?
@Ninja1Zombie1Master
@Ninja1Zombie1Master 6 ай бұрын
Yes, you can either lerp to a different texture that samples using the POM UVs, or you can offset the main material's UVs by the POM offset amounts.
@pauljojo1318
@pauljojo1318 6 ай бұрын
@@Ninja1Zombie1Master Hmm problem is, the texture gets only displayed where the decal is. Everywhere around it's just having it's base color (brown for mud).
@Ninja1Zombie1Master
@Ninja1Zombie1Master 6 ай бұрын
@@pauljojo1318 the POM node has an "offset only" output that can be combined with other UVs, rather than using the POM UVs alone.
@pauljojo1318
@pauljojo1318 6 ай бұрын
@@Ninja1Zombie1Master I tried to use them to only offset the Material but the result is weird. Have you made it work?
@Ninja1Zombie1Master
@Ninja1Zombie1Master 6 ай бұрын
​@@pauljojo1318 Hm the offset only output does not seem to be working as intended. Instead, manually subtract the original decal UVs from the POM UVs to get the correct offset amount. Add this to the texture coordinates instead. You also need to make sure the offsets are scaled properly to account for the difference in scale of the decal Uvs and the base material UVs.
@alinarangi7826
@alinarangi7826 4 ай бұрын
Hi Alex, thanks for your tutorial, I have a question, I'm new to Unreal and I want to make game assets, if I use POM in my assets they may cause performance issues. your tutorial was advance for me, and i don't understand lots of things. thanks in advance
@Ninja1Zombie1Master
@Ninja1Zombie1Master 4 ай бұрын
It really depends on how you set it up. POM can be fairly cheap or extremely expensive depending on the heightmap resolution, texture filtering settings, sample count, etc.
@alinarangi7826
@alinarangi7826 4 ай бұрын
@@Ninja1Zombie1Masterthanks for reply, can you please guid me to make a nice and cheap POM? the setup of this tutorial is cheap or expensive? you know man, i think about modular set and use POM decals for them
@Hellwalker855
@Hellwalker855 7 ай бұрын
Is it possible to have another material on the receiver or control the opacity of the decal? Seems like the use cases are limited.
@Ninja1Zombie1Master
@Ninja1Zombie1Master 7 ай бұрын
You would control the opacity just by using a lerp in the underlying material. In my example, I faded the edges radially using the UV coordinates, but you could also use an alpha texture or even the height map. You can't use the opacity of the decal material, because it pre-multiplies the other outputs which will mess up the data. You can un-multiply it, but I found it to be too inaccurate. The underlying material works just like normal, beyond the altered response to the decal. It can be anything. The method should not limit usage in any way, since you have complete control over how it responds to what decals. In fact, the opposite is true. Not using custom decal response workflow is limiting, because previously the only control you had was to receive all decals or receive none.
@Hellwalker855
@Hellwalker855 7 ай бұрын
@@Ninja1Zombie1Master Thanks for the reply. I think I figured it out. A lerp was all that I was missing. Thanks again.
@Ninja1Zombie1Master
@Ninja1Zombie1Master 7 ай бұрын
@@Hellwalker855 Sure thing, thanks for watching!
@pauljojo1318
@pauljojo1318 6 ай бұрын
Can the "Rotate POM" be modified to leave the shadows coming from the right angle (sun vector or whatever)?
@Ninja1Zombie1Master
@Ninja1Zombie1Master 6 ай бұрын
Yes, but It would probably be easier to just counter rotate the sun vector, like we do with the normal map.
@pauljojo1318
@pauljojo1318 6 ай бұрын
​@@Ninja1Zombie1Master I tried to achieve this all day :D Couldn't figure out how to rotate a vector in the material editor (without higher trigonometry).
@Ninja1Zombie1Master
@Ninja1Zombie1Master 6 ай бұрын
@@pauljojo1318 There isn't really a general purpose way to rotate vectors without trig. The rotate about axis node is the simplest way to rotate a 3D vector by axis and angle, but it's doing trig under the hood.
@pauljojo1318
@pauljojo1318 6 ай бұрын
@@Ninja1Zombie1Master I tried to hook them up in the right way for a while. There seems no tutorials on rotating a vector in mat - only WPO. A hint on how to hook the sun light vector up with the rotate about axis node?
@Ninja1Zombie1Master
@Ninja1Zombie1Master 6 ай бұрын
1) I'd probably use the -(vertex normal) for the rotation axis. 2) Use the same -(rotation angle) as with the normal map. 3) Pivot point is (0,0,0) when rotating a vector. 4) Position will be -(light vector). 5) Then, add the output back to your original position aka -(light vector). 6) Use this as the input for your POM light vector.
@user-cc8ir9pv8b
@user-cc8ir9pv8b 6 ай бұрын
Hi, Alex. Can you give some arbitrary e-mail address where I can send my question with pics about the POM-Decal? I made the Decal as in your actually very good tutorial but it is pixelated and the parallax effect is not correct either. Changing different Parameters won’t help. I tried to make it in a substrate material but I don’t think that there should be a problem.
@Ninja1Zombie1Master
@Ninja1Zombie1Master 6 ай бұрын
If it is still pixelated try dividing and re-multiplying the UVs by a higher number than 8 (like 128). This should reduce the banding issue I showed even further. As for incorrect parallax... Check that the decal is oriented correctly. Unless you modify the POM node, the decal tangent must be aligned with the surface tangent. I don't have a public email set up yet for the channel but that's a good idea. I'll set one up later today - let me know if you're still struggling and I'll link it.
@user-cc8ir9pv8b
@user-cc8ir9pv8b 6 ай бұрын
@@Ninja1Zombie1Master Alex, I had a Mask node set to a wrong channel (receiver material) but after correction it helped not much. I’m sure I made some mistake but where, no clue. My English is very weak, this is the reason why I wanted to explain maybe with screenshots.
@Ninja1Zombie1Master
@Ninja1Zombie1Master 6 ай бұрын
@@user-cc8ir9pv8b I set up techartalex.yt@gmail.com
@user-cc8ir9pv8b
@user-cc8ir9pv8b 6 ай бұрын
@@Ninja1Zombie1Master Alex, I have send to you an e-mail but got no response.
@Ninja1Zombie1Master
@Ninja1Zombie1Master 6 ай бұрын
@@user-cc8ir9pv8b Okay, I sent a response now.
@buffalosoldier-br1mi
@buffalosoldier-br1mi Ай бұрын
is this game performant thats my question
@Ninja1Zombie1Master
@Ninja1Zombie1Master Ай бұрын
It really depends on how you configure the settings for the POM. The same best practices apply here as when using POM anywhere else.
@angrygamer1822
@angrygamer1822 Ай бұрын
so much fucking yapping
Parallax Occlusion Trim Sheets (UE4 Tutorial)
54:39
Grimmstar
Рет қаралды 18 М.
MEGA BOXES ARE BACK!!!
08:53
Brawl Stars
Рет қаралды 34 МЛН
Homemade Professional Spy Trick To Unlock A Phone 🔍
00:55
Crafty Champions
Рет қаралды 59 МЛН
Мы никогда не были так напуганы!
00:15
Аришнев
Рет қаралды 3,9 МЛН
D-Buffer Decals changed my life! [UE5]
24:12
PrismaticaDev
Рет қаралды 15 М.
Unreal Engine 5 - Parallax Occlusion Mapping Tutorial
16:38
renderBucket
Рет қаралды 46 М.
How To Convert Any Decals Into 3D Mesh | Unreal Engine 5.4 😍
9:12
Combining Decals Efficiently | Tips & Tricks | Unreal Engine
4:00
Unreal Engine
Рет қаралды 30 М.
Your Triplanar is wrong. Here's how to make one that works. [UE5]
24:48
Decal Champ (UE5) Explainer (How To Use)
18:17
Metal Donut
Рет қаралды 4,1 М.
Setting Up Mesh Decals
14:59
The DiNusty Empire
Рет қаралды 55 М.
Creating Edge Damages for 3D Assets using Decals
30:24
FastTrack Tutorials
Рет қаралды 14 М.
MEGA BOXES ARE BACK!!!
08:53
Brawl Stars
Рет қаралды 34 МЛН