MapStudioProject / CTR-Studio

An editor for 3DS formats including BCH and BCRES.
MIT License
91 stars 9 forks source link

normal maps are inverted from what they should be #34

Open steventylerseanherr opened 1 year ago

steventylerseanherr commented 1 year ago

not sure why but either resaving a model with normal maps or adding a normal map havent tested this much but im positive my normal maps are the same spec as albws but still results in inverted bumps (eg a bump outwards turns into a bump inwards or vice versa)

KillzXGaming commented 1 year ago

IIrc I think it was an issue with tangents, but I am not sure why. It occurs when you do any model edits?

steventylerseanherr commented 1 year ago

yeah with added normal maps https://cdn.discordapp.com/attachments/1034630716287369276/1113591237526700122/image.png https://cdn.discordapp.com/attachments/1034630716287369276/1113591463717126205/image.png

and with vanilla normal maps: https://cdn.discordapp.com/attachments/1034630716287369276/1113596462534766645/The_Legend_of_Zelda_31.05.23_18.14.46.582.gif https://cdn.discordapp.com/attachments/1034630716287369276/1094041328318435388/SPOILER_The_Legend_of_Zelda_07.04.23_19.17.06.993.gif (not sure which one was which but one was edited the other wasnt)

KillzXGaming commented 11 months ago

Maybe fixed now? https://github.com/MapStudioProject/CTR-Studio/commit/38207aa493283174fb2274ce9408300e064c8d7a

steventylerseanherr commented 11 months ago

sweet ill give it a try

steventylerseanherr commented 11 months ago

seems its still inverted they display right in ctr studio image but not ingame image image if the vertex shader can flatout disable textures (by just not supporting them) could it also invert the colors on textures?

ill test on a stage model next

steventylerseanherr commented 11 months ago

no good normals still inverted on map models as well

also i looked at other vanilla normal maps to make sure mine was the right format image image red at the right cyan at the top blue on the left

edit: i had an idea about this on discord https://discord.com/channels/1034629789128065044/1034630716287369276/1162288562725720064