Download

World Aligned Normal Problem

Hello,

Here I’m using a normal map with “Normal” compression. The result on sphere looks fine.

http://uupload.ir/files/4msk_75.jpg

http://uupload.ir/files/vihi_621.jpg

But when I use a channel packed normal map with “Masks” compression the result looks wrong.

http://uupload.ir/files/ahsv_152.jpg

http://uupload.ir/files/bhc2_6612.jpg

When I apply it to landscape it works fine, but on meshes, it looks terrible just like on the Sphere.

I couldn’t find the cause :confused:
Any help will be appreciated.
Thanks.

I am curious, Whats the size of your texture and why is the TextureSize on the world aligned normal just 500 and not 512?

Also it doesnt seem fine to me in that image.
http://prntscr.com/f5vdbb

World aligned Normal material function by default rotates your normal to match vertex normals for each projection, and thus depends on blue channel already unpacked.
You should modify material function to unpack your normals inside the function, instead of trying to unpack result of the blend.

@DieByZer0, “Texture size” is how big the texture looks on the surface.

But I’m doing Z projection only. I went ahead and added that B channel reconstruction inside the function right after texture input, but still getting weird result. Or am I doing it wrong? :confused:

http://uupload.ir/files/mz4_23.jpg

I’m willing to bet that you did it in WorldAlignedNormal, while should have changed subfunction WorldAlignedNormals_HighQuality.

Oh… um… okay. Where should I add it? :eek:

http://uupload.ir/files/7x11_326.jpg

Here:

http://image.prntscr.com/image/60aa202704d641eaa21aa6f0510c6d50.png

Thanks man! :slight_smile:
The projection is fine now, though the problem is the normal map is inverted on the bottom half creating a seam in the middle. :confused:

http://uupload.ir/files/6cts_22.jpg

http://uupload.ir/files/uz5p_23.jpg

http://uupload.ir/files/ydab_24.jpg

Edit: The bottom half doesn’t really matter to me, thanks for the help @Deathrey! :slight_smile:

Try replacing the chain you use to unpack normal map with the custom node, set to output float3, with one input called input and the following code:


return UnpackNormalMap(float4(input.rg,0,0)).rgb;

Normal map red and green should be in red and green channel of input obviously.
Check if it fixes the issue.

Like this? I’m surely doing it wrong because it didn’t fix the bottom half of the sphere.

http://uupload.ir/files/1hod_1521.jpg

Another issue is that when the mesh is rotated the normal colors are rotating with it all the way. :frowning:

http://uupload.ir/files/ufxp_111.jpg

http://uupload.ir/files/m9cu_222.jpg

Edit: So even with original WorldAlignedNormal and unpacked normal map still the colors shift as mesh rotates…

Here’s a clean test.
Original WorldAlignedNormal node + Normal map with “Normal compression”.
Tangent Space Normals is unchecked in material.
Sphere rotated 90 Degrees, normal pattern is fixed but the colors shift.

http://uupload.ir/files/5h7r_33.jpg

http://uupload.ir/files/6zev_55.jpg

http://uupload.ir/files/oruc_44.jpg

Anyone know what should I do?

Edit: Same problem happens with WorldAlignedTextures_Complex too.