UE4 anti aliasing

Hey guys,

I’m running into really bad anti aliasing on cables in my project. It has an emissive material applied to it. It’s a big city scene. So when zoomed out like how you would with a cityscape, the anti aliasing is very apparent since these cables are thin. I’m trying to figure out if there’s a better solution than just scaling up the thickness of these cables. I am already using MSAA in my render settings. Any help/input is greatly appreciated.

You could try to decrease the emissive intensity of the material based on the camera distance, that might help hide the issue.

This might give you an idea maybe? http://www.humus.name/index.php?page=3D&ID=89
And maybe the spline thicken function? https://forums.unrealengine.com/development-discussion/content-creation/3454-sprite-model-how-did-they-do-this

If something on the screen becomes smaller than a single pixel - there is no way for an anti-aliasing alghoritm to fix it: there are simply no pixels rendereded. That is: unless you use super-sampling, but tnat’s kinda “cheating”, since the formula of “something is smaller than a pixel = problems” still applies, you just have have “smaller” pixels.

Emissive material doesn’t cause the problem - it just makes it more noticable.

Your idea of thickening the cables as the camera moves away is a good one: unlike the anti-aliasing trciks, this will work.

If you’re willing to spend some time coding - a more advanced solution would be to replace the wire with a geometry plane on big distances, and do your own, custom, manual anti-alising on it, using this algorhitm: https://en.wikipedia.org/wiki/Xiaolin_Wu’s_line_algorithm
You can get pixel screen size with DDX/DDY function, and encode where the line is on the plane with some sort of a distance field.

there’s a material setting for Responsive AA which can help with this sort of problem - just search for it in the material properties