Author Topic: [RESOLVED] Corona Layered Material: Normal Map Combine  (Read 1358 times)

2020-01-28, 09:33:14

cjwidd

  • Active Users
  • **
  • Posts: 414
    • View Profile
    • Artstation
How are normal maps being combined in Corona Layered Material, e.g. overlay?

I have a Corona Layered Material representing a single texture set of a cellar door. The surface contains wooden and metal elements. In Corona, this material is implemented with a Corona Layered Material consisting of a dielectric (Base) and metal layer (Layer 1). Does the normal map of the base layer need to be piped into the metal layer, OR is the normal map of the base layer the "correct" representation of the bump?
« Last Edit: 2020-02-01, 20:27:59 by cjwidd »

2020-01-28, 16:10:21
Reply #1

steyin

  • Active Users
  • **
  • Posts: 362
  • BALLS
    • View Profile
    • Instagram Page
From what I recall bump/displacement only works in the base layer, so you have to overlay all maps there. Unless that got fixed....

2020-01-28, 16:29:07
Reply #2

Juraj Talcik

  • Active Users
  • **
  • Posts: 4005
  • Staying home, like I always did. So should you :-)
    • View Profile
    • studio website
From what I recall bump/displacement only works in the base layer, so you have to overlay all maps there. Unless that got fixed....

Displacement yes,..but also bump? I thought bump has to be propagated to every layer.
talcikdemovicova.com  Website and blog
be.net/jurajtalcik   Our studio Behance portfolio
Instagram   Our studio Instagram, managed by Veronika

2020-01-28, 16:52:42
Reply #3

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9612
  • Marcin
    • View Profile

2020-01-28, 19:02:36
Reply #4

cjwidd

  • Active Users
  • **
  • Posts: 414
    • View Profile
    • Artstation
I should note, autobump is disabled in the posted images, legacy displacement (2.5D displacement is disabled). Corona version 5.

@steyin, Yes I have heard the same thing, that displacement only affects the base layer, but I have not heard the same about normal / bump. I was under the same impression as what @Juraj described, but maybe @Maru has identified something in the build that is affecting bump performance(?)
« Last Edit: 2020-01-28, 20:19:37 by cjwidd »

2020-01-29, 20:49:21
Reply #5

cjwidd

  • Active Users
  • **
  • Posts: 414
    • View Profile
    • Artstation
@maru did you end up identifying an issue in the build?

2020-01-30, 07:45:56
Reply #6

GeorgeK

  • Corona Team
  • Active Users
  • ****
  • Posts: 236
  • George
    • View Profile
How are normal maps being combined in Corona Layered Material, e.g. overlay?

I have a Corona Layered Material representing a single texture set of a cellar door. The surface contains wooden and metal elements. In Corona, this material is implemented with a Corona Layered Material consisting of a dielectric (Base) and metal layer (Layer 1). Does the normal map of the base layer need to be piped into the metal layer, OR is the normal map of the base layer the "correct" representation of the bump?

My take on this, is that order of bump seems to be based on mask intensity and type, there is a bump overlay/overlap from base layer but I would investigate this further, since displacement works strange for me in v5.
“Every artist was first an amateur”

2020-01-30, 13:52:32
Reply #7

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9612
  • Marcin
    • View Profile
Returning to the 1st post:
If I understand it right (do I?) - there is only one normal map involved in this setup - right? It's like a "global" normal map for the whole door object. There is no separate normal map for the wood and for the metal?

If so, then I would say the normal map has to be plugged into the layer1 material and that's all.

I did some simple tests:
- Create material A with convex bump (bubbles)
- Create material B with concave bump (the same bubbles, but inverted)
- Create a layered material which will mix material A and B

The expected would be that setting layer to 50% should result in no bump at all, right? Because it should negate the other bump (the concave bubbles should negate the convex bubbles, or vice versa). But it doesn't work like that. It looks like it renders something like 50% visible convex bump and 50% visible concave bump on top of each other. This results in having something like fully spherical bubbles visible on the surface. :)

Another thing:
Let's say that we remove any bump from the layer1 material. The expected would be that there should be no bump visible in the resulting layered material at all, right? Because there is a layer1 material without bump on top of the base material which has bump. It doesn't work like that. Instead, we are getting some strange tiny bubbles.

I will now report this to our dev team, because right now I am not sure what is right and what is wrong. :)
I would be great to learn about some common use cases of layered mtl with bump - that would help us find the issues and come up with correct solutions.

Update: it's the same in V5 and V6.

Starter task:
(Internal ID=453249334)

2020-01-31, 10:59:11
Reply #8

cjwidd

  • Active Users
  • **
  • Posts: 414
    • View Profile
    • Artstation
I'm providing some renders under the three conditions described in the original post, but with an additional image rendered in Marmoset Toolbag for comparison. In MT, realtime light calculations are determined by the normal map, whereas the displacement map only displaces vertices without affecting light calculations, so you may see some displacement artifacts in the Corona render but not the MT render - there are artifacts in the map itself that are invisible in MT, but not Corona.

The images are meant to emphasize the light response to the normal map - try to ignore differences in color management.

It's not *entirely* clear whether the 'normal (base)' or 'normal (Layer_1)' is more veridical(?)

















« Last Edit: 2020-01-31, 11:28:11 by cjwidd »

2020-01-31, 11:20:17
Reply #9

cjwidd

  • Active Users
  • **
  • Posts: 414
    • View Profile
    • Artstation
@Maru I've uploaded the texture set to the private uploader for your convenience, you can see the screen grab posted above for the shader connections.

2020-01-31, 12:30:21
Reply #10

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 6412
  • Let's move this topic, shall we?
    • View Profile
    • My Models
As far as i can tell, your layered material is composed of wood and metallic materials with distinct mask separating both materials. By not plugging normal map into either base or layer1, you just simply disabling normals details from wood or metal. Frankly, i don't understand what you're trying achieve here?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-01-31, 19:18:19
Reply #11

cjwidd

  • Active Users
  • **
  • Posts: 414
    • View Profile
    • Artstation
@Romullus, I submitted the texture set to the private uploader if you'd like to take a look for yourself. The question the post is asking is whether it is more "correct" for the normal map to be plugged into the Base Material, Layer 1, or both the Base Material and Layer 1 for a Corona Layered Material. As you can see, the surface response of the material is different under all three of those conditions, but which is the correct method?

The texture set represents both a dielectric and metal surface, i.e. there are not separate textures representing the metal and wood surfaces, the surface is represented by a a single texture set - that is why the texture set is parsed into a Corona Layered Material with two sub-materials: a dielectric and a metal.

Importantly, in the above comparison post, the normal map IS plugged in to either the Base Material or Layer 1, i.e. the post is illustrating the visual difference. Disabling normals from either the Base Material Layer 1 is not depicted.

2020-01-31, 19:33:06
Reply #12

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 2985
    • View Profile
Romullus won't be able to see it on the private uploader, as he isn't a member of the Corona Team (just an incredibly useful, helpful, and invaluable forum member).

PS - and we wouldn't be able to share it with anyone outside of the Corona team, which is why it is called a Private Uploader after all :)

2020-01-31, 19:38:16
Reply #13

cjwidd

  • Active Users
  • **
  • Posts: 414
    • View Profile
    • Artstation
Oh, Tom, my bad - I forget about this, although it does say so on Romullus' handle 🤦‍♂️

2020-01-31, 19:59:11
Reply #14

cjwidd

  • Active Users
  • **
  • Posts: 414
    • View Profile
    • Artstation
@Romullus, I can send the textures to you, personally, if you'd like to take a look. Otherwise the provided images should give some indication of what I'm trying to achieve.