Author Topic: flipping (green) normals + displacement  (Read 2209 times)

2019-06-28, 10:52:16

peterguthrie

  • Active Users
  • **
  • Posts: 250
    • View Profile
    • Peter Guthrie Visualisation
Dawid (the famous Jawowski_3d) in our office noticed a weird thing with normals in conjunction with displacement and we are wondering why it happens. Its from dabarti scanned textures.

With just a displacement map:



With normals only:



With displacement plus normals:



With displacement plus normals with the green channel flipped:




To our eyes it looks like the green channel on the normals map is being flipped by corona when displacement is enabled, and we need to flip it to make it look correct.

Any ideas what is going on here?






2019-07-04, 15:56:52
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12754
  • Marcin
    • View Profile
We will definitely look into this!

Is the below correct? (according to your investigation)
- Displacement generated with a black and white map works as expected
- Normal bump generated with an RGB map works as expected
- Displacement + Bump using both of the above maps does not look as expected
- Displacement + Bump using both of the above maps, with green channel flipped for the normal map looks as expected
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2019-07-08, 11:58:43
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12754
  • Marcin
    • View Profile
I used a simple convex sphere as my displacement/normal test texture and I cannot reproduce this.
I am afraid we will need a sample scene for this: https://corona-renderer.com/upload

Note: after I baked my normal map in Max+Corona using the CGeometry_NormalsShading render element, I had to flip the green channel in the Corona Normal Map, otherwise it did not work correctly. Then I tested with the "Flip green" option on and off in various scenarios, but it did not require any additional tweaks to work with the normal map (so the original map with "Flip green" enabled worked as expected).

And another note: we have autobump in Corona which pretty much does this for you. So if you have a good quality normal map, you do not need to additionally plug a normal map into the bump slot.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us