Baking An Object From High Poly to Image

I’m trying to make a texture atlas for a pine tree. I’ve got my high poly object floating on top of the plane that’s meant to represent my image. It seems fairly straightforward. I unwrap my plane, apply a material to my plane, add an image to it, switch to Cycles, select my bake type, check Selected To Active, bam bam bam, done. The tutorials make it seem so easy.

…yet I can’t get it to work. I’ve even tried UV projecting from view for the high poly object, then hitting bake, yet all it’s done is give me a dark grey, vague silhouette of my HP object, not the diffuse I’m wanting.

Most of the tutorials I’ve seen involve going from a high poly to a low poly cage that shares roughly the same plane, which isn’t quite what I’m doing. I figured the principles are about the same, but…nope. can’t get it to work.

How would you go about projecting a 2D view of a 3D object onto a plane to use as a texture elsewhere?

It probably would help if you show example mesh and example bake of how it went and what’s wrong with it. I’m not quite sure what doesn’t work since the procedure you outlined is correct.

Note that to bake diffuse color and exclude shadows uncheck Direct and Indirect in Diffuse pass baking settings (or bake Emit instead).

Also make sure to check ray distance is enough for rays to catch the highpoly object when baking.

1 Like

Just tried that. Still giving me the same non-results.

I think this is one of those situations where uploading my .blend file will do more to illustrate my problem. It’s probably some little thing I’m not doing that no one will think of unless they’re looking right at it.

Here it is.

Hey, I got it. For some reason, my ray distance was set to 0. I’m now baking out my images!

…though now I have an issue where my baked texture doesn’t produce my image on a transparent background. It’s always black, despite the fact that I clearly tell it to render the alpha when setting up the image.

For some reason Diffuse bake in 2.80 fails to work when Subsurface value in Principled shader is set to above 0. So for me it didn’t work for some time for Pine Needle material if baking Diffuse pass, but worked fine with Emit pass. I changed Subsurface to 0 in shader settings and bake worked.

Note also Margin value in Bake settings is set too high. With 16 pixels it creates border of 16 pixels around each tiny needle and creates a huge blob of color. This case is one of those when you want your Margin to be as lowest as possible, at least enough to have some space between the needles.

It was baking with alpha fine for me here, it is probably the matter of unchecked Clear in the Bake settings in your case. Enable it and bake will rewrite whole image each time, writing alpha each time. Just a guess though.

I’d strongly advise also to upload files on any storage other than one allowing only one download. The link is dead already and no one would be able to download it if it’s needed at any point.

Yeah, I need to find a better place to host my larger files. I miss Dropbox so much.

I know about the excessive margins and whatnot. Once I was able to get it to bake out an image, I went in, and cleaned everything up. I’ve almost got a usable texture out of it.

…almost being the key word here. Like I said above, it’s just not rendering out the image on a transparent background. It’s always jet black, which keeps me from baking out my AO. Once I figure out why that’s not cooperating with me, I think I’m well on my way.

edit: weird and odd. I just created a blank image in Affinity Photo with a transparent background, saved it as a .png, and loaded it as my image instead of letting Blender generate one for me. It maintained the alpha.

Why is Blender creating a black background, even when I tell it not to?

From the quick look you will see alpha channel in the Blender baked image under following circumstances:

  1. you enabled Alpha channel in the image settings while creating it
  2. Clear option was enabled to make Blender overwrite any information on the blank parts of the image with alpha
  3. Image editor is set to show alpha channel

about files - you can use Google drive or Box.com or Pasteall (latter only for blend files though).

1 Like

Well-p, just when I thought I had this all figured out, I get thrown another curveball.

For some odd reason, my pine needles show up as flat black when trying to AO bake. One thing I have noticed is that I was left with a number of purple edges on my needles after applying the solidify modifier, which I’d never seen before. That’s about the only thing I can think of that may be causing an issue here.

Well, hey. Easy solution. Just had to recalculate the normals on my needles.

Dunno why I didn’t think of that before, but I thought of it now, and now it works.

Thanks for the help. :smiley:

Those purple edges are edges marked as either seams or sharp ones (depending on the theme setup). Glad to see you’ve figured it out, nice branch! though it looks like spruce branch for me.

1 Like

It’s definitely a conifer of some kind, I know that much.

What’s funny is how I figured out how those edges were marked as sharp. Apparently the colors have been chanced slightly between 2.79 and 2.8, because doing a search for “blender purple edges” would net me nothing. I had to google up “blender edge colors”, and go down the list to find out that those are sharp edges, and the reason why I couldn’t find anything on them during my initial searches was because they’re usually pink, not purple.

But hey, I know now, so it’s all good.