Hi, I just added a new texture to my model, but there are weird black or white lines along where the seams are marked. I thought it may be the size of the UV islands, but they won’t line up evenly with the texture when scaled. Any ideas?
I’m not sure how to pack them into the file, so just delete the old texture in the Image Texture node, then select all three of these and import them into it instead.
Sorry about that.
This happens because Blender’s baking system isn’t designed to work well with denoising, the bake’s margin doesn’t take into account the blurring that happens as part of the denoising.
There are 2 possible solutions:
Bake with enough samples you don’t need denoising.
Turn the denoiser off during the bake, then do it later as a separate step. This is a bit more complicated. You will have to:
1- Open a new scene.
2- Import the noisy texture in the compositor as an image.
3- Pass the texture through a denoise node.
4- Set the scene’s color management to standard so the texture isn’t altered in the process.
5- Render and save the result.
I hadn’t baked the texture yet, and when I do it turns black. I set the bake type to emit, and then tried glossy, but got the same black result on both. Thanks for the help though @etn249.
If you want to bake an emit texture, the material needs to have some emission, or else there is nothing to bake. If you want to bake glossy, the material needs to have at least some gloss.
Also, the textures you have uploaded do in fact have the problem I explained, so if you intended to use those for further baking, that’s going to be a problem.
So I’m not sure the exact technical reasons behind this (there’s a chance there’s a setting somewhere that would fix it instantly while destroying your render times by increasing the precision of the texture reading no matter the distance) but this is caused by a too-narrow bleed of the textures around the UV islands. This is something that increases the further back your camera is from an object, but it’s going to happen no matter what–the edge of every UV island is rendered a little imprecisely (as a function of wrapping a 2D image around a 3D form and taking a 2D picture of it) so Blender is blending in that pale pink background to the pixels you want to see as it samples the texture at a lower resolution for rendering.
It’s fixed by just expanding the borders of the painted areas. (Screenshot shows the pale border disappears where I’ve painted over the top edge of the nose island.)
You can change the bleed value so your painting in the 3D viewport does the overflow automatically. I try to go for as high as I can, aka half the distance between your two closest islands, though it occasionally leads to a glitch on an extra sharp corner–try 12 px instead of 2 px and see if that’s enough.
I haven’t used a lot of external texturing software, but when transparency isn’t important I know Substance Painter has “infinite dilation” as an option when baking its textures specifically to avoid having to guess how far out the bleed’s minimum should be. (Which basically means it repeats the edge pixels outward from the islands until they encounter another island’s repeated edge pixel.) That’s kind of the ideal situation you’re working toward with your final textures but of course it makes it harder to see where the island edges are for when you’re painting in 2D, so you could incorporate filling the background as a finishing step instead.
And when you’re zoomed in enough that you actually see that dark line instead of a light one that is the background–I’m pretty sure that’s just the actual dark line that is on the painted texture. Something didn’t blend properly sometime, it looks like either a antialias-paintbucket interaction or compression artifact increasing contrast between the cat color and the background color before the original color became the bleed maybe? But it should be something you can paint out on the torso island.
Ooh this was information I was about to realize I didn’t know with my own projects this week! Thanks for the excuse for less time-pressed research.
Assuming you’ve done baking before (so you know to make sure the thing you’re baking is plugged in directly to the Surface output before baking it as Emission and all) – make sure the image you’re baking to is set up for the UDIM tiles, too. You generate the new image texture to bake to with the size you want the first tile, clicking “tiled” on the bottom of the popup, and then going to edit that texture in an Image Editor window and adding new tiles (with their own dimensions) in the N sidebar:
The “margin” in the bake settings will do the bleed for you in this case, default of 16 px. And you just have to save the image, which will look like this format to automatically fill in those UDIM numbers to be read back to the right tiles:
And lo! A very dark but not black cat (as long as you go back to material preview where there’s some lighting built in).
I just realized…these black lines occurred when I imported my texture into Krita for editing. It was Krita all along, and I was blaming Blender!
Thanks again for the help @cjgladback!