Hello - I'll preface this that I'm very new to 3DS Max and working in 3D in general. Materials, UV Maps, meshes, all relatively new concepts to me. One thing that I've been really trying to puzzle through is how to combine several textures once they are mapped on the right part of the model.
Here's my current 3DS Max to Unity workflow:
- Create simple non-animated model, create materials for each piece of the model, map each material to the model using UVW Maps.
- Convert Model to Mesh
- Attach all pieces of Model to one object, combine materials in the process.
- Export model via FBX
Once the model is in Unity, it looks fine, sometimes I might have to reapply a material, but in general, it's pretty good. Each part of my Multi/Sub-Object material show up as separate materials in Unity.
I'm working in the iPhone version of Unity, and the documentation explicitly states my models should only have one material if possible to help performance; I'm just not sure how to get the various materials on my model into one material in my workflow. Do I have to create one UV Map for my entire model? Is there an easy way to merge all the materials in a Multi/Sub-Object Material?
Any help from more experienced 3DS Max/Unity users would be fantastic.
In case this clarifies the issue for anyone. Below is a screenshot of my model in Unity. The 7 textures on this model are generating 15+ draw calls. If anyone could point me in a direction on how to reduce this one material that would be enormously helpful.
You should learn to use a few things. Yes you are right starting with multisubobject sometimes it is easier to create interesting surfaces with multiple materials using tiling etc .
(If your model is simple like a house with four walls and a roof you could directly work on an unwrapped surface with unwrap uvw modifier and photoshop but if it is more complicated you should work with a texture paint tool or multisub- object as you did, )
BUT BUT now that you have a multisub-object
You have to apply an 'unwrap UVW modifier' create a 2nd texture channel on top of your 'uv maped' multisuboject mesh. This should include all you models UVs in one square (one image).
The way you unwrap should be propotional for all surfaces but keep in mind that some places of your model could be more interesting and some others might be perfect to just assign them in one pixel. Nevertheless it will require some time to perfect that technique.
Then you have to bake the textures in one. Go to 'render to texture' and select your newly created 2nd mapping channel and then add a Complete map (or a Diffuse map and lighting map etc if you want to compose them in photoshop.)
After that you have your texture that includes everything and you have to make it the only material assigned to your mesh. Create a new material and add your new texture to diffuse or self illumination and make your unwrap modifier to point to the 1st mapping channel.
Right click your model and collapse the stack (before you do that you might want to make a backup of your unbaked model so you can further modify it if you don't like the final result... always save an unbaked file for further editing). Assign your material to your mesh and go to the channel info tool. Delete every other channel except the channel 1. And you are ready.
For further enhancing your work look at how to create atlas maps and how to use the external lightmapping tool too. (And possibly if you can afford it use digital sculpting with Zbrush or mudbox ) a handy plugin for photoshop called xnormals is very useful for dilating textures.
It is a bit complicated but in all 3d applications is a bit of a tricky task.
Since this question is very popular, here's a step-by-step method of baking your textures in 3DS Max and then correctly importing into Unity 3D.
- Create your model and texture it in 3D Studio. Your model should be fully textured. If you want to bake in lighting, lit before you start the rest of these steps.
- Go to "Rendering -> Render Texture" in 3DS Max (or hit 0.)
- Make sure the item is selected in 3DS Max, it should appear under the "Objects to Bake List."
- Under "Output" pick where you want to export your file. Make sure "Rendered Frame Window" is checked so you can see what your texture looks like when it is created.
- Now scroll down to "Output" You need to click the "Add" button at the bottom of the list.
If you know a lot about 3D, pick the texture type you want to create. If you know nothing about 3D like me, and just want flat colors, pick the "Diffuse" option. This should add the map to the output list above.
- Click on the "..." after "File Name and Type" Use maximum quality PNG as your save format.
- Select Black for your Element Background, and pick a texture size that you think is high enough. If you are creating an iPhone game, do not make a texture bigger than 1024x1024. For my run-of-the-mill objects I use 256x256 which is fine unless the player gets very close to the object.
- If you want Lighting or Shadows on your texture, check those off. I leave that up to Unity since most of my 3D objects are not static, so I don't check those.
- The rest of the settings I leave as-is. Click the "Render" button in the bottom left of the box. If all went well, you should now see a flat texture of your model pop up on the screen.
- Now close the render to texture screen and open your Materials Window (M). Select an empty material and click the gray button next to Diffuse. Select "Bitmap" and then find the baked texture. You should now see your baked texture on the material. Now back to your model...
- There will be a new Modifier on your model. It's called Automatic Flatten UVs. Change the Map Channel on this to 1. Then collapse this to your mesh. You can make sure the map is correct by unwrapping the UVW Map with the Unwrap UVW Map modifier. The map should comply to the baked texture.
- Now drag your imported texture to your Model's Map Channel 1. Do a test render, and the model should now appear correctly with texture.
- Export this model as FBX, and import it into Unity. Everything should now be in place!
Also, if you can afford the $380. 3d-io makes a great plugin called Flatiron that streamlines this whole process. You can bake an entire scene into 1 UV texture...nice. (i am not affiliated with them, I just like the plugin)
What do you mean by "Attach all pieces of Model to one object"? Can you please be more specific?
Just out of curiosity, but wouldn’t this approach give you a large number of textures? Say I am working with, in the end, hundreds of individual components that all have several moving parts on them, like switches and knobs. The switches are pretty universal throughout the large list of components, so I make a texture that all these switches share. I make texture maps for the individual components, incorporating several of them onto one texture, so that maybe 4+ objects share a single texture/material. In the end, I would have only maybe 30-50 textures, but baking them all would leave me with well over a hundred.
This is very useful information, but I’m just curious if it’s more of a case by case basis to use this work flow. Or am I overlooking something? Not trying to step on any toes, I am genuinely curious and am constantly looking to learn better ways to improve my work flow.
pls answer this question in simple meaning what the hell is prefabs ??? meshesssss script what the helll/??? i just want to know how to import it right i mean i did put it in the asset folder (the model) i clicked on the add model but something is strange the model is grey no texture how to fix this pls !!! and when i start clicking on the land to put the model nothing showed up