[UE5] Compression settings for artifacts in flow map shader?

Hey folks!

I have experience with HLSL and shaders within Unity, but I’m trying to learn Unreal. I’m working on a gas giant shader and am running into some frustrating artifacts with my flow map. I’m hoping someone with more experience can point to something I’m missing, or perhaps explain what and why this is happening so I can try to work around it. Here’s some deets:

  • Created the flow map in Flow Map Painter
  • Flow map uses Vector Displacement map compression (when I change this setting, the result is MUCH worse)
  • Flow map has sRGB unchecked and is set as Linear Color sample type in material editor
  • Texture map is default imported, but I did add a gaussian blur on the texture because it was kind of pixelated which wasn’t doing me any favors

My thinking right now is that I’m noticing it seems the artifacts are worse if I paint over something more than once in Flow Map Painter (maybe the issue is user error in that program?). OR there’s something I’m missing in the compression settings, maybe it’s similar to smooth vs faceted normals but on a per-pixel basis (is that even possible?). Maybe I just need to tile the flow map so that the artifacts appear so small they don’t really matter anymore. Either way, thank you all for any insight you can offer!

I’m really curious about this one, but I don’t have any solid answers off the top of my head. In no particular order:

  • Have you tried to isolate if the issue is with the flowmap or with the textures themselves? I’m thinking you could hack together a quick UV gradient-based thing into a flowmap and use that instead of your sampled texture.
  • If it is indeed the flowmap, I’d start removing nodes to see if there’s some funky math anywhere. Maybe the frac(Time * .1) is causing some issues?
  • If you inspect the pixel values in something like Photoshop (or even PIL) do they show as RGB8 or 32bit?
  • Is the source format of the texture something like EXR or HDR?
  • Are we looking at the blurred or unblurred version of the texture? (I’ve seen some issues with things like scene texture blurs that give you stepped artifacts kinda like what we’re seeing here)
  • Is the Sampler Type of any of these textures (either the flow map or the base texture) set to “Nearest”?

Hey there Ozz, Those are some really good things to look into, thank you so much!

  • There WAS an issue with the image texture being pixelated that made the flow banding worse, but I blurred it in photoshop and that’s what you see above
  • I’m going to look into this
  • I never even thought of this and I’m going to check
  • Same for this one, I have some research to do
  • I THINK the flowmap texture is unblurred. In the tutorial I was following that seemed to be the purpose of setting compression to Vector Displacement
  • I don’t think so, but it certainly won’t hurt to double-check

Thank you again for suggesting some avenues for investigation!