I have been successfully mapping and mixing diffuse triplanar mapping textures using the material node system and StandardNodeMaterial. Now I would like to do the same for the normals however I am a bit stuck.
My triplanar mapping function is loosely based on the triplanar-mapping example available on the node material demo page. The naive way would be to use this custom mapping function to generate a diffuse grayscale texture that would be fed as argument into BumpMapNode. However, BumpMapNode requires the input texture to includes uvs which triplanarMapping doesn’t provide.
material.normal = new Nodes.BumpMapNode(triplanarMappingTexture);
Would it be the correct workflow to achieve this triplanar normal mapping?
Another solution that I had in mind was to use a normal map instead and have the triplanarMapping function spitting out directly the normal vectors. I tried to adapt some code found on here but I didn’t manage to get anything working properly either.
Thanks for putting me on the right track with perturbNormal2Arb. I modified the function available in NormalMapNode.js to make it work properly this time.