I have a vehicle model ready for texturing which when brought to Unity, will have the textures assigned to different parts (wheels, windows, body etc) customizable by the user i.e users will be able to select their own window tinting, body color etc. Also, the model isn’t one complete mesh since components such as the wheels need to be separate for the vehicle physics and functionality setup later in Unity.
I’m using 3ds max (but am open to using other software if need be) for baking using render to texture. However there doesn’t seem to be an option for baking out each uv texture individually, but only one combined texture. To maximize the resolution/texture space of each individual element, the uv’s of every texture naturally overlap. Therefore rendering one combined map would change the resolution of some (if not all) off the elements. Also, using such a map when changing textures in Unity seems clumsy since for eg. if a user simply changes one wheel the map of the entire model would need to be loaded every time. Through my research I’ve found that apparently Maya has an option to bake out separate maps or one combined one, which is exactly what I would need. Not having Maya though, I haven’t tested this.
Is there a workflow people are using for baking multiple uv textures for use in Unity? Any suggestions appreciated.
Select all the objects, righ click and turn them into Editable Polys
Under the Modify tab, Attach the separate objects if necessary (multiple objects are ok though)
Expand the Editable Poly stack and choose Faces
Now assign material ids for all your polygons as required, one id for each material you will be needing (here is a tutorial detailing how to assign mat ids/create sub object materials)
Prepare your UVs by either unwrapping (UVW Unwrap modifier) or any other way you choose
Texture your model by applying your materials/shaders/textures to each sub material (see the video ---^ above for more information). UV overlap between sub materials is ok
Open Layers at the top right of your screen, and make sure you have only 2 layers
Place all of your objects into the first layer. Clone a copy of everything using the Edit menu. Place the copies under the second layer and then hide and hide from render everything in layer 1 using the icons on the right
Select all of your layer 2 objects
Run the Detach By Material script from the MAXSxript menu, or store it to the shelf for later use
When the script window opens, select Material Name under Naming and click the Detach button (this will split the geometry of your entire model by its material id)
Open Layers again (if not still open) and now you should see a new list under layer 2 of your objects named according to their Mat ID
Hide and hide from render all layer 2 objects except the first listed
Click on the first object listed, right click and choose select
Choose Render to Texture from the Render Menu
Set your options and click the Render button to bake out your texture (for more information on the Render to Texture dialogue/options, see this tutorial)
Repeat steps 12-16 until you have all of your object textures baked
Export your model to Unity using the objects from layer 1