Page 1 of 1

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

Posted: Thu Nov 01, 2018 9:50 pm
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.

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

Posted: Fri Dec 07, 2018 10:44 pm
by pango
By the way, has the issue been reported upstream, in Unity bug tracker?

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

Posted: Sat Dec 08, 2018 1:06 am
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. :)

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

Posted: Sat Dec 08, 2018 1:09 am
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:

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

Posted: Sat Dec 08, 2018 1:18 am
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.

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

Posted: Sat Dec 08, 2018 4:00 pm
by TheLacus
Sure, i'll work on it asap in a branch, so we can see how it goes :)

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

Posted: Wed Dec 12, 2018 5:04 pm
by TheLacus
Npcs implementation was changed to not use an atlas anymore, so this issue is not relevant to new builds.