[Feature Request] Move "bFillPNGZeroAlpha" into factory/import setting of UTextureFactory.
While digging through engine sources I discovered that the engine destroys existing color information in png images on pixels that have zero alpha set on them.
I don't think this is documented anywhere, but the offending lines are located within "Epic Games\UE_4.21\Engine\Source\Editor\UnrealEd\Private\Factories\EditorFactories.cpp" at lines 3138..3145.
It looks like this:
So, uh apparently this is the reason:
(this is a comment for FillZeroAlphaPNGData function)
While I see the point, this flag causes issues when you need to import png data that is known to contain correct information, for example, a map with glossiness information in alpha channel, possibly from another engine.
What's more, the flag is set as an engine config switch, and cannot be altered if you're, for example making a plugin that imports such png file.
As such it would be nice if the switch were moved into factory settings, where engine config switch would determine its default state... and the switch would need to be visible in texture import settings as well from UI side.
In this case original behavior would be retained, while it would be possible to import png texture without destroying its color data.
asked Nov 18 '18 at 02:24 AM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here