Well, thats not entirely true. Yes Maya is dumb when it comes to baking, but if you aren’t afraid of a little mel script, then you can get the job done quite easily. Here is part of a larger script I wrote:
============================================
// Create bake set
string $bakeSet = createNode "textureBakeSet" -n "myBakeSet";
setAttr ($bakeSet + “.colorMode”) 0;
setAttr -type “string” ($bakeSet + “.prefix”) (“BAKEDTEXTURE_” + $name);
setAttr ($bakeSet + “.xResolution”) 2048;
setAttr ($bakeSet + “.yResolution”) 2048;
setAttr ($bakeSet + “.fileFormat”) 6;
setAttr ($bakeSet + “.bakeToOneMap”) 1;
setAttr ($bakeSet + “.fillTextureSeams”) 4;
setAttr ($bakeSet + “.overrideUvSet”) 1;
setAttr -type “string” ($bakeSet + “.uvSetName”) “bakedUVs”;
// Perform Bake
string $lightMap = "convertLightmap -sh -bo “+$bakeSet+” -ulb "+$shaders;
string $result[ ] = eval($lightMap);
============================================
Basically you make your own bake set, then run the “convertLightmap” command. This is essentially what the mental ray batch bake is doing, but if you do it manually u have a bit more control.
The trick to get Maya to bake all your shaders in one go is to supply that command with all the shading groups on your mesh. So say you have blinn1 blinn2 and blinn3 assigned to your mesh, which is named mesh1. In order for it to bake all of them, the convertLightmap command would look something like this:
convertLightmap -bo $bakeSet -sh blinn1SG mesh1 blinn2SG mesh1 blinn3SG mesh1;
Where $bakeSet is a bakeset you already have somewhere. Each shading group needs to be followed by the name of the mesh, even if u only have 1 mesh. Kinda stupid, but whatever.
That will get maya to render them all together for you, but the really dumb part comes when you have multiple shaders assigned to your mesh, and you want to bake final gather. For some reason you cannot render them all in one pass, it will sit there and recalculate the final gather points, and rerender your mesh, for each shader you have on the mesh. If it takes 20 min to render 1 shader, and you have 20 shaders, it accumulates in time dramatically.
Hope this helps, any questions just ask.