Tank Exporter

Tank Exporter

1.1k Downloads

Normal maps fail to extact to .png

Closed this issue ยท 4 comments

commented

Some normal maps such as turret/hull/gun fail to extract correctly leaving a not empty file but no normal map.
image
Some failed examples:
WZ-132-1: Hull, Turret
WZ-111-5A: Hull, Gun, Turret
WZ-121: Hull, Gun, Turret
Sheridin: Chassis, hull, gun

.dds source files are correct

commented

Hi.. I'll look in to this as soon as I can.
I'm under pressure to get an app written for my wife's company.
Thanks for pointing it out.

commented

No rush, love the tool.

commented

Glad you enjoy TE.. :)

I found the problem...
The normal maps for these tanks have no values in the red channel.
As you know each color = RGBA channels..
R is used as the alpha in all tanks BUT the ones you listed.
During the conversion from the ANM map to a normal tangent map, I use the green and alpha to calculate the y axis and after, I place the red channel in to the alpha.
RGB s the tangent values.. R is moved to Alpha before the conversion and becomes the transparency/alpha.
The normal maps should still work in any 3D app.
If you want to fix them in the shader.. Its not hard.
Go to Edit Shaders..
Pick the ConvertNormaMap_shader on the list at the bottom.
FInd this part:
if (convert == 1)
{
color_out.rgb = tn.rgb*0.5+0.5;
color_out.a = m.r;
}
else
...
...
and changed the color_out.a = m.r;
to
color_out.a = 1.0;
and click the Compile Button at the bottom right.
That will force the alpha to 1.0 for all normal map conversions.

commented

Because I have not heard a replay back.. I'm closing this issue.