Page 1 of 1

Issue with Normal Maps using Texture Arrays

PostPosted: Fri Nov 09, 2018 4:41 am
by MajinKa
Hello there!

This is my very first post after having used ASE for about a month now. First of, thanks for such a great tool; it has truly improved our visual workflow in all the good ways!

I’m working on a shader that blends between 4 sets of textures using RGBA masks. Since each set has an Albedo, Met/Rough and Normal texture, and I’m using an additional couple of texture samplers, I’ve hit that hard 16 sampler limit. Hence, I’ve resorted to using your free Texture Array tool and everything has been great so far for Albedo and metallic/rough maps. However, for normal maps, I’ve been unable to set up the node correctly. I’ve tried toggling the “normal map” option on the referencing texture array node, and directly trying to unpack the normal data. However, although I do get a “valid” normal data, it renders differently than if I use a traditional texture sampler. Something that may be a clue: the preview for the texture array node has a lighter overall blue color that one would expect. Am I doing something wrong, or is there an optimal way to set up a normal-only texture array so that it renders exactly as a normal sampler would??

Thank you so much in advance!! Your tool is amazing, fun, useful and truly flexible. Big fan.

-Rob

Re: Issue with Normal Maps using Texture Arrays

PostPosted: Fri Nov 09, 2018 3:23 pm
by Amplify_Borba
Hello Rob, thank you for the kind words and support, we're glad to know that you're having a good time with ASE!

Regarding the issue you've encountered, could you please confirm if you have your Texture Array sampler's 'Normal Map' parameter toggled 'ON'? Please refer to the screenshot below:

Image

This is a required step for working with normal maps in samplers, since it will ensure that the texture is used as a normal map by unpacking and scaling the result into a normal vector in tangent space.

Please let me know if this helps and if you have any further questions, thanks!

Re: Issue with Normal Maps using Texture Arrays

PostPosted: Tue Nov 13, 2018 5:40 pm
by MajinKa
Hi Borba!!

Thank you ever so much by responding right away! Actually, sorry for not being so quick myself, as I was in an event.
I had checked the “normal” map toggle. The issue was my format compression I think, and linearity. In dtx5 everything works amazingly and I’m getting total pariety between using a standard sampler and a texture array. Thank you!

I’m referencing subsequent standard array nodes. One and only one marked as a normal map. I’m doing this to be able to cluster together Albedo, Metallic, Smoothness and Normal maps into a single array. So far it’s working without a problem, saving a number of samplers down the line (which was my original intent)

IS there something I should be wary of when using texture arrays containing normal maps and on-normal map textures??

Thank you so much, again!!

-Rob

Re: Issue with Normal Maps using Texture Arrays

PostPosted: Wed Nov 14, 2018 9:52 am
by Amplify_Borba
Thank you for letting us know that the issue was related to the textures themselves and not to ASE!

If I understood correctly and you mean to use texture arrays that contain normal maps mixed with other types of textures, you'll need to toggle the 'Normal Map' parameter 'OFF' in the Texture Array sampler, and manually unpack the normal maps. You may use the Unpack Scale Normal node for that operation.

In the event that I didn't fully understand your question, could you please elaborate and share a screenshot of your setup or a sample?

Re: Issue with Normal Maps using Texture Arrays

PostPosted: Fri Nov 16, 2018 8:41 pm
by MajinKa
Hello!

Actually, you understood it better than I explained it! Thanks ;)
It was quite a relief to get your answer because that’s exactly what I had ended up doing, regarding using mixed (normal and non-normal) textures within a same array- unpacking later with the dedicated node.

It has helped me tremendously in creating a splat shader supporting well over 4 (rgba) channels. So far, it’s working with 6 channels each drawing unique Albedo, MetallicRough and Normal.

This whole texture array stuff has made it possible, since the main limitation I had faced before was the number of texture samplers.

Thanks immensely!

Re: Issue with Normal Maps using Texture Arrays

PostPosted: Mon Nov 19, 2018 12:28 pm
by Amplify_Borba
No problem, happy to know I was able to help and that you've managed to sort out this issue!

Have you had the chance to rate and review Amplify Shader Editor? It would be awesome if you could share your experience with the Unity community, the Unity Asset Store thrives on user interaction and direct feedback.
Every bit helps, your feedback is extremely valuable to us!

Please don't hesitate to get back in touch if you have further issues or questions, thanks!