x


Baking multiple textures for Unity models workflow?

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.


more ▼

asked Oct 12, 2011 at 08:48 AM

Pilot gravatar image

Pilot
402 31 26 35

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Huh, I found the answer to my own question!!

Here are the steps:

  1. Import your model into 3ds Max
  2. Select all the objects, righ click and turn them into Editable Polys
  3. Under the Modify tab, Attach the separate objects if necessary (multiple objects are ok though)
  4. Expand the Editable Poly stack and choose Faces
  5. 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)
  6. Prepare your UVs by either unwrapping (UVW Unwrap modifier) or any other way you choose
  7. 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
  8. When your texturing is fininshed, download this script: Detach by Material ID
  9. Open Layers at the top right of your screen, and make sure you have only 2 layers
  10. 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
  11. Select all of your layer 2 objects
  12. Run the Detach By Material script from the MAXSxript menu, or store it to the shelf for later use
  13. 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)
  14. 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
  15. Hide and hide from render all layer 2 objects except the first listed
  16. Click on the first object listed, right click and choose select
  17. Choose Render to Texture from the Render Menu
  18. 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)
  19. Repeat steps 12-16 until you have all of your object textures baked
  20. Export your model to Unity using the objects from layer 1

Done! Render to texture by material id !D

more ▼

answered Oct 12, 2011 at 03:48 PM

Pilot gravatar image

Pilot
402 31 26 35

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x542
x440
x61
x31

asked: Oct 12, 2011 at 08:48 AM

Seen: 2297 times

Last Updated: Oct 13, 2011 at 12:51 AM