Author Topic: Normal maps in Corona  (Read 12925 times)

2020-12-04, 18:37:53

fyckfaco

  • Active Users
  • **
  • Posts: 8
    • View Profile
Hi everyone.

I'm having some real issues with normal maps within Corona 3ds max.
I have updated both max and corona and still cannot rectify.

I have green channel the correct way round, plus gamma set up correctly.

No matter what I try Corona seems to merge the shading from the low mesh with the lighting of the normal map.


2020-12-04, 19:46:29
Reply #1

fyckfaco

  • Active Users
  • **
  • Posts: 8
    • View Profile
Ok i have solved this to some degree. Unwrapping the low res model with a single UV island and smooth group resulted in the bad normal map.
Unwrapping into multiple UV islands (flattern) asigning a different smooth group per island, and rerendering the normal map works as expected.

Why scanline can cope with a single UV island and corona cannot though is unfortunate.

2020-12-04, 19:55:26
Reply #2

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8829
  • Let's move this topic, shall we?
    • View Profile
    • My Models
If i would have to guess, i would say that Corona and scanline use different tangent basis. You need to bake normal maps in exact tangent basis that your rendering app is expecting, otherwise you risk to get shading artifacts.

Edit: looking at your example - it could be wrong gamma, or flipped axis issue as well.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-12-04, 20:03:07
Reply #3

fyckfaco

  • Active Users
  • **
  • Posts: 8
    • View Profile
As I say, it was multiple UV islands with separate smooth groups VS a single smooth group and 1 UV island.

2020-12-04, 20:47:27
Reply #4

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8829
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Corona has no problems with single smooth group and single UV shell. However errors due to mismatching tangent basis will always manifest more in such scenario, simply because the difference between high-poly and low-poly normals are much more severe. I think i can see some shading errors in your multiple smoothing groups example, rendered with Corona, but they are much more subtle.

Where do you bake normal maps? What tangent basis do you use for that?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-12-05, 01:09:34
Reply #5

fyckfaco

  • Active Users
  • **
  • Posts: 8
    • View Profile
Was just using scanline render texture. Where do I find tangent basis?

2020-12-05, 01:16:17
Reply #6

fyckfaco

  • Active Users
  • **
  • Posts: 8
    • View Profile
Is this is referring to RGB +X+Y+Z or +X-Y+Z, I have that set up correctly.
Max exports as -Y by default, so I just use that until I leave max. Does it go more in depth than that?

I really think I was just trying to use far too large directional gradients across the single UV shell, the tangent space wasn't uniform due to that, so the surface will probably have shading seams.

I baked from Xnormal also and got the same issue until I did the above fix.

2020-12-06, 10:41:47
Reply #7

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8829
  • Let's move this topic, shall we?
    • View Profile
    • My Models
No, tangent basis is not the same as Y axis flipping. You can read more about it here: http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Tangent_Basis

Surprisingly, not many bakers allows user to chose what tangent basis to use for normal map baking. 3ds Max uses its own tangent basis, other bakers use different basis, most often it's Mikk. If you're baking in xNormal, then in theory scanline shouldn't produce artefact free output, since their tangent basis doesn't match. Anyway, it's hard to tell what's going on here just from the pictures. Maybe if you could upload low-poly mesh and normal map, someone could be able to check it out and see if they could find where the issue is.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-12-07, 14:39:35
Reply #8

fyckfaco

  • Active Users
  • **
  • Posts: 8
    • View Profile
ok cool thanks!
I guess the question is then, what should I be baking in for Corona 3ds max?

2020-12-07, 15:06:49
Reply #9

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8829
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Marmoset Toolbag is excelent baker and it supports 3ds Max tangent basis, but it's commercial tool and not exactly cheap if you need it for baking alone. There also is Handplane baker, which is free and i think it supports multiple tangent basis too.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2021-01-21, 00:55:00
Reply #10

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
I've always had this problem with Corona Renderer / 3ds Max, and have basically avoided it by using high poly geo whenever I can. When working with game assets, however, this is unavoidable and produces very harsh shading artifacts as described above.

There will be times when it is not possible, or practical, to get normal maps for an asset baked in [whatever tangent space 3ds Max prefers].

I'm wondering if CoronaRoundEdges or the new PBR shader will have any say in this?

2021-01-21, 02:38:45
Reply #11

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
It seems like the default normal map strength (1.0) is not on parity with the strength (representation) of the normal map in viewports of some popular real-time renderers, e.g. Marmoset, Substance Painter, Mixer, etc.

The normal map strength 1.0 seems twice as strong, thus the correct (consistent) bump strength should be 0.5(?)

Wondering if there is some sort of conversion factor that could make sense of this(?)
« Last Edit: 2021-01-21, 04:03:51 by cjwidd »

2021-01-21, 10:21:51
Reply #12

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8829
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Can you show some examples? As far as i'm concerned, default normal map strength in 3ds max and Corona is correct and in line with industry standard.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2021-01-21, 10:29:11
Reply #13

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12741
  • Marcin
    • View Profile
The normal map strength 1.0 seems twice as strong, thus the correct (consistent) bump strength should be 0.5(?)

I have noticed something similar. I will try to bring this to the surface again and let you know about my findings.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2021-02-02, 15:14:55
Reply #14

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12741
  • Marcin
    • View Profile
Logged.

(Report ID=CRMAX-239)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us