Cycles Baking Artifacts and Long Baking Times

Hey guys!

I just started using the baking feature in cycles, but for the life of me I can’t get it to work “acceptably”. I’m trying to bake a high poly mech to a low poly one.

So first of all I bake a normal map, using the GPU. All works well:

Then I bake AO map and a combined. Note that I’m only doing some testing and the lightning isn’t uniform, hence the difference in lightning.


Since it seems GPU only works for the normal map (trying to use it with AO or any other type simply gives me a black image) CPU is used for these guys. As you can see there are extreme artifacts all around, probably most noticeable in the glossy map I baked:

This seems to only be in effect during the CPU rendering, since the normal map is fine. Moreover the amount of samples is not the issue (tried some bakes with ~500 samples). Lastly the CPU bakes seem to take an extremely long time - a 2048x2048 texture, using 20 samples, can take about 30 minutes and some of the higher ones hours. And still they create these horribly flawed results.

So I came to the conclusion that I’m either approaching this issue in the wrong way, or something weird is going on with blender. I should point out that I have tried different UVs for my low poly mech, figuring that that might be the issue, but every attempt gives me the same result.

So, any ideas what might be going on here? Been searching around and haven’t been able to find anything that can fix my issues.

Regards
Marcus

So I came to the conclusion that I’m either approaching this issue in the wrong way, or something weird is going on with blender.
Or something to do with your model, which we know nothing about. Create a simple demo file that shows the same effect you are getting and post a link to it. Also include all appropriate textures and render settings etc

Hey!

Yeah, Sadly I’m not allowed to share the current project. I did a quick test setup that shows the same problem:
http://www.megafileupload.com/epdY/test.blend

…no need to bake, got the finished result here:

Seems like it happens whenever the high poly material has something attached to the displacement input (@material output node), if I remove it it works just fine. Guessing that it’s not possible to have the displacement plugged in when baking with CPU.

In the test scene baking the AO using CPU results in that horrible result shown in the image above, but using the GPU baking the same scene results in a “correct” image:

So basically: the test scene gives correct output when using GPU, but not when using CPU in this case.

Furthermore, trying to bake “combined” using GPU results in a fully black image, while baking “combined” using CPU results in the following image, once again with the massive artifacts mentioned above:
https://gyazo.com/f7bc9f69271c5529e0ee026607a98f6a (“combined”, with displacement @ high poly material)
https://gyazo.com/f621157b0601aecc4152377c92db4bdd (“combined”, without displacement @ high poly material)

So I’m guessing either this is a bug or my CPU is past it’s prime (it’s an i5-2500k).

Lastly, is GPU not supposed to work with “combined” etc? Trying to bake using the scene included above results in something that’s all black:

compared to CPU result (no displacement):

Thanks for the help!
//Marcus

So, your link https://gyazo.com/d5ceda633f96dcce8f770a6b134d0919 shows what? AO being baked from high poly to low?

While Cycles AO is, well… after i bake in Cycles just nm an Diffuse (there is nothing i could use as some “glossy” information, no glossy in high poly obj material at all, no texture modulating roughness or something so that i wouldn’t be worried seeing black render) using GPU (which, to be honest, looks like a placebo sometimes - my even more ancient CPU than yours would be faster on a lot of occasions; gtx750 here) i get this in Blender Game.

Your low poly is aimed at game, isn’t it?

Indeed, from high poly to low. I managed to find out why the same bake works for GPU and not CPU - GPU seems to ignore the displacement input of the material totally, see here, normal map bake from high poly to low:

https://gyazo.com/c7f3636bbd58bec42f0f8f50bd5d4a4c (with GPU)
https://gyazo.com/4e56f350ad727b754d3298fac350fc29 (with CPU, same bake)

A lot of artifacts in the second image, but can clearly see the “real” displacement at the bottom. So basically I’m not able to:

  1. Bake combined, diffuse, and others with GPU, only shows a black image
  2. GPU baking ignores displacement
  3. Baking when one or more of the materials have a displacement gives artifacts (with CPU)

So these are generic problems for me, seem to stay in place no matter what settings I put in, so I’m really confused, especially since you managed to avoid artifacts with the test file.

So did I understand correctly that all points 1-3 above should be working? Perhaps I should try a clean install of Blender etc, seems like something’s awry here. Cause I assume you didn’t change any of the baking settings in the test file?

Thanks for the help!

//Marcus

Thanks a lot for the help eppo!

I randomly chose “window” as texture coordinate @material in the test program, which of course would work fine in a render, but didn’t think twice about it before I used it for baking. Changing from window to other options made both the test file and my real project bake correctly, so case solved :slight_smile: