Using a layered texture node for blending normal maps

Hi… I have a question about the layered texture node…

the following is my network

Basically I have a phong material with a generic diffuse and specular plugged in at the top.

On the left hand side I have two normal maps that I feed into a layered texture node… which then feeds into my bump node and finally into the bump input of the phong material

1/ I have a base normal map with a “forehead wrinkle” normal map blended “over” the top
2/ next I feed a indexed mask map into the transparency slot on my “forehead wrinkle” layer

at this base level everything works great… using viewport 2.0 I can preview my masked “forehead wrinkle” over the top of the base normal map… however!..

My goal is to extend this network by being able to control the mask by using a blendcolor node… basically blending between the mask and 100% black…

However placing the blendcolor node between the mask and the transparency input as indicated by the red arrow in the image above breaks the network…

I’d really appreciate if anyone can give comment about what I should look at to correct this problem…

cheers

Jamie

There is an answer to this but I don’t know it.

I’ve seen some shaders that handle pretty complex blending so long as the composite is encased in a particular type of translator. Not sure what they do at this stage, but it’s basically normalisation (finding the nearest valid value per pixel). Doubt you’d want to be doing that in real time … but I bet there is some open source stuff that covers it. Is Xnormal open source? I’m pretty sure that has a Photoshop plugin that does normalisation that would be in a basic scripting language.

[QUOTE=Senor Freebie;14350]There is an answer to this but I don’t know it.

I’ve seen some shaders that handle pretty complex blending so long as the composite is encased in a particular type of translator. Not sure what they do at this stage, but it’s basically normalisation (finding the nearest valid value per pixel). Doubt you’d want to be doing that in real time … but I bet there is some open source stuff that covers it. Is Xnormal open source? I’m pretty sure that has a Photoshop plugin that does normalisation that would be in a basic scripting language.[/QUOTE]

Thanks for the input mate… after trying a few different things I actually settled on making my own cgfx shader in mental mill… which looks like follows

And I can hook this up nicely in maya and get full control (with controllers) over blending in predefined regions via masks…

So it works super quick… The reason i’m building such a network is to complement a face rig with stress/wrinkle maps…

cheers!