[0.13.5] TAA has sprites transparency issues [PARTIALLY RESOLVED 0.14.0]

Moderators will move topics here from Help & Support once an issue has been confirmed and enough information provided to reproduce.
Post Reply
User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

[0.13.5] TAA has sprites transparency issues [PARTIALLY RESOLVED 0.14.0]

Post by King of Worms »

Just tested the TAA implementation in DFU 0.13.5 unmodded and it has some issues with transparency while in movement.

Go to the city, find a walking villagers and watch how they have a blurry rectangle around them while walking around - blurring everything in the background. This happens only with walking frames. So standing in front of NPC will not show the issue properly. The same applies to all mobs when they walk around.
Last edited by King of Worms on Tue Apr 05, 2022 5:43 pm, edited 1 time in total.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: TAA is a mess and should be either fixed or removed

Post by Interkarma »

This is Unity's TAA implementation as part of PPv2 stack. DFU simply exposes these settings to player for them to use, or not, based on their own preferences.

TAA works by blurring together frames over time (thus temporal) with some weights and other magic. The ghosting you see is characteristic of how the effect functions. Here's a snippet from the Unity manual:
Because TAA is temporal, it often creates ghosting artifacts in extreme situations, such as when a GameObject moves quickly in front of a surface that contrasts with it.
In short, this is expected for TAA. I personally don't enjoy TAA for stated reason, so I don't enable it in my game. It's just there because it's part of PPv2. Nobody has to enable it they don't want to. :)

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: TAA is a mess and should be either fixed or removed

Post by King of Worms »

Interkarma, I know about TAA ghosting, its a feature of the technology, but what I describe is not that.
Unfortunatelly, its hard to capture on a screen. But I tell u, its a rectangle around the NPC/MOBS and that rectangle is the size of the sprite transparency. Everything is blurred inside the rectangle transparency.

Start a game, stand still, let a NPC go by you, watch and see for yourself.
If you zoom on the still image Ive posted, you can see it a bit, in movement, is much more apparent than that.
In this image, its most apparent at the wall and a small part of a roof.

If this is the way it looks, theres no reason to expose such a feature to users IMO, as its not working as intended.

Really, start the game, and do this test, see for yourself. PS: Ive tested is with texture filtering on/off and it doesnt change anything, when I turn TAA off, this blurry rectangle disappears. Game is unmodded.
Untitled-1.png
Untitled-1.png (395.45 KiB) Viewed 3349 times

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: TAA is a mess and should be either fixed or removed

Post by Interkarma »

What's likely happening there is TAA jitter operating with depth information of billboard quad. Even though the colour parts of sprite are transparent (technically excluded), it's still a camera facing quad object moving around in 3D space.

Do you have billboard shadows enabled/disabled in your setup? This setting changes the render queue of billboards and could have an impact here - not sure. I also don't know enough about Unity's TAA implementation to say if this is something we could improve with billboards on DFU's end. Somebody more knowledgeable than me could have an answer.

This of course wouldn't be an issue with 3D mobiles instead of billboards, as the depth info would be fully coherent with object. Considering modders have started adding 3D mobiles into the game, IMO it's best to leave TAA available. Just because it doesn't look great with retro sprites now doesn't mean it won't be better with some combination of mods or other refinements in the future. If I remove it, odds are someone else is going to ask me to put it back again later.

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: TAA is a mess and should be either fixed or removed

Post by King of Worms »

Ive tested it now with
MobileNPCShadows = False
GeneralBillboardShadows = False
NatureBillboardShadows = False

and the problem persists. I had those True before.

Ok I agree with 3d objects this will cease to be a issue and ppl requesting it back is a possibility. Still, for the base game, this feature is not working properly. My guess is, as TAA is on the right part of the slider, implying its the highest quality setting, majority of ppl who use AA will use TAA and get this result.

In my opinion, if some option is not working properly, its best to remove it for the sake of the quality of the final product. Thats the mindset I have towards all features and its ofc my personal opinion only.

Lets this be just a bug report with no requests of actions :) Tried to change the topic name to "TAA has sprites transparency issues" but it only changed the opening post

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: TAA has sprites transparency issues

Post by Interkarma »

Have looked into this some. The "shimmering box" artifact in transparent parts of moving billboards can be minimized dramatically by lowering the Motion Blending value in camera's TAA properties and slightly lowering Jitter Spread. This doesn't eliminate it entirely, but it's much harder to notice. I've pushed this change as a temp remediation.

I believe the core issue is that transparent parts of billboard are writing to motion buffer. Changing mobile billboard's MeshRenderer motion buffer setting from Per Object Motion to Camera Motion Only eliminates the problem entirely. I need to understand this more, and it's more work to implement, but it's probably a permanent fix.

I'll move to issues and follow up on the second solution at a later date.

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: [0.13.5] TAA has sprites transparency issues

Post by King of Worms »

Thanks, glad the issue is noted now ;)

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.13.5] TAA has sprites transparency issues [PARTIALLY RESOLVED 0.14.0]

Post by Interkarma »

The partial fix for this will be in 0.14.0. The problem is still there, just less evident than before.

Changing mobile billboard's MeshRenderer motion buffer setting from "Per Object Motion" to "Camera Motion Only" resolves this fully. I'll work in this full measure when I can.

Post Reply