Blender cannot bake procedurals without seams #92943

Closed
opened 2021-11-08 21:28:56 +01:00 by Walt · 27 comments

Blender cannot bake procedurals pointiness without seams
image.png
image.png

Blender cannot bake procedurals pointiness without seams ![image.png](https://archive.blender.org/developer/F11770219/image.png) ![image.png](https://archive.blender.org/developer/F11770223/image.png)
Author

Added subscriber: @waltage

Added subscriber: @waltage

Added subscriber: @Baardaap

Added subscriber: @Baardaap

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

It's a bit unclear what's going on. We can't see the whole node tree and you don't really explain what we're looking at. Also the node tree contains some loose ends which do nothing?

Here's some help in creating a useful bug report.
https://www.youtube.com/watch?v=JTD0OJq_rF4

I can bake a procedural without seams here without problems.

Just a guess:
Are you sure you didn't use UV coördinates for the vector input of the procedural texture? Because that will of course lead to seams.

It's a bit unclear what's going on. We can't see the whole node tree and you don't really explain what we're looking at. Also the node tree contains some loose ends which do nothing? Here's some help in creating a useful bug report. https://www.youtube.com/watch?v=JTD0OJq_rF4 I can bake a procedural without seams here without problems. Just a guess: Are you sure you didn't use UV coördinates for the vector input of the procedural texture? Because that will of course lead to seams.
Author

this is try to bake procedural without seams
cycles image.png

bake image.png
every other custom uv also baked with seams
decreasing or increasing detail, pixels, FXAA - help nothing

Seams2.blend

this is try to bake procedural without seams cycles ![image.png](https://archive.blender.org/developer/F11775798/image.png) bake ![image.png](https://archive.blender.org/developer/F11775785/image.png) every other custom uv also baked with seams decreasing or increasing detail, pixels, FXAA - help nothing [Seams2.blend](https://archive.blender.org/developer/F11775886/Seams2.blend)

Ok, I played a bit with your file, and I think what you're seeing is the limited resolution of the texture map. Afaik cycles doesn't bake 'across the seam'. i.e. cycles bakes only the pixels which are inside the polygon on the UV map. The border is then generated by just repeating these colors outwards. This is not perfect, it would give better results if it would actually bake the border pixels, though I'm not sure how to do that. And even if it would do that you'd still see a seam because of the different direction of the edges across the pixel grid.

I don't think this is really a bug. You need to be zoomed way in to see it. So much that each pixel of the texture image gets smeared out over at least 4-9 pixels in your render. Though it could probably be slighty improved (at the cost of a probably very complicated addition to the baking code) I think the main conclusion is just that your texture image resolution is too low for how close you are zoomed in.

Ok, I played a bit with your file, and I think what you're seeing is the limited resolution of the texture map. Afaik cycles doesn't bake 'across the seam'. i.e. cycles bakes only the pixels which are inside the polygon on the UV map. The border is then generated by just repeating these colors outwards. This is not perfect, it would give better results if it would actually bake the border pixels, though I'm not sure how to do that. And even if it would do that you'd still see a seam because of the different direction of the edges across the pixel grid. I don't think this is really a bug. You need to be zoomed *way* in to see it. So much that each pixel of the texture image gets smeared out over at least 4-9 pixels in your render. Though it could probably be slighty improved (at the cost of a probably very complicated addition to the baking code) I think the main conclusion is just that your texture image resolution is too low for how close you are zoomed in.
Author

it's 4096x map!
These Seams are very clearly visible even in UE
In fact, you confirm that the blender is not capable of baking without seams for production and I need to manually coat every seam of each texture?

it's 4096x map! These Seams are very clearly visible even in UE In fact, you confirm that the blender is not capable of baking without seams for production and I need to manually coat every seam of each texture?

I'm not really an expert in baking. So maybe I overlook something. But if I look at your example I only see the seams when extremely zoomed in? So much so that the interpolation between the pixels of your texture image starts to show up at the uv border. If I zoom out I don't really see it anymore. A map can be 4096x4096, but if only 100x100 of those pixels show up on screen they are rather smeared out.

But maybe I baked something different? I baked just diffuse color, without indirect light. Because that's the easiest to compare to the procedural. And you don't really tell what you baked.

By the way, I don't think the pointiness has anything to do with it. Just the noise gives the same result.

But as said, I'm not really an expert, just a user like you. Just trying to weed out the obvious stuff from the big backlog of bugreports to alleviate the workload of the people who know more. And trying to get people to make their bugreports complete enough. If my suggestions don't make sense, by all means show some examples (with explanations!), so it's clear to people with more expertise what's happening.

I'm not really an expert in baking. So maybe I overlook something. But if I look at your example I only see the seams when extremely zoomed in? So much so that the interpolation between the pixels of your texture image starts to show up at the uv border. If I zoom out I don't really see it anymore. A map can be 4096x4096, but if only 100x100 of those pixels show up on screen they are rather smeared out. But maybe I baked something different? I baked just diffuse color, without indirect light. Because that's the easiest to compare to the procedural. And you don't really tell what you baked. By the way, I don't think the pointiness has anything to do with it. Just the noise gives the same result. But as said, I'm not really an expert, just a user like you. Just trying to weed out the obvious stuff from the big backlog of bugreports to alleviate the workload of the people who know more. And trying to get people to make their bugreports complete enough. If my suggestions don't make sense, by all means show some examples (with explanations!), so it's clear to people with more expertise what's happening.
Author

image.png
render

image.png
bake

EVEN bake from Multires have seams
image.png

this is problem in EVERY bake from procedural.
Any feedback from Blender. or it's place for talking with "user like me"?
In this example, the seams are VERY noticeable.

I just want to make sure Blender can or can't bake for THE Production.
maybe I want a lot from Blender and not worth using it
Since the Texture Painter cannot work on the entire material at once, it is not profitable to cover the seams 4-5 times on one mesh. So I need to look for another software?

![image.png](https://archive.blender.org/developer/F11783734/image.png) render ![image.png](https://archive.blender.org/developer/F11783737/image.png) bake EVEN bake from Multires have seams ![image.png](https://archive.blender.org/developer/F11784431/image.png) this is problem in EVERY bake from procedural. Any feedback from Blender. or it's place for talking with "user like me"? In this example, the seams are VERY noticeable. I just want to make sure Blender can or can't bake for THE Production. maybe I want a lot from Blender and not worth using it Since the Texture Painter cannot work on the entire material at once, it is not profitable to cover the seams 4-5 times on one mesh. So I need to look for another software?

Added subscriber: @Chemere-Birkensleigh

Added subscriber: @Chemere-Birkensleigh

I'll leave the case open. Maybe someone with more knowledge of this topic can comment.

In the mean time the #support channel at https://blender.chat is a good place to ask around.

I just want to make one more remark here: Just posting images is not enough. You have to be very precise in describing how you got those images as well. If you want people to look at your bugreport you have to make it as easy as possible for them.

Preferably add simple steps to demonstrate the problem from the default startup. Or add the exact steps to reproduce the problem from your provided blend file.

there are a bazillion ways to bake stuff, you can't assume everybody will do the same thing as yourself.

I'll leave the case open. Maybe someone with more knowledge of this topic can comment. In the mean time the #support channel at https://blender.chat is a good place to ask around. I just want to make one more remark here: Just posting images is not enough. You have to be *very* precise in describing how you got those images as well. If you want people to look at your bugreport you have to make it as easy as possible for them. Preferably add simple steps to demonstrate the problem from the default startup. Or add the *exact* steps to reproduce the problem from your provided blend file. there are a bazillion ways to bake stuff, you can't assume everybody will do the same thing as yourself.

hello I had this same issue yesterday, today after a restart and a brand new blender scene there is no problem.
I still have the old broken file - I believe it became corrupt somehow.
I realise it's a lot of work but could you try applying the same process in fresh scene, if you haven't already.
And pray it doesn't happen again...

hello I had this same issue yesterday, today after a restart and a brand new blender scene there is no problem. I still have the old broken file - I believe it became corrupt somehow. I realise it's a lot of work but could you try applying the same process in fresh scene, if you haven't already. And pray it doesn't happen again...
Author

pls show me

pls show me

CubeMap.blend Broken File

[CubeMap.blend](https://archive.blender.org/developer/F11794911/CubeMap.blend) Broken File

CubeMap_working.blend Working file

[CubeMap_working.blend](https://archive.blender.org/developer/F11794918/CubeMap_working.blend) Working file
Author

In #92943#1252613, @Chemere-Birkensleigh wrote:
Working file

image.png
NO

> In #92943#1252613, @Chemere-Birkensleigh wrote: >Working file ![image.png](https://archive.blender.org/developer/F11796149/image.png) NO

Added subscriber: @Nikhil.Net

Added subscriber: @Nikhil.Net

@waltage you need to take a deep breath, relax, lose the attitude, and look at what folks like Baardaap have said above while trying to help you. Can you provide detailed steps of exactly what you did, given your blend file to do the bake? So far, you have not done so. Pictures without steps describing exactly how you got there won't help. If you can't provide detailed steps, it makes it very hard to help you and solve the bug.

You have also not provided any details which version of Blender you are using and on what OS. This is quite important.

@waltage you need to take a deep breath, relax, lose the attitude, and look at what folks like Baardaap have said above while trying to help you. Can you provide **detailed steps** of exactly what you did, given your blend file to do the bake? So far, you have not done so. Pictures without steps describing exactly how you got there won't help. If you can't provide detailed steps, it makes it very hard to help you and solve the bug. You have also not provided any details which version of Blender you are using and on what OS. This is quite important.
Author

In #92943#1253006, @Nikhil.Net wrote:
@waltage you need to take a deep breath, relax, lose the attitude, and look at what folks like Baardaap have said above while trying to help you. Can you provide detailed steps of exactly what you did, given your blend file to do the bake? So far, you have not done so. Pictures without steps describing exactly how you got there won't help. If you can't provide detailed steps, it makes it very hard to help you and solve the bug.

You have also not provided any details which version of Blender you are using and on what OS. This is quite important.

this is absolutely simple and clean situation

image.png render without seams

image.png bake with seams

Seams2.blend file

> In #92943#1253006, @Nikhil.Net wrote: > @waltage you need to take a deep breath, relax, lose the attitude, and look at what folks like Baardaap have said above while trying to help you. Can you provide **detailed steps** of exactly what you did, given your blend file to do the bake? So far, you have not done so. Pictures without steps describing exactly how you got there won't help. If you can't provide detailed steps, it makes it very hard to help you and solve the bug. > > You have also not provided any details which version of Blender you are using and on what OS. This is quite important. this is absolutely simple and clean situation ![image.png](https://archive.blender.org/developer/F11797296/image.png) render without seams ![image.png](https://archive.blender.org/developer/F11797297/image.png) bake with seams [Seams2.blend](https://archive.blender.org/developer/F11797281/Seams2.blend) file

If you set the interpolation to closest, you can see the texels are huge onscreen.
Screenshot from 2021-11-12 21-15-30.png

The seam is only visible if you zoom in quite closely.

What I think happens is that the margin pixels are generated by repeating, and not by copying from the adjoining face or rendering. This messes up the antialiasing/linear interpolation across the seam.
I'm afraid this is just a limitation of how the margin generation currently works. It could maybe be slightly improved by generating the margin in a different way. But this is more of a feature request and not really a bug. And even then there will still be seams if you zoom in closely enough, that's just a consequence of the limited resolution of an image texture.

If you set the interpolation to closest, you can see the texels are huge onscreen. ![Screenshot from 2021-11-12 21-15-30.png](https://archive.blender.org/developer/F11797387/Screenshot_from_2021-11-12_21-15-30.png) The seam is only visible if you zoom in quite closely. What I think happens is that the margin pixels are generated by repeating, and not by copying from the adjoining face or rendering. This messes up the antialiasing/linear interpolation across the seam. I'm afraid this is just a limitation of how the margin generation currently works. It could maybe be slightly improved by generating the margin in a different way. But this is more of a feature request and not really a bug. And even then there will still be seams if you zoom in closely enough, that's just a consequence of the limited resolution of an image texture.
Author

but it's bad for production. may be some filter on texture painter can solve it?

but it's bad for production. may be some filter on texture painter can solve it?

Update

Screenshot 2021-11-15 190804.jpg

Screenshot 2021-11-15 190503.jpg

This problem is in the viewport - these images are from the render view
It doesn't seem to like the hard edges...
When at least 3 levels of smoothing it looks fine though

Update ![Screenshot 2021-11-15 190804.jpg](https://archive.blender.org/developer/F11807606/Screenshot_2021-11-15_190804.jpg) ![Screenshot 2021-11-15 190503.jpg](https://archive.blender.org/developer/F11807605/Screenshot_2021-11-15_190503.jpg) This problem is in the viewport - these images are from the render view It doesn't seem to like the hard edges... When at least 3 levels of smoothing it looks fine though

@Chemere-Birkensleigh I'm not sure what you mean, I think you confuse the texture problem with hard edges due to normals? I think that's something different. Or maybe I just misunderstand your post.

Anyway, I did some experimenting during the weekend and hacked together a quick&dirty test program to generate the texture borders by copying from the adjacent polygon, and while it doesn't make the borders disappear, it does reduce them somewhat.

See the movie below, first the texture with repeated borders as generated by blender, and then my hacked together 'copied from next polygon' borders.

texturebordercopy.mp4

I created this by exporting the uv map from blender and then using an external cobbled together program to rewrite the borders.

Blender's texture:

test.png

And mine:
outtex.png
(note I completely ignore the corners for now)

It might be worth it to try and implement this into blenders border generation. But I'm not sure how much work that would be and if it would be worth it for such a marginal improvement.

By the way, in the special case where all the uv borders are aligned with the pixel grid, the border will disappear completely.

For now I'll claim this task and try to cook something up/talk it over with the other devs.
No guarantees whatsoever, because it might be a dead end, but the problem somewhat interests me.

textureborder-experiment.blend

@Chemere-Birkensleigh I'm not sure what you mean, I think you confuse the texture problem with hard edges due to normals? I think that's something different. Or maybe I just misunderstand your post. Anyway, I did some experimenting during the weekend and hacked together a quick&dirty test program to generate the texture borders by copying from the adjacent polygon, and while it doesn't make the borders disappear, it does reduce them somewhat. See the movie below, first the texture with repeated borders as generated by blender, and then my hacked together 'copied from next polygon' borders. [texturebordercopy.mp4](https://archive.blender.org/developer/F11823302/texturebordercopy.mp4) I created this by exporting the uv map from blender and then using an external cobbled together program to rewrite the borders. Blender's texture: ![test.png](https://archive.blender.org/developer/F11823324/test.png) And mine: ![outtex.png](https://archive.blender.org/developer/F11823338/outtex.png) (note I completely ignore the corners for now) It *might* be worth it to try and implement this into blenders border generation. But I'm not sure how much work that would be and if it would be worth it for such a marginal improvement. By the way, in the special case where all the uv borders are aligned with the pixel grid, the border will disappear completely. For now I'll claim this task and try to cook something up/talk it over with the other devs. No guarantees whatsoever, because it might be a dead end, but the problem somewhat interests me. [textureborder-experiment.blend](https://archive.blender.org/developer/F11823347/textureborder-experiment.blend)
Martijn Versteegh self-assigned this 2021-11-18 11:13:53 +01:00

looks promising \o/

what I meant was that the image does seem to be baking what I have in the view port - the harder the edges are the worse it gets. In other words I can see the mistakes prior to the bake. And perhaps that it's incorporating the 'handling' of the lighting into the bake.
It seemed to be a combination of things...

  • Hard edges and lighting
  • UV's being half a pixel off

On top of that - the longer I mess around with the scene, it becomes corrupt. Previous maps and UVs not clearing.

looks promising \o/ what I meant was that the image does seem to be baking what I have in the view port - the harder the edges are the worse it gets. In other words I can see the mistakes prior to the bake. And perhaps that it's incorporating the 'handling' of the lighting into the bake. It seemed to be a combination of things... - Hard edges and lighting - UV's being half a pixel off On top of that - the longer I mess around with the scene, it becomes corrupt. Previous maps and UVs not clearing.

Ah, now I see what you mean.

I still think that's a different problem, though. And I have no idea what's causing that.

But that's a different problem, outside the scope of my proposed improvement, so if you want any attention called to that you's have to open a new bugreport (or better yet, search if one already exists)

ps:
I created a topic on devtalk .

Ah, now I see what you mean. I still think that's a different problem, though. And I have no idea what's causing that. But that's a different problem, outside the scope of my proposed improvement, so if you want any attention called to that you's have to open a new bugreport (or better yet, search if one already exists) ps: I created a [topic on devtalk ](https://devtalk.blender.org/t/texture-border-margin-generation-by-copying-pixels-from-the-adjacent-polygon/21461).

Changed status from 'Needs User Info' to: 'Resolved'

Changed status from 'Needs User Info' to: 'Resolved'

With the landing of https://developer.blender.org/rB449db0ab1e34976f3936310b846ab38cc2d6467d (thanks Brecht for committing) I consider this as fixed as I can make it.

It's not perfect. But that's impossible.

With the landing of https://developer.blender.org/rB449db0ab1e34976f3936310b846ab38cc2d6467d (thanks Brecht for committing) I consider this as fixed as I can make it. It's not perfect. But that's impossible.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#92943
No description provided.