You are not logged in.

Read the FAQ and Knowledge Base before posting.
We won't make a 3DS/2DS emulator.



#1 2017-08-03 09:11:09

mgitkun
Member
Registered: 2017-06-06
Posts: 43

Kingdom Hearts 358/2 Days - opaque edges should be transparent

AFAIK this has always been an issue, it was present on the last stable build and is still present on the most recent build (5aeed211).

I searched the forum, sourceforge, and github but didn't find anything about this, figured I'd post it since you guys seem to be working on an issue with Picross 3D which looks to be of a similar nature (I could be wrong about them being similar).

-----

The various planes that make up the hair have opaque edges which should be transparent, these opaque edges create a boxy outline of the otherwise transparent sections of the planes...... at least that's what I'm guessing it is, I could be wrong.

During gameplay the outline is usually quite hard to spot because the edges are a very light color and very thin but inside the pause/in-game menu the character model is displayed with this outline in solid black making it impossible to miss.

SoftRasterizer displays the edges transparent as they should be.

Menu - SoftRasterizer
Menu - OGL 3.2
Menu - OGL 3.2 - textures disabled (included to show where the planes are in reference to the opaque edges)

Ingame - SoftRasterizer
Ingame - OGL 3.2


---

This isn't game breaking so I don't expect it to be a priority, just wanted to make sure it was known.

Last edited by mgitkun (2017-08-03 09:27:59)


i5 2500K - CPU | GTX 480 - GPU | 8GB - RAM | TX650 - PSU | Windows 7 x64 - OS

Offline

#2 2017-08-03 21:17:02

rogerman
Member
Registered: 2011-06-04
Posts: 380

Re: Kingdom Hearts 358/2 Days - opaque edges should be transparent

Are you referring to the nature of aliased polygon edges vs antialiased polygon edges? It seems to me as if you are. Everything you're describing is completely intended behavior.

The OpenGL renderer can do Multisample Antialiasing, which is why you are seeing a difference in polygon edge rendering between OpenGL and SoftRasterizer (SoftRasterizer doesn't support MSAA). Turn off OpenGL's MSAA feature and you will get aliased polygon edges, just like SoftRasterizer.

The "black outline" that you're referring to is a graphical glitch caused by the improper blending between the 3D layer and the underlying 2D layer, which only occurs when MSAA is turned on.

To note: You are using a bunch of graphical enhancements that never were originally present on a hardware NDS, so you can't judge graphics accuracy unless you turn all of them off. Any graphical enhancement will, by their very nature, cause rendering inaccuracy compared to a hardware NDS. When testing for graphics accuracy, always make sure your options match the NDS!

Just like this:
GPU Scaling: 1x
GPU Color Depth: 18-bit
Deposterize Textures - Off
Texture Upscaling - Off
OpenGL MSAA - Off
OpenGL Texture Smoothing - Off

Offline

#3 2017-08-04 02:13:24

mgitkun
Member
Registered: 2017-06-06
Posts: 43

Re: Kingdom Hearts 358/2 Days - opaque edges should be transparent

rogerman wrote:

Are you referring to the nature of aliased polygon edges vs antialiased polygon edges? It seems to me as if you are. Everything you're describing is completely intended behavior.

The OpenGL renderer can do Multisample Antialiasing, which is why you are seeing a difference in polygon edge rendering between OpenGL and SoftRasterizer (SoftRasterizer doesn't support MSAA). Turn off OpenGL's MSAA feature and you will get aliased polygon edges, just like SoftRasterizer.


I wasn't talking about the aliasing in the scene; both the ingame and menu screenshots were to show the outline you explained away in the second part of your reply, it's just more noticeable in the menu.

rogerman wrote:

The "black outline" that you're referring to is a graphical glitch caused by the improper blending between the 3D layer and the underlying 2D layer, which only occurs when MSAA is turned on.

To note: You are using a bunch of graphical enhancements that never were originally present on a hardware NDS, so you can't judge graphics accuracy unless you turn all of them off. Any graphical enhancement will, by their very nature, cause rendering inaccuracy compared to a hardware NDS. When testing for graphics accuracy, always make sure your options match the NDS!

Just like this:
GPU Scaling: 1x
GPU Color Depth: 18-bit
Deposterize Textures - Off
Texture Upscaling - Off
OpenGL MSAA - Off
OpenGL Texture Smoothing - Off


Ah, I'd tried disabling the options one by one and in groups before making this post but even when I turned off almost all of them I kept Smooth Textures enabled so the issue persisted.....my bad, sorry for wasting your time.


Having either MSAA or Smooth Textures enabled causes the outline to appear.


Do you see this glitch ever being worked out, or is it unlikely?

Last edited by mgitkun (2017-08-04 02:29:08)


i5 2500K - CPU | GTX 480 - GPU | 8GB - RAM | TX650 - PSU | Windows 7 x64 - OS

Offline

#4 2017-08-04 03:22:40

rogerman
Member
Registered: 2011-06-04
Posts: 380

Re: Kingdom Hearts 358/2 Days - opaque edges should be transparent

Oh yeah, Smooth Textures can also cause certain blending issues at edges.

And... you were talking about aliasing in the scene, but just didn't realize it.

And no, these glitches are highly unlikely to be fixed because of these reasons:

1. MSAA forces antialiasing at edges, which causes edges to have translucent pixels. However, the NDS assumes aliased edges, which implies no translucent pixels. Games typically assume that polygon edges have no translucent pixels too. This means that if the layer compositing mode is not set to Blend (very typical), then translucent pixels won't be blended correctly, which causes the "outline", also known as a halo, to appear.

There is a small possibility that this could be fixed if some special heuristics are used to determine which pixels should be blended and not blended whenever MSAA is used. However, this may become a serious performance issue because blending would have to be determined on a per pixel basis. If this were ever to get fixed, this would be the lowest priority because an easy workaround exists: If the halos become intolerable, then turn off MSAA.

2. Texture boundary glitches associated with Smooth Textures occur because the NDS assumes that textures will always be read using nearest neighbor sampling. Smooth Textures forces bilinear sampling to be used, which may cause unwanted pixels to get read at texture boundaries. NDS games tend to use texture atlases a lot, so this problem can happen often.

This glitch will NEVER be fixed because we have no idea how a game will use a particular texture. We're not psychic. There is no heuristic that can predict what constitutes an intended texture boundary within a texture atlas. And again, an easy workaround already exists: If texture boundary glitches become intolerable, then turn off Smooth Textures.

Offline

#5 2017-08-04 06:45:05

mgitkun
Member
Registered: 2017-06-06
Posts: 43

Re: Kingdom Hearts 358/2 Days - opaque edges should be transparent

rogerman wrote:

Oh yeah, Smooth Textures can also cause certain blending issues at edges.

And... you were talking about aliasing in the scene, but just didn't realize it.

And no, these glitches are highly unlikely to be fixed because of these reasons:

1. MSAA forces antialiasing at edges, which causes edges to have translucent pixels. However, the NDS assumes aliased edges, which implies no translucent pixels. Games typically assume that polygon edges have no translucent pixels too. This means that if the layer compositing mode is not set to Blend (very typical), then translucent pixels won't be blended correctly, which causes the "outline", also known as a halo, to appear.

There is a small possibility that this could be fixed if some special heuristics are used to determine which pixels should be blended and not blended whenever MSAA is used. However, this may become a serious performance issue because blending would have to be determined on a per pixel basis. If this were ever to get fixed, this would be the lowest priority because an easy workaround exists: If the halos become intolerable, then turn off MSAA.

2. Texture boundary glitches associated with Smooth Textures occur because the NDS assumes that textures will always be read using nearest neighbor sampling. Smooth Textures forces bilinear sampling to be used, which may cause unwanted pixels to get read at texture boundaries. NDS games tend to use texture atlases a lot, so this problem can happen often.

This glitch will NEVER be fixed because we have no idea how a game will use a particular texture. We're not psychic. There is no heuristic that can predict what constitutes an intended texture boundary within a texture atlas. And again, an easy workaround already exists: If texture boundary glitches become intolerable, then turn off Smooth Textures.

Thank you for the in-depth answer, while unfortunate that they probably won't be fixed it's nice to know the reason why.


i5 2500K - CPU | GTX 480 - GPU | 8GB - RAM | TX650 - PSU | Windows 7 x64 - OS

Offline

Board footer

Powered by FluxBB