html5 canvas - How to Apply a Normal Map to a Portion of a Mesh? -


the question says all. want apply normal map a portion (a few select faces) of mesh.

the normal maps 512 x 512 , come canvas.

what ways of accomplishing this?

taking @ three.meshfacematerial place start. allow use multiple textures on single mesh. i'm having trouble finding documentation, can check out this little demo on jsfiddle see in action. instead of defining color in each individual material, define it's normalmap intended normal map.

then each face can mapped specific texture manually in our example using code like:

cube.geometry.faces[desiredfaceindex].materialindex = desiredmaterialindex 

there slicker methods set modifying mesh before pass three.js. believe if have created model expect multiple textures, can apply them using method shown in fiddle reach desired result. luck!


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -