Blending multiple normal maps

Node-based Shader Editor

Blending multiple normal maps

Postby CosmicSeizure » Thu Jan 18, 2018 11:15 pm

Hi,

i am creating blended shader for our PBR workflow, but i got stuck on a part where i am trying to blend more normal maps together. It has something to do with input/output nodes.

I do regular blending of two first normal maps through "Blend Normals" node, i want to take the result of this blending and blend it again with additional normal map, but before i do that, i want to do scaling on it again ( adjust intensity ).
The output can not be put to new Texture Sampler, because its not "Sampler2D" data, so i am stuck with this XYZ data, which i need to do scaling operation on, just like on regular "Texture Sampler" node on Normal map.
Nodes like "Multiply" and "Scale and Offset" just mess up things.

Attaching image. Main issue seems to be with the "Normals Intensity 1" node and its calculation, its flipping normals etc.

Thanks for any help.

Luke
Attachments
Screen.jpg
Screen.jpg (117.84 KiB) Viewed 5105 times
CosmicSeizure
 
Posts: 1
Joined: Thu Jan 18, 2018 10:53 pm

Re: Blending multiple normal maps

Postby Amplify_Borba » Fri Jan 19, 2018 12:03 pm

Hello Luke, thank you for getting in touch!

CosmicSeizure wrote:i am creating blended shader for our PBR workflow, but i got stuck on a part where i am trying to blend more normal maps together. It has something to do with input/output nodes.


In order to scale the normal maps outside of the sampler, you must leave the normal's Z out of the multiplication operation, please refer to the following screenshot for a possible way of achieving your intended operation:

BlendNormals.jpg
BlendNormals.jpg (243.65 KiB) Viewed 5101 times


Do note that if you choose to unpack the normals manually, the process will differ from what is shown above.

CosmicSeizure wrote:The output can not be put to new Texture Sampler, because its not "Sampler2D" data, so i am stuck with this XYZ data, which i need to do scaling operation on, just like on regular "Texture Sampler" node on Normal map.


Regarding the Texture Sample, its Tex port accepts only a Texture Object, which allows the use of it's texture UV parameters in the material inspector.

Please let me know if this helps and if you have any further questions, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Blending multiple normal maps

Postby pdrummond » Wed Sep 19, 2018 12:32 pm

How would I blend normal maps using a mask? I've tried the Lerp function as that allows me to plug in a mask, but the blend between the two normal maps is very hard. It loses a lot of detail that is preserved when using the blend normals function.

Thanks.
pdrummond
 
Posts: 26
Joined: Wed Sep 19, 2018 12:28 pm

Re: Blending multiple normal maps

Postby pdrummond » Wed Sep 19, 2018 12:51 pm

Here's a screenshot to illustrate what I mean. The top shows the results of the standard normal blend function. I want to preserve details in this way.

The bottom shows a lerp blend between the two normal maps. The mask is working but the new normal map is replacing the details from the original, rather than blending.

Any help is much appreciated.

Image
pdrummond
 
Posts: 26
Joined: Wed Sep 19, 2018 12:28 pm

Re: Blending multiple normal maps

Postby pdrummond » Wed Sep 19, 2018 1:05 pm

I have a rough and ready solution which uses a Texture Sampler node defaulting to bump. I first lerp my detail normal to this, applying the mask. I then do a standard normal blend between the results and my main normal map. I'm probably making some stupid mistake so any suggestions will be welcomed.
pdrummond
 
Posts: 26
Joined: Wed Sep 19, 2018 12:28 pm

Re: Blending multiple normal maps

Postby Amplify_Borba » Wed Sep 19, 2018 1:09 pm

Hello!

You can lerp normal maps, just be sure that the end result is normalized.

There's also the possibility of using a Layered Blend node for this effect as well.

Please let me know if this helps, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Blending multiple normal maps

Postby pdrummond » Wed Sep 19, 2018 1:15 pm

I'll try using normalize. Will this work with the output of a layered blend mode?

Thank you.
pdrummond
 
Posts: 26
Joined: Wed Sep 19, 2018 12:28 pm

Re: Blending multiple normal maps

Postby Amplify_Borba » Wed Sep 19, 2018 1:42 pm

No problem! Yes, it should work in the same manner, although its output will always depends on the data it receives.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Blending multiple normal maps

Postby pdrummond » Wed Sep 19, 2018 6:02 pm

I couldn't get the normal maps to blend correctly with lerp, but I found a workaround. Thanks for your help. I now have the beginnings of a reasonable skin shader.

Image
pdrummond
 
Posts: 26
Joined: Wed Sep 19, 2018 12:28 pm

Re: Blending multiple normal maps

Postby Amplify_Borba » Thu Sep 20, 2018 7:50 am

Thank you for letting us know that you've found a workaround, the final result looks pretty good!

If you don't mind hinting at how you've solved this situation, it could be helpful for other members of the community who might struggle with the same problem.

Please let us know if you have any further questions, we'll be happy to assist, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Next

Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 14 guests

cron