So i have two side checked on my wall material. Its a brick wall, and on the inside, where i really want things to look right, instead the normal map of the brick is sticking in. Which makes the brick look indented into the wall.
However on the outside of the wall, the opposite side of the mesh building (aka plane). the normal map is sticking out normally.
For what it is worth this is correct behavior for 2 sided materials because if something indents inwards on one side, then in order to be a meaningful surface it means it indents outwards on the other side. What you are wanting is something different from the default.
Try using the two sided sign with the IF node. If twosidedsign is less than 0, multiply your normal map by -1,-1,1, otherwise just return the normal map.
Ideally you don’t want to be using the 2 sided material for things like brick walls. There’s a bunch of possible issues and problems it can cause. The 2 sided material is really meant for things that are supposed to be flat.
The multiply at the bottom should be -1,-1, 1, but you have all negatives. The B does not need to be negative since it is already correctly flipped to account for the backfacing direction. Everything else looks good.
Don’t worry about the apparent ‘messyness’ of the If statement. under the hood it usually gets compiled down to a simple ternary operator expression without branching.
Hmmm that is a great question. I have never even thought to try testing POM on a two sided material. I will try to test this out soon but my first guess is that the tangent space transform will be inverted in much the same way. You probably need to apply the same method as above on the transformed camera vector inside of the function or it might end up tracing some kind of weird inverted/backwards heightfield.