Is there any way to simply export nomal maps from maya to unity?


Is there a simple way to export normal maps from maya material to unity? Some time ago, I had written some script in maya to store normal map names in user variables. then in unity material post processor read that data and assign it to material. Is there any simple way to do this?

Thanks in advance.

No, I don't think there is a better way. I would do the same thing: either base it on user defined properties, or base it plain on material name and do everything in AssetPostprocessor.

At the moment Unity imports only material name, diffuse texture, and diffuse color. So for the rest you have to do some tricks...

Select the entire model, then assign a material (blinn, lambert, etc) to it. Assign your texture images for color, bumpmap, etc... to the material, then set up your lighting in the scene. Test render to make sure everything is how you want it, then select the model and the material together. Click the Edit button for the Hypershade window, then select the Convert to File Texture option box. Make sure that Bake shading and Bake shadows are turned on, then click Convert. It'll take a bit depending on your CPU, as it has to render the scene to bake the new texture file.

Of course you have to do a proper UV Layout before, which means, there must be no overlapping UVs, a ll Uvs in the upper right quater is recommended.

Or try to search for "baking texture in maya" on google.

Hope this helps.