Thursday, 26 April 2012

Maya Texturing - Layering Textures for Terrain

 Over the past few weeks I have come across a number of problems in Maya and I find as soon as I solve one problem ... a harder problem just replaces it. I have been told that Maya 2012 is one of the buggiest versions of Maya so I'm hoping some of these bugs I have encountered will be fixed by then.

I have decided to document just some of the problems I have been having. Most of them have nothing to do with bugs just Maya's lack of ability to excecute some pretty basic stuff. By writing this I am hoping to help out some people who have come across the same problems so they don't end up wasting time on things such as AO with transparency.One of the reasons I had these troubles was because I can't download and use any plug-ins because I will be rendering this on the University's RenderFarm.

Layering Textures for a Terrain

So I'm going to kick start this with something that set me back a few days trying to find the best method to texture a terrain. Anyone who has done research on this matter has probably come across this video on YouTube: You might have spent hours and hours trying to get it to work but what the author fails to tell you is that this cannot actually be rendered ... it is purely a real time effect used to in game engine.

 CreativeCrash hosts a good shader for this which allows you to use multiple layers for MentalRay but unfortunately I couldn't use this because of the RenderFarm. It will no doubt cause some problems later down the line if I use this. Here it is anyway

One method would be to use the BlendColors node which is ok but it limits you to just 2 materials. If you want to use this method then you will have to create the BlendColors node, apply two different materials OR shaders and have a transparency map in the Blender slot. To apply this to your mesh you must first make a SurfaceShader node and connect the BlendColors to the OutputColor of the SurfaceShader and then assign that to the mesh.

Using the Layered Shader didn't work for me at the time but the Layered Texture node can be pretty useful. I didn't use this method because I thought you could only hook up a texture instead of a Blinn material (because of the name layered 'texture') But after some testing I have discovered you can infact put materials in the slots and each layer has its own Alpha channel. (really wish I found this out earlier)

So anyway this bring me to my last method and the one I went for. It's using a node called the mib_color_mix node found in the Data Conversion section of the MentalRay nodes. This is better explained here It is a great node for having a lot of control over your layers but I found it very frustrating to get the connections right as you can't just apply the mib_color_mix node to a mesh so you have to work around that. Here is a pretty good tutorial on it

I hope this has helped anyone who was in the same position as me. Please comment if you would like to add anything to this :)

No comments:

Post a Comment