Build #138: [Asset-Injection] Town npcs flickering [IMPLEMENTATION CHANGED]

Locked
User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Build #138: [Asset-Injection] Town npcs flickering [IMPLEMENTATION CHANGED]

Post by TheLacus »

I realized this one wasn't reported here so i'm making a post to have a single place for discussion.

Issue
Materials for mobile billboards in towns exhibits "flickering" behaviour.

How to reproduce
  1. Provide texture replacement for moving npcs (loose files)
  2. Enable texture compression (DXT5)
  3. Travel to a town location
Notes
  • Mipmaps count suggests that mipmaps are apparently generated as requested.
  • Dungeon enemies and static npcs are not affected because atlas is not used for modded textures, in order to support higher resolutions. Npcs use atlas with a max 4096x4096 size in order to balance quality and performance.
Workaround
Disable texture compression.
Last edited by TheLacus on Wed Dec 12, 2018 5:03 pm, edited 1 time in total.

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Build #138: [Asset-Injection] Town npcs flickering

Post by pango »

By the way, has the issue been reported upstream, in Unity bug tracker?
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: Build #138: [Asset-Injection] Town npcs flickering

Post by Interkarma »

I always just assumed this was something wrong with my atlas setup (perhaps an index off somewhere). But considering atlas packing and mipmaps are all done by Unity itself, it could also be an unusual engine bug. I've not really dived into it at all. Until then, I'm just going to keep assuming the error is on my end until I rule that out. :)

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Build #138: [Asset-Injection] Town npcs flickering

Post by pango »

Hopefully it'll get fixed eventually, because currently the only way to mod town people (say, use Villagers Overhaul mod) is to disable texture compression, which drastically changes memory requirements :cry:
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: Build #138: [Asset-Injection] Town npcs flickering

Post by Interkarma »

TheLacus, would it be possible to drop the atlas for modded town NPCs as well? Modern versions of Unity are very good at batching dynamic resources now. My original performance reason for using an atlas here was done back in Unity 4.x days and probably isn't as compelling these days.

If it's not a difficult change to make, I'd be interested in the performance cost of modded NPCs with an atlas vs. without.

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: Build #138: [Asset-Injection] Town npcs flickering

Post by TheLacus »

Sure, i'll work on it asap in a branch, so we can see how it goes :)

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: Build #138: [Asset-Injection] Town npcs flickering [IMPLEMENTATION CHANGED]

Post by TheLacus »

Npcs implementation was changed to not use an atlas anymore, so this issue is not relevant to new builds.

Locked