For atlassing, there are really two basic approaches.
quilting
One way is to create the atlas out of your existing textures. Essentially you’d have these steps:
Normalize all the UVs on each object
scale them down by some fraction based on the total number of objects to atlas – it’s probably easiest just to take the square root of the number of atlassed objects, so for example 9 objects would give you a factor of 3, so you’d scale down all the UV values on the atlassed objects by one third
Offset the UVs so each scaled-down set has an appropriate “zero”. In the case of a nine-way atlas you’d offset your UVs by (0,0), (.33, 0), (.66, 0), (0,. 33), (.33, .33), (.66, .33), (0, .66), (.33, .66), (.66, .66)
make a photoshop atlas to combine your textures in the same order
baking
In this version you’ll use Maya’s texture baking to create the atlass for you.
you copy all your objects
merge them into a single mesh
Auto-layout the UVs as appropriate. In this version you will get some wierd layouts but the overall efficiency is usually higher than using squares
Use the surfaceSampler command to bake the textures from the original objects onto the new combined object
This method does more elaborate packing but can get messed up by details of how your UVs are layed out. It is a good project to use for learning.
As for file paths, you should be able to provide absolute paths for all of the maya commands – the UI often messes with your paths, especially on Windows, but if you tell it exactly where you want things to go it should be OK.
In any case you can always figure out if a path exists with
I almost made it work. But depending on the number of materials of my source mesh, it won’t work.
I don’t know why though
EDIT :
For the one who wants to create a texture with diffuse + alpha using the surfaceSampler, you have to use a tuple for each (or most) keywords argument in the surfaceSampler.
Something like this: