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

2021-02-02, 16:30:55
Reply #15

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
Thank you!

I will post examples when I get the chance

2021-04-02, 07:22:48
Reply #16

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
@romullus @maru

I really want to help as much as I can to isolate and address this issue. What sort of assets or evidence would be most useful to provide?

2021-04-02, 10:09:40
Reply #17

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Don't ask me, as i said, i never noticed abnormal normal map behaviour in Corona. As long as you set-up it correctly (gamma, space, tangent basis, handedness, etc.), default strength of 1, should always provide correct result. The only exceptions i can think of, is when you use normal map for special effects, like flakes in metallic paint, or when a normal map is arbitrary authored crap, or when you use it in combination with displacement. In any case, if you observe incorrect normal map behaviour, then at very least you should attach some examples how it looks. Providing offending texture would be even better.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2021-04-02, 13:31:26
Reply #18

GeorgeK

  • Corona Team
  • Active Users
  • ****
  • Posts: 838
  • George
    • View Profile
@romullus @maru

I really want to help as much as I can to isolate and address this issue. What sort of assets or evidence would be most useful to provide?

Any form of reproduction scene/steps and further screenshots about the differences you've encountered in other software would help.

Thanks,
George Karampelas | chaos-corona.com
Chaos Corona QA Specialist | contact us

2021-04-04, 11:31:06
Reply #19

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
See attached for comparison images

Watch x1.5-2.0 speed


2021-04-04, 15:04:34
Reply #20

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
There's clearly something wrong with Corona renders in your example, but i don't think it's the strength of normal map. You can see artifacts even at 0.5 strength, they just less clearly expressed. I suspect it's because of not synched workflow. 3ds Max and UE uses different tangent basis and you can't expect to get the correct result from both, if you're using the same normal map. It would be great if you could author normal map in correct tangent basis for each app and compare the result. You would need to have high-poly version, or object space normal map to bake normal map in correct basis (synched workflow).
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2021-04-04, 20:54:56
Reply #21

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
That sounds right to me, although...

3ds Max and UE uses different tangent basis and you can't expect to get the correct result from both, if you're using the same normal map.

I believe this is the problem - I expect normal maps to produce the correct results irrespective of the application. Otherwise, the implication is that there are normal maps for 3ds Max and normal maps for everything else, and asset libraries are not constructed in these terms, e.g. Megascans, Substance Source, etc.(?)

There are cases in which it is not possible to access a normal map baked in the correct tangent space for 3ds Max / Corona Renderer, and it would seem an extreme conclusion then that 3ds max  / Corona Renderer is not an appropriate rendering solution for those cases(?)
« Last Edit: 2021-04-04, 21:07:05 by cjwidd »

2021-04-04, 21:23:57
Reply #22

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Unfortunately there's no single standard for normal map implementation, every app uses its own tangent basis, handedness and whatnot. Luckily for archviz all this is mostly irrelevant, because almost all materials are baked onto flat surfaces and difference between different tangent basis becomes imperceptible. I think that's the reason why majority of users in Corona have no issues with normal maps - they are mostly using assets prepared for archviz. Unsynched workflow only becomes a problem, when normal map is baked from and used on complex objects with highly curved surfaces, like a robot in your example. And even in this case it is possible to mitigate issues from mismatching tangent basis, but you have to prepare low-poly object for that before baking.

To summarize, you can safely use textures from megascans, substance source and similar sources in Corona and you will have zero issues, but if you want to use assets which were made for real-time use, you must be careful and look for hidden issues. But that's not Corona's fault, if your workflow is unsynched, you will have issues in every app.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2021-04-04, 21:45:26
Reply #23

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
you can safely use textures from megascans, substance source and similar sources in Corona and you will have zero issues

To be sure, you mean so-called 'surfaces' and not textures for '3D assets', per the Megascans library - I expect the same is true for other libraries as well.

But that's not Corona's fault, if your workflow is unsynched, you will have issues in every app.

Right, although that is the pretense of my question, "Is there something Corona Renderer could do about it?" For example, a conversion tool, a normal map node, etc. It sounds like @Maru has already logged something related to this issue (Report ID=CRMAX-239).

2021-04-04, 22:31:16
Reply #24

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
To be sure, you mean so-called 'surfaces' and not textures for '3D assets', per the Megascans library - I expect the same is true for other libraries as well.

Yes, i meant surfaces, but i think even with their 3D assets you should have no issues, because they are fairly high-poly. If you'd use LOD4-5, maybe you could see some small artifacts when compared it side by side with UE output (i'm making assumption that megascans normal maps are baked in UE compatible tangent basis), but i don't think it's something you should worry about.

Right, although that is the pretense of my question, "Is there something Corona Renderer could do about it?" For example, a conversion tool, a normal map node, etc. It sounds like @Maru has already logged something related to this issue (Report ID=CRMAX-239).

That's obviously not for me to answer, but i don't know any software which would support multiple tangent basis.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2021-04-04, 22:50:55
Reply #25

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
I think (maybe) Handplane did something like this, but even then it might require the high poly or world space normals or something...

2021-04-04, 23:38:38
Reply #26

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Yes, original handplane is a tool for normal map conversion and yes, it does need object space normals for that, which you can get if you have high-poly model. And to be clear, when i said that to my knowledge, there's no app that supports multiple tangent spaces, i was talking about rendering apps. Specialised bakers usually can bake in multiple tangent spaces, but Corona isn't baker.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2021-04-05, 07:54:41
Reply #27

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
Regarding Megascans 3d assets, if lower poly geo is more likely to produce normal map shading artifacts in 3ds Max / Corona Renderer, then that is a sticking point; low poly geo (LOD 4-5) is crucial for physics simulation, e.g. Tyflow. However, I agree that high poly 3D assets from the Megascans library are less likely to produce shading artifacts (see attached).

« Last Edit: 2021-04-05, 22:04:35 by cjwidd »

2021-04-05, 10:12:23
Reply #28

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Regarding Megascans 3d assets, if lower poly geo is more likely to produce normal map shading artifacts in 3ds Max / Corona Renderer, then that is a sticking point; low poly geo (LOD 4-5) is crucial for physics simulation, e.g. Tyflow.

You can use lowest LOD for simulation, but for rendering you would still use LOD0, right? So it shouldn't be a real issue. On the other hand those artifacts on LOD4 in your example looks a bit extreme - make sure that you're using normal map specifically baked for that LOD and not any other. Anyway, as i said, that's not Corona's fault, that's an issue with industry's lack of single standard. They never learn, even today whenever they come up with new technology, they make sure that everyone will implement it in their own way, which is incompatible with each other. Poor artists are left to deal with all this mess.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2021-04-05, 22:04:12
Reply #29

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
Regarding tangent space, I think there are a few to consider:
  • Marmoset
  • Mikk / xNormal
  • Maya
  • 3ds Max
  • Unity 4.x
Regarding my previous post, there was a mistake in the render and I did not use the correct normal map for the LOD4 mesh - the image has been updated in the post. However, the shading is still pretty rough. I think this is a meaningful comparison to illustrate my concern (see below); Corona Renderer (left) vs. Unreal Engine (right). Normal map shading artifacts for low poly geo from the Megascans library are more visible in the image rendered in Corona Renderer.

I am starting from the conclusion that has already been made, which is that the shading artifacts are not Corona Renderer's 'fault'. I am proposing whether Corona Renderer can do something about it at a feature level.

This is just one asset from the Megascans library, but if we expect similar behavior from other 3d assets in the library, that strikes me as a major point of friction, i.e. significant shading artifacts are to be expected from low poly geo in the Megascans library when rendered with Corona Renderer, out of the box.





[off-topic] Regarding simulation with low poly geo, what is the general workflow for simulating with low poly LOD and replacing with high poly LOD at render time?
« Last Edit: 2021-04-06, 00:57:18 by cjwidd »