How to blend multiple textures on loaded model?

HI,
I am going to blend two textures, one is model’s normal map and the other is material texture.
In my code I just replace model’s mesh material, so there is no trouble when I apply only one texture to loaded fbx model, and my question is how do I blend two texture to loaded model

jsfiddle demo
Link is my demo, ‘addMaterialTexture’ is my code to deal with multiple textures.

Still keep searching for the solutions,
Thanks All!

Would you be open to a solution that requires combining the two normal maps beforehand, in Blender, and then loading the single resulting image normally? I think that will be a fair bit easier.

At first, I only use one normal map(created by my 3D modeler),
but in our case, one model will have thousand of texture to change.
In order to reduce file capacity and 3D modeler’s working time,
so we discuss if this blending way can be achieved by programming.
Thanks!

There is no setting for automatically combining two normal maps in three.js. To do this you’d need to either use a custom shader, or the experimental NodeMaterial system, and I don’t know of examples doing this specific task with either.

For an example of customizing a builtin material with your own GLSL code, see https://threejs.org/examples/?q=modified#webgl_materials_modified.

Thanks your reply and advise, I will try to use custom shader.

Heyo, long shot but was wondering if you were successful with this?