How To Fix UV Seams caused by Math

Real-Time VFX Quick Tip: How to Fix UV Seams in Unreal Engine 5 Caused by Math

How To Fix UV Seams caused by Math

If you’re using math to generate UVs, you’ve probably run into issues with ugly solid seams of pixels in your material’s output.  While there are limitless ways to cause this, a very frequent one is by confusing Unreal’s MipMap selection system. Here’s how to trick it back to working correctly: 

How to Fix UV Seams in Unreal Engine Caused by Math

To fix a UV Seam in Unreal Engine:

  1. Set the MipValueMode on your texture sample to “Derivative.”
  2. Create a new texCoord node.
  3. Take the DDX and connect it to your texture sample.
  4. Take the DDY from your texCoord and connect it to your texture sample as well.

Voila! Hopefully this fixed your material’s UV seam and you can get back to making that awesome effect!

Thanks to Nicolas Larreteguy for sharing how to help Unreal select the correct MipMaps! (https://artstation.com/hipnox)

Want to stay in touch with our studio as we craft world-class real-time VFX? Follow Beyond-FX on Twitter, Instagram, Facebook, YouTube, Twitch, & TikTok!

Beyond-FX