material detail texture and normal?
Asked Answered
R

17

0

im confused how the detail texture option in a spatial material is designed. when setting detail color to multiply it messes up the base texture , i mean its not like a standard multiply function in a image editor.it looks weird the detail normal doesnt get added on top of the basenormal , instead it tries to blend the 2 like50/50 wich isnt what a detail normal should do right? it should be >basenormal map + detail normal map is this a design choice or am i missing something?

Raisin answered 14/5, 2022 at 13:43 Comment(0)
I
0

If you are looking to emulate photoshop blend modes it might help to know the maths behind them, so this might be useful: https://dunnbypaul.net/blends/

Inconspicuous answered 14/5, 2022 at 13:53 Comment(0)
R
0

@Megalomaniak said: If you are looking to emulate photoshop blend modes it might help to know the maths behind them, so this might be useful: https://dunnbypaul.net/blends/

ok but what about the detail normal map, i think its a weird design decision

Raisin answered 14/5, 2022 at 13:58 Comment(0)
I
0

@DJM said: it should be >basenormal map + detail normal map is this a design choice or am i missing something?

They might just be doing the correct thing and normalizing after?

Inconspicuous answered 14/5, 2022 at 14:8 Comment(0)
R
0

@Megalomaniak said:

@DJM said: it should be >basenormal map + detail normal map is this a design choice or am i missing something?

They might just be doing the correct thing and normalizing after?

actually the detail normal map messes up my base normal , my tangents arent correct anymore so the meshes look not like they should

Raisin answered 14/5, 2022 at 14:19 Comment(0)
I
0

are both normalized before you assign them?

Inconspicuous answered 14/5, 2022 at 16:2 Comment(0)
R
0

i dont understand , how to normalize? the models appear correct without detail normal

Raisin answered 14/5, 2022 at 16:10 Comment(0)
R
0

i have absolutely no idea, its just a basic normal map. i tried it with multiple normal maps . the base normal gets messed up when adding a detail normal

Raisin answered 14/5, 2022 at 17:16 Comment(0)
I
0

Well, this can be a rather complex subject with a lot of things to potentially consider, maybe look through resources like this: https://80.lv/articles/tutorial-types-of-normal-maps-common-problems/

It covers many things but I'm still not sure it's all exhaustive.

Inconspicuous answered 14/5, 2022 at 18:24 Comment(0)
S
0

Godot indeed doesn't perform proper blending of the base normal map and detail normal map. This is something that could be changed (using either UDN or Whiteout blending), but I don't have time to look into it.

As a workaround, you can use a custom shader which performs proper blending of the base normal map and detail normal map.

Shrubby answered 14/5, 2022 at 22:6 Comment(0)
R
0

@Calinou said: Godot indeed doesn't perform proper blending of the base normal map and detail normal map. This is something that could be changed (using either UDN or Whiteout blending), but I don't have time to look into it.

As a workaround, you can use a custom shader which performs proper blending of the base normal map and detail normal map.

i see, why is it designed that way, was there a reason for this? i have no knowledge of writing shaders in godot myself yet so ill leave it for now. i thought i was missing something

Raisin answered 14/5, 2022 at 23:25 Comment(0)
I
0

Might be it's a cheaper calculation that is better fit performance wise for mobile/low performance devices perhaps.

Inconspicuous answered 14/5, 2022 at 23:48 Comment(0)
S
0

i see, why is it designed that way, was there a reason for this?

The current method of adding the detail normal map on top of albedo was probably chosen out of simplicity, rather than performance. It's a bit cheaper for sure, but not enough to make a difference on modern GPUs (even on mobile). That said, its downsides aren't that noticeable in actual gameplay in the first place :)

For reference, it's been this way since detail mapping was added to SpatialMaterial in Godot 3.0.

Shrubby answered 14/5, 2022 at 23:51 Comment(0)
R
0

i think that the detail normal mapping should be changed in the basematerial in godot4. i also dont see a performance cost for this, as its an optional feature. if it affects performance , people can just untick it. it is actually noticeable on models during gameplay and in inspector as the models appear incorrect

Raisin answered 15/5, 2022 at 0:4 Comment(0)
G
0

I never got good results from that material option, maybe that is why. It could be done with a shader, but the math can be kind of complex. Though, it may be best just to author the textures as you want, or bake them in Blender, which should have more advanced capabilities. Even id abandoned the whole mega-texturing thing, and it never looked good to begin with.

Gam answered 15/5, 2022 at 0:47 Comment(0)
R
0

its a good way of adding some triplanar detail with multiply an albedo and normal map on uv2 for larger objects. it just adds that little extra

Raisin answered 15/5, 2022 at 0:51 Comment(0)
G
0

Yeah, I can understand like for terrain and stuff. It just seems like for manually modeled objects it's not as useful.

Gam answered 15/5, 2022 at 3:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.