(This is in Blender 2.8) I have an object using 3 materials/UVs and would like to map them into one image so I can easily use image in Unity. Anytime I try to follow a tutorial, they say to make a new UV image, then to Smart UV Project... Some steps in between, then finally, bake the image to that new UV image you made. But when I do it, my other materials get wiped with the textures on my model, and my new UV image is empty.

1 Smart UV Mapped object with the new UV Map

2 Make A UV map of the combined uvs and material

3 Bake the textures to the UV map

4 What I get

5 This is what I want. I have followed many tutorials to get a result like this, but I was unsuccessful, I don't understand this, I don't have many hours in Blender. If I can get the result I want, an explanation of what I'm doing wrong would really help.

  • $\begingroup$ If more information is needed I'll supply whatever is needed to assist my question. $\endgroup$ – Zyphery Aug 27 '19 at 7:47
  • $\begingroup$ Hi and welcome. What is your node setting? $\endgroup$ – lemon Aug 27 '19 at 10:42
  • $\begingroup$ Hello, What do you mean by node setting? $\endgroup$ – Zyphery Aug 27 '19 at 16:01
  • $\begingroup$ Node setting: material setting. If you want to bake, the mesh may have a material on it. See what I mean or new to all that? $\endgroup$ – lemon Aug 27 '19 at 16:06
  • 1
    $\begingroup$ I suddenly realize my last comment could be interpreted as not so nice. Please forgive it: just wanted to know the level of details you may need as an answer. $\endgroup$ – lemon Aug 27 '19 at 16:59

Using 2.8 and Cycles rendering here is a simple case that should correspond to your context:

An object with 3 materials with its own UV map (eventually several):

enter image description here

Each material here has its own associated mesh faces and the material look like this:

enter image description here

The node setting could be more complex, but that does not matter and I presume this part is already set up in your context.

Now we prepare the target on which we will bake:

enter image description here

Duplicate your object.

Remove the existing materials (these materials are from the original and we don't want it for the target). Use the '-' button to remove the materials.

Add a new material: use the '+' button and create a new one.

Create a new blank image, name it target and save it to disk (for some reason the bake won't work or not always if not saved, maybe because the image is considered as generated).

Create the UV map for this object: remove existing one (they are from the original mesh) and create a new one with the mean you need (smart uv project can work).

Prepare the node setting as show in the lower left part of the image above.

In particular, we need the UV map input and the image texture (with the target texture). You can already connect this texture to the shader. That will produce a warning when we'll bake but this is of no consequences in our context.

Once all this is prepared, place the two objects at the exact same location (and rotation, etc.) so that they overlap exactly.

Select the original and shift select the target. That could be a bit tricky as they overlap but pay attention to do it in this order: select one until the original is selected then shift select to have the target as selected active object.

Now we can bake:

Go to the bake section of Cycles settings:

enter image description here

I presume you want to have the original texture 'pure' colors with no shading (lights, shadows) effects. So choose 'diffuse' as bake type and choose 'color' as influence.

Choose 'selected to active' (all selected object will contribute to bake to the active one).

Choose 'clear image' (erase the image at the beginning of the bake).

Click the 'bake' button.

Here is the blend file so that you can check things. Textures are packed in it but you may need to save the target image to disk as said before.

Note: the target shader may fail to update automatically once the bake is done. Simply manually reactivate the node texture output to correct that.

  • 1
    $\begingroup$ This got exactly what I was asking for thank you so much, though the results are a bit weird, I will mess with it some more to see if I can figure it out myself, Thanks!!! $\endgroup$ – Zyphery Aug 28 '19 at 23:08
  • $\begingroup$ Why must the source and targets be overlayed exactly ontop of each other ? $\endgroup$ – angryITguy Apr 29 '20 at 4:06
  • 2
    $\begingroup$ @angryITguy, objects does not always have the same geometry, orientation, scale, etc. Blender can not guess how to make them match. The bake processes by projecting (raycasting) from the source normals (or around it) to the target so if they don't overlap or correspond these projections won't hit the target. $\endgroup$ – lemon Apr 29 '20 at 8:31
  • 1
    $\begingroup$ Great answer. For a bit more complex object, Ray Distance may have to be >0 even when source and target have exactly the same shape. $\endgroup$ – cppBeginner Jun 16 '20 at 4:09
  • 2
    $\begingroup$ Blender 2.9 - need to select target first, then original. $\endgroup$ – Ashen One Jun 23 '20 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.