armory3d / armory

3D Engine with Blender Integration
https://armory3d.org
zlib License
3.04k stars 315 forks source link

Blending between normal maps #1968

Open knowledgenude opened 3 years ago

knowledgenude commented 3 years ago

Eevee: 97519049-4f780380-1977-11eb-90a6-b821bd8c8c7d

Armory: 97519067-59016b80-1977-11eb-9508-165765b40704

thelabcat commented 3 years ago

It looks like in Armory the material disappears completely. I had that happen in BGE sometimes, mostly because BGE did not support any kind of texture coordinates but good hard UV.

I have not downloaded Armory, let alone the test file 😋 Nevertheless hope this helps 😊

MoritzBrueckner commented 3 years ago

I think the issue is that there is currently no blending between normal maps (it is a bit more complicated than it is the case for other texture maps), so the first parsed normal map is used (in this case, it is the rock normal map). The normal map is also taken into account for the Normal output of the Geometry node (blender doesn't do this and Armory probably shouldn't do this as well) resulting in this mixture of textures.

Maybe we can implement one of the methods described in the linked article? @luboslenco What do you think of that (the article is very old so there might be better methods now)? Is there a method that you would recommend? Or should we let the user decide (with a global flag) and implement all/some of them? They don't look too difficult to implement.

knowledgenude commented 3 years ago

@thelabcat I don't know about how well the UVs are working. I guess the problem is how the Mix Shader is working in Armory. Now the example contains a baked stencil map.

Looks like the normal map does not respect the stencil map like the diffuse map is doing: Captura de tela de 2020-10-29 10-49-58

thelabcat commented 3 years ago

That sounds correct and well investigated. Why does the other guy have the noob name?