Did some R&D on how to have multiple texture maps allocated to a single shader.
Why do we want to do this? This allows us to have different resolution textures allocated to our mesh.
Example: A 4k Texture map for the character's face, a 2K texture map for the body and legs, 4k map for the hands----> all this plugged into a single shader.
With this we can work within the Maya optimised Texture map size of 4k.
Step 1: UV unwrap and place your tiles in a positive UV space of (1,1), (1,2), (1,3), (1,4) etc. Under the Image tab click image range and Set the maximum and minimum U and V values, if tiling 4 squares to the right , set maximum V to 5.
Step 2: Create file nodes for each texture map you wish to assign
Step 3: In the place2dTexture node, uncheck Wrap U and Wrap V (you dont want it to tile), Translate frame to your UV coordinates ( 0,0 being the default square, 1,0 to the adjacent square on the right)
Step 4: in the File Node go to Color balance and set default color to black.
Step 5: Create a layered texture. drop your file nodes into the layered Texture Attributes. Set blend mode to Add.
Step 6: Connect layered texture to the color, bump, specular etc. of the shader you want to use for your mesh.
Notes: Remember to set the default color of the file nodes to black. Reason being we are "adding" layers in the layered texture, hence black being (0,0,0) will not affect your color map values because as everyone knows 0 + X = X.
Previously a production blog for my final year project ( you can still find the old posts of WIP images) YOu have stumbled across a collection of knick knacks and tutorials for 3D CG...
Friday, September 11, 2009
Subscribe to:
Post Comments (Atom)
This is an awesome tutorial. Thank you.
ReplyDeletethis is great thank you sir
ReplyDeleteI am using three different textures/uv tiles for one object. The UVs are arranged from 0-1, -1,0, and -1,1. I created file nodes and assigned the textures, offset the UVs correctly, and connected to a layered texture. I then assigned my object to the layered shader. Everything looks perfect in the Maya workspace, but I can only render one of the three textures on my object with mental ray. The other textures render completely black. Is this a bug?
ReplyDeleteNOTES
I am using 3 Targa texture files (Each is 4k).
I have set the default color balance to black for the layered texture
In the place2dTexture nodes, I have unchecked Wrap U and Wrap V
I have set the layered blend mode to Add and for the others I have selected “over”.