Invert normals doesn't work with command line nvtt_export

I’m using nvtt_export on the command line because it has that options I need. However I am finding that --normal-invert-y is not inverting the green channel as it says it should. I get the same image result either with or without the option. I’m outputting BC5.

Hi @dave! I just tested this with 2024.1.0 and it seems to have worked – I could be missing something, though, so if you could send me the command line that doesn’t work, it’d be much appreciated!

Here’s the image I’m testing with:

Here’s it converted to normals with Y flipped, using the command line

nvtt_export.exe pebbles-nvtt2.png --to-normal --normal-invert-y -f bc5 -o pebbles-normal-yflip.dds

pebbles-normal-yflip.dds (569.7 KB)

And here’s it converted to normals without Y flipped, using

nvtt_export.exe pebbles-nvtt2.png --to-normal -f bc5 -o pebbles-normal.dds

pebbles-normal.dds (569.7 KB)

Thanks!

As I remember, when I posted this, I didn’t mention that I was not generating normals from an image, but just reading existing normals and wanting to flip the green channel and encode to BC5. Apparently that doesn’t work and can’t be done with the tool. So, I am preprocessing the image before I run the export tool. I’m preprocessing the image in a few additional ways now, so I don’t need to invert the normals with the tool. I’m still using it to do the encoding, which is working great.

Ah! I’m happy to hear you found a workaround. This makes me think of a few ways this could be easier, which I’ve added to the backlog.

Thanks for following up!