Remove normal map Y inversion #112

Closed
github-bot wants to merge 1 commit from gh-pr/112/head into gh-pr/112/base
Owner

@⁠DarkBlade909 on GitHub · 2026-11-24 03:48 UTC · original
DarkBlade909:master → master · +0 −1 · 1 files · 1 commits · closed without merging

Y inversion is unneeded and causes incorrect normal map rendering

**@⁠DarkBlade909** on GitHub · 2026-11-24 03:48 UTC · [original](https://github.com/holdmysocks/SixNG/pull/112) `DarkBlade909:master` → `master` · +0 −1 · 1 files · 1 commits · closed without merging Y inversion is unneeded and causes incorrect normal map rendering
Y inversion is unneeded and causes incorrect normal map rendering
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:10:43 +00:00
github-bot closed this pull request 2026-11-26 20:10:43 +00:00
Author
Owner

@⁠holdmysocks on GitHub · 2026-11-24 04:06 UTC · original

Thanks for the PR! We compared renders with and without this line using an overhead light. On rhino's armour bolts, master lights the raised bolts from above, and without the flip they read as lit from below, so the flip looks right in general. Could you share the model (and camera angle) where it looked wrong to you? It may be a specific case, such as mirrored UVs, that needs a narrower fix.

**@⁠holdmysocks** on GitHub · 2026-11-24 04:06 UTC · [original](https://github.com/holdmysocks/SixNG/pull/112#issuecomment-7121706791) Thanks for the PR! We compared renders with and without this line using an overhead light. On rhino's armour bolts, master lights the raised bolts from above, and without the flip they read as lit from below, so the flip looks right in general. Could you share the model (and camera angle) where it looked wrong to you? It may be a specific case, such as mirrored UVs, that needs a narrower fix.
Author
Owner

@⁠DarkBlade909 on GitHub · 2026-11-24 04:32 UTC · original

Here's player_story000_01_pantsjeans_mr1_002_regular_mw_long_full with/without the fix- Sounds like there may be an issue with tangents, especially in the case of flipped UVs
image
image

**@⁠DarkBlade909** on GitHub · 2026-11-24 04:32 UTC · [original](https://github.com/holdmysocks/SixNG/pull/112#issuecomment-7122106533) Here's `player_story000_01_pantsjeans_mr1_002_regular_mw_long_full` with/without the fix- Sounds like there may be an issue with tangents, especially in the case of flipped UVs <img width="725" height="971" alt="image" src="https://github.com/user-attachments/assets/35028866-6342-4a97-8c2e-76ae9093fc69" /> <img width="737" height="971" alt="image" src="https://github.com/user-attachments/assets/a1dde7a5-1436-4bbb-b662-b4fc75df5034" />
Author
Owner

@⁠holdmysocks on GitHub · 2026-11-24 04:36 UTC · original

Thanks a lot for the screenshots, they really help! You're right that something's off: on these jeans the folds read correctly without the flip, while on the rhino's armour bolts they only read correctly with it. So it looks like a tangent handedness issue (likely around flipped UVs) rather than the flip itself being wrong everywhere. I'm looking into a fix that gets both cases right, and I'll credit your report when it lands.

I've been doing a LOT of work today, especially on characters: outfits, hair, poses and animation, clothing colours and more. A new release is coming soon. It's not perfect yet, but it keeps getting better, and reports like this one are a big part of that. Thanks again!

**@⁠holdmysocks** on GitHub · 2026-11-24 04:36 UTC · [original](https://github.com/holdmysocks/SixNG/pull/112#issuecomment-7122174693) Thanks a lot for the screenshots, they really help! You're right that something's off: on these jeans the folds read correctly without the flip, while on the rhino's armour bolts they only read correctly with it. So it looks like a tangent handedness issue (likely around flipped UVs) rather than the flip itself being wrong everywhere. I'm looking into a fix that gets both cases right, and I'll credit your report when it lands. I've been doing a LOT of work today, especially on characters: outfits, hair, poses and animation, clothing colours and more. A new release is coming soon. It's not perfect yet, but it keeps getting better, and reports like this one are a big part of that. Thanks again!
Author
Owner

@⁠holdmysocks on GitHub · 2026-11-24 05:02 UTC · original

Thank you for digging into this! You were right that normal maps were lit wrongly on some models. Tracing it from your change showed the stored tangents follow the second UV set, while the normal maps are sampled with the first, so the fix had to rebuild the tangent frame from the UV set the map actually uses. That fix is now merged in #120, which builds on your findings, so I'm closing this one in its favour. Really appreciate the report and the work you put in.

**@⁠holdmysocks** on GitHub · 2026-11-24 05:02 UTC · [original](https://github.com/holdmysocks/SixNG/pull/112#issuecomment-7122560362) Thank you for digging into this! You were right that normal maps were lit wrongly on some models. Tracing it from your change showed the stored tangents follow the second UV set, while the normal maps are sampled with the first, so the fix had to rebuild the tangent frame from the UV set the map actually uses. That fix is now merged in #120, which builds on your findings, so I'm closing this one in its favour. Really appreciate the report and the work you put in.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.