0
$\begingroup$

As many people before me, I'm trying to bake a terrain texture from a Blender material for Unity, and hence not illuminated by light in the scene.

I noticed a ton of forum posts by people with similar issues, but not one of the proposed solutions worked for me. I tried piping the colour output through an emissions shader instead of the principled bdsf shader and baking as the "emit" type, but to no avail... still black. I tried a glossy bake type... black. I recalculated normals, double-checked UV map, duplicated and replaced original mesh for good measure... stubbornly black. I'm trying to do it the emission shader way, so obstruction by other objects isn't the problem.

I'm stuck, and all the internet fixes are failing.

My file:


Edit:
It looks like the emission shader doesn't emit anything in the render view, which I imagine would make the bake always black. Time to investigate that!

$\endgroup$
4
  • 1
    $\begingroup$ Textures are not included in your file.. you should upload it again with textures packed in. Also can you confirm you want to bake to the texture named "terrain"? Why "from instancer" is checked in the uv map node? $\endgroup$ – lemon Dec 27 '20 at 8:31
  • $\begingroup$ @lemon Thanks for pointing out the texture issue; I'd never packed textures before. I think it's set up correctly now. I had assumed that "from instancer" referred to the UV map associated with whatever mesh the material was applying to, but maybe not? I went ahead and manually selected the terrain's UV map just in case. $\endgroup$ – Astral Winter Dec 27 '20 at 16:26
  • $\begingroup$ It seems to work well. As your material is emissive, just choose "emit" in the bake settings. $\endgroup$ – lemon Dec 27 '20 at 17:08
  • $\begingroup$ Hmm, it still isn't working for me! I wonder if we're doing it differently somehow? I have "emit" selected in bake settings and everything, but it just creates a new black texture every time. I think I'll open a new project to see if I can get it working in a really simple case. $\endgroup$ – Astral Winter Dec 27 '20 at 18:15
0
$\begingroup$

Ok, it turns out that a node group that I appended from Poliigon ("Poliigon Colour Variation") somehow breaks the baking process. I'm not really sure how, since I thought the group was meant to be a black box that takes colour in and pipes colour back out, but it might be useful for others to know. Here's a screenshot of the meddling node group:

enter image description here

$\endgroup$

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.