#A 2D texture looks bad in 3D

1 messages · Page 1 of 1 (latest)

tranquil ledge
#

Hello. I've found some errors in this texture. Lines drawn on it disappear, and there are jagged edges visible along the borders. I've been trying to find this in forums for months and nothing works, so could someone give me a hand?

#

An example of the dissapeared lines

#

An example of the jagged edges (or "saw teeth)

#

The video was made with MSAA x 8

#

And its running in a 1600x900 resolution

#

And It's still there (a little softer) even with FSR 2.2

fervent void
#

I think you might be missing some anti aliasing here

tranquil ledge
#

I *think * I activated all the anti aliasing options. Can you name a more specifically option there?

distant dock
#

Are you using nearest neighbor sampling for the textures? In that case, each pixel will show the nearest texel on the texture, if a line of texels falls between screen pixels, so that none of them are the closest texel to any pixel, they will not be visible.

Fundamentally there is not really a solution to this problem, it's a technical limitation. If you want to use nearest neighbor sampling you have to get creative and work around it somehow.

#

As for the jagged edges: I'm guessing the material with jaggies uses alpha clipping, right? Unfortunately MSAA can not smooth edges created by alpha clipping, it only affects edges of geometry. This is another technical limitation.

My recommendation if you want to use alpha clipping like this, and you want them to be anti-aliased, is to not use MSAA, and instead go for temporal AA or FXAA/SMAA or whatever Godot has.

These all come with their own limitations, but at least they will treat geometry edges and alpha clipping edges in the same way.

#

The solution I went for in my game was to manually implement supersampling, which means rendering the game at a higher resolution, and then scaling it down to half or 1/4 the size, combining several pixels data into one final pixel.

This is extremely expensive though. It's fine in my case because I supersample 1080p down to 270p, which is low enough resolutions to be totally fine.

But I wanted to mention it either way, because this is in theory the perfect solution to this problem. But in reality pretty much no games use supersampling since it's not worth the cost in 99% of cases. Instead they use temporal AA, SMAA, or similar.

#

By the way, you probably don't want to use all AA features at the same time. At least check carefully that the image actually becomes better when you do, they're not really built to be used together.

tranquil ledge
#

The tiles on top of the png pixels

#

png pixels

#

And this is repeated everywhere

distant dock
#

Aha

#

Don’t use a transparent material for non-transparent surfaces!

#

Your texture is looking weird in Godot. Some lines look smudged in one direction.

#

What texture filtering are you using?

tranquil ledge
# distant dock Don’t use a transparent material for non-transparent surfaces!

But it´s a tileset. Some tiles are transparents ,so the image texture is a transparent PNG. And ,in theory, in the UV map all is ok. How can this happen? Where can be the error?

And the texture filter... what godot filter you recommend? I used antialising and scaling 3d (and high resolutions) but it didnt work to solve that "smudge".