0xafbf / blender-datasmith-export

Blender addon to export UE4 Datasmith format
GNU General Public License v3.0
401 stars 53 forks source link

Normal texture not flagged correctly when the alpha channel is used #51

Open lasa01 opened 3 years ago

lasa01 commented 3 years ago

Connect the normal map alpha channel to eg. specular input, like this: image

When exporting as datasmith, the normal texture is exported like this:

<Texture name="de_santorini_santorinistreet_n_png" file="tests_normal_a_Assets/de_santorini_santorinistreet_n_png.png" rgbcurve="0.0" srgb="2" texturemode="1" texturefilter="3">
    <Hash value="fb025e72f57146225a0e2e81515513a4"/>
</Texture>

The texturemode is 1, which is not correct. If you remove the alpha channel connection, the texture is correctly flagged as a normal map (texturemode 3):

<Texture name="de_santorini_santorinistreet_n_png" file="untitled_Assets/de_santorini_santorinistreet_n_png.png" rgbcurve="0.0" srgb="2" texturemode="3" texturefilter="3">
    <Hash value="fb025e72f57146225a0e2e81515513a4"/>
</Texture>