Jump to content
Sign in to follow this  
Pamela Galli

Why can I not bake textures in Blender any more?

Recommended Posts

I can no longer bake textures in Blender. First I discovered that when I tried to bake a brick texture to a mesh, as I had done many times before, including to this same mesh, the brick texture disappeared and was replaced by some AO texture,

 

Now I am trying to bake the eaves of a roof, but it is baking some other unselected mesh. I have clicked the X to unlink this texture from the mesh I am trying to bake. I have unlinked it in the outline. I have restarted Blender. I have opened many New Images but it will only bake to this one called plaster stucco something (which is not linked to either of the two materials). No matter what, Blender thinks I am baking some other mesh than the one I am baking.  

 

Screen shot 2012-07-17 at 4.30.01 PM.png

 

Does anyone have a clue?

 

Share this post


Link to post
Share on other sites

No, cycles are not on (you don't get a Bake option with cycles AFAIK). 

Sometimes this happens -- a UV gets linked to the wrong texture -- and I can unlink the texture from the mesh by hitting the X (on the texture in the UV texture window). This time, I can't. 

Share this post


Link to post
Share on other sites

I'm not sure and I have no clue at all about all the Blender options, so it's a long shot....

In one of your previous posts you had some problem baking fishgrate stones for a floor and you got some bad results. Masami anserwed that correctly I think by saying your UV map had overlapping pieces (or pieces outside the texture which, as he said, can result in the same thing).

It looks like something similair is happening here. Your UV map looks very odd, with lines with points that look like the side of certain faces, rather than a front view. I know in 3ds max you can get even the backside of faces on the UV map and they won't show unless you select the faces. Maybe something like this is what's happening.

Can you select the faces you want baked on the UV map and extract those from the mesh? Then bake? If what I am suggesting is true, that should fix the issue. You could take the trial and error approach and start with a single face, that can hardly go wrong. Then keep adding faces to your mesh and see where things get messed up.

EDIT I see you didn't understand Masami's answer, hopefully I can explain a bit. In that particular case, it's about the first of your two pictures, where the UV is bigger than the texture. The texture is not limited to that one square you see on screen, it is repeated infinitely in every direction. So if your UV faces leave the texture on the right side, they really enter on the left side. So if there are already faces on the left side of your UV map, the things will overlap and Blender doesn't know which of the two to bake.

UV overlap.png

What you did was the same as in the above picture, what Blender thinks you did is in the lower picture, it has no clue what to do with the coloured part.

Whatever it is, your UV map looks odd to say the least, I can't help you improving it though unfortunately.

  • Like 1

Share this post


Link to post
Share on other sites

What Kwakkelde said. The thin lines in your UV map are faces projected from the side. Their UV area size is zero, so they will neither bake nor render properly.

Also remember that linking and unlinking apply only to faces selected in the 3D view. The linkage of unselected faces will not change. This way it is possible to link parts of the mesh to different images. However, since the UV/image editor can display only one image at a time, there is poor visual feedback in case of multiple selected faces with mixed linkage, and it's easy to get confused or change links by accident.

Use "Select --> Similar --> Image" (Shift-G) to find all faces that link to the same image. This makes unlinking and re-linking a lot easier.

  • Like 1

Share this post


Link to post
Share on other sites

"it's easy to get confused"

That's an understatement! For me it's difficult to avoid confusion! It sounds like you understand this area well. If you could write a clear guide to handling and manipulating image-mesh association, I would be for ever grateful. :matte-motes-big-grin:

ETA - yes, those squished UV faces usually come from using Project from View while the are side-on in the 3D view. It is possible to pull them out in the UV window, but easier to make sure these faces are unselected when you use that projection.

Share this post


Link to post
Share on other sites


Drongle McMahon wrote:

If you could write a clear guide to handling and manipulating image-mesh association, I would be for ever grateful. :matte-motes-big-grin:

I would simply recommend to link face textures only temporarily, unlink them as soon as baking is done, and use proper materials for everything else.

Share this post


Link to post
Share on other sites

Again, no idea how Blender works as far as the oprions and buttons go, but this sounds confusing to me:)

 

What I do for baking is this:

Make sure only one material is present in your object to be baked, so only one texture

Make sure no duplicates are present, not only duplicate verts, but also duplicate objects, like several buttons on a shirt sharing UV space

Bake the textures

Then link everything together

(ofcourse also make sure the object is unwrapped properly, this seems to be OP's problem)

 

This seems pretty fool proof in my experience.

Share this post


Link to post
Share on other sites

Face textures are an unusual workflow feature that is specific to Blender. It's a quick way to assign one or more diffuse maps to all or parts of a mesh. Face textures serve as bake targets, and since they are independent of materials, they can be used to bake complex material assignments into a global texture atlas or several of those.

However, it is also possible to use face textures as a source for baking (instead of materials). For example, you can have one UV map linking to multiple small images serving as texture tiles, and another UV map linked to a large image serving as a bake target. As long as you are only dealing with diffuse maps, this is sufficient and allows you to get results without setting up any materials at all. However, it's easy to make mistakes there, such as flipping source and target UV maps, and then the bake will go in the opposite direction and overwrite the texture tiles with content taken from the target image. Good luck figuring out what happened if the target already contained a half-successful previous bake. ;)

That's why I would recommend using face textures only as targets, and only materials as sources. And as soon as a bake is successful, the result image should be unlinked, saved, and inserted into a material, where it is read-only and cannot be overwritten by accident.

  • Like 1

Share this post


Link to post
Share on other sites

I am on my way out of town, and will do a closer reading when I can, since it is clear there is a great deal I do not understand, but since I don't know the meaning of many of the terms, I can't understand much of the explanation.

I used Smart UV Project, as I do on many non-organic things, then rearranged a bit. Those thin strips actually are thin strips in the mesh.

I still have no clue why I could not bake but I did find a fix (should anyone else encounter this problem which evidently they do not): go delete the linked mesh in the object data tab and re-unwrap (re-unwrapping by itself did not work, I had to unlink the mesh completely). 

Share this post


Link to post
Share on other sites

When selecting faces to bake to a  seperate textures (with or without material assignments) it can be very helpful to assign your textures unique colors.  When you bake, these colors will be over-ridden, so just like a texture grid helps guide you in effectively scaling and aligning your uvs, the use of different colors give you a visual cue in the 3d edit window in TEXTURE view what faces are assigned to unique textures.  Any unassigned faces appear bright shadeless white. 

When assigning textures always work in Face Select mode and set your 3d edit window display to TEXTURE to get confirmation of  your texture assignments.  Note:  If you default to using the  black texture  or only one color in for your texture assignments,  you will not see the difference in your various assignment groupings.

As mentioned, the uv space can only show one texture at a time, it gets very confusing what you are actually looking at.  So don't use the UV space to confirm texture assignment.  However as you assign or remove texture assignments, you should only see those particular faces appear in the UV space.  Again, you may not actually see the texture you have assigned.  Don't be thrown off by this.  Look in the 3d edit window for confirmation.

To assign faces to a texture, select the faces you are assigning so they appear in the UV space and add/create a texture or pick one already created or imported from the drop down list in the UV edit window.  To change/remove  previous texture assignments, select the faces and click x to remove what is assigned and/or reassign a new texture or select from the drop down list.  Check what you have done in the 3d edit window to confirm the assignment is correct.  Ignore the texture in the UV window.

Here are some visuals:

1.png

Here I've begun assigning textures.  I've assigned a new green texture to the eyes. Note that this texture fails to appear in the UV space***.  Never fear,  the green appears on the eyes.  The texture is assigned properly.

2.png

 Now I've made my second texture assignment.  Note that suddenly the pink texture somewhat arbitrarily appears in the UV space.***

3.png

Now I have faces selected from two different texture assignments.  Both the eyes and faces appear on the UV screen but only one texture appears.  As long as you don't change the texture that appears or delete the texture everything remains correctly assigned to these two groups.  Check what you see in the 3d edit space for what is actually assigned.

 

4.png

Now I have the ears selected, but I have not yet added a texture to them. They appear to be sitting on the pink texture in UV space***, but they are shadeless bright white in the 3d edit texture view window.  There is no texture assigned to these faces.

5.png

Now I've gone ahead and assigned a texture to the ears that is blue. Again these colors are temporary and will be overwritten when you bake.  So you can see the ears have their own texture assignment, but in the UV space you still see the pink texture***.

6.png

Finally the last group of faces is assigned an orange texture.  Note the back of head bit still appears to be sitting on the pink texture if you look in the uv space***, however that is not what is actually assigned.

 Edited: I'd like to direct your attention to a subsequent post by Masami who points out the texture that appears in the UV space is controlled by the "actively" selected face which is the last face actively clicked on and selected that  then has a dotted appearance.   Thanks very much Masami!

Share this post


Link to post
Share on other sites

Thanks. A little light is shed. I still don't know why I can often only change the texture in object mode, and then have to pin it to get it baked to. I never understand when Blender decides to display what images in the uv edit window, and consequently can never control it, and it so often refuses to load the images I tell it to. Aaarrrgghhh!  I am still trying to avoid the temptation to look at the source code for the solutions. That way lie endless wasted days!

Share this post


Link to post
Share on other sites


Drongle McMahon wrote:

I never understand when Blender decides to display what images in the uv edit window, and consequently can never control it

The image displayed is the one linked to the active face (i.e. the face with the pixel dot pattern).

  • Like 3

Share this post


Link to post
Share on other sites

Thanks a gazillion, Masami.  The "active face" issue is the missing link for me.  The reason a texture didn't appear in my first example (the eyes) is because I most likely selected those parts via hovering over them and pressing the shortcut "L".  I didn't actively click-select any particular face so there were no active faces  - thus no image appeared in the UV space.  I must have then clicked in the "pink" region  creating an active face and for the remaining  texture selections I just used the shortcut "L" to select those areas which I previously isolated by edge marking. So the active face remained in the pink region.

This makes a big difference in the way I view how this works.  I appreciate the help.

Share this post


Link to post
Share on other sites

By the way, there is something else that may be useful if you work with colour-coded textures: Blender maintains two separate material lists, one per mesh ("Data") and one per mesh instance ("Object"). You can, for example, populate the "Data" slots with colour-coded materials, and the "Object" slots with the materials that you actually want to bake. If you create linked copies of the mesh object later (via Alt-D), you can re-assign the "Object" slots without without affecting the other instances, or change the colour coding for all instances at once by re-assigning the "Data" slots.

  • Like 1

Share this post


Link to post
Share on other sites

I feel better knowing even Drongle had trouble figuring out why Blender textures would not cooperate at times. I am hoping this info about active faces helps relieve a lot of frustration -- Masami I agree with whomever requested some kind of overview of these things you know about Blender texturing. I bet I am not the only one who stays perpetually confused.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...