Regression: baking multi texture targets on single object is broken (adjacent faces option, Extend is fine) #109057

Closed
opened 2023-06-16 17:26:42 +02:00 by Ian Pretorius · 3 comments

System Information
Operating system: Windows 11 Pro , 22H2 , 22621.1848
Graphics card: NVIDIA GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 536.23

Blender Version
Broken: version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash: e1ccd9d4a1d3
Worked: version 3.0.1
Short description of error
baking error , when baking an object with 3 materials and two different bake target textures , strange artifacts from the one bake target texture are created in the other bake target texture

Exact steps for others to reproduce the error

blend file has two objects , named : "obj_1" and "obj_2"
blend file has 3 materials , named : "mat_1" , "mat_2" , "mat_3"

obj_1 only has one material slot , using mat_1
obj_2 has 3 materials slots using all three

both objects have two uv slots. The second is named "bake" and is selected.

the blend file has two generated textures, named : "bake_target_raw1" and "bake_target_raw2"

mat_1 has a bake target tex node and its image name link is set to bake_target_raw1

both mat_2 and mat_3 have tex nodes and they point to bake_target_raw2

So the scene is set up and ready for baking , clear image , is set to false and samples are very low for quick testing.

Select obj_1 and bake. You will see the result in the uv/image editor window , currently displaying bake_target_raw1.

Now for the bug ,

Select obj_2 and bake. Remember this object has three materials and two bake targets , so its bakes to bake_target_raw1 and to bake_target_raw2. Once baking is complete , You will see the result in the uv/image editor window , currently displaying bake_target_raw2.

Change the uv/image editor window to display bake_target_raw1 again. You will notice that while it did create pixels in both images , there are artifacts from bake_target_raw2 that have now also appeared in bake_target_raw1 that should not be there. Meaning mat_2 and mat_3 that use bake_target_raw2 somehow baked into bake_target_raw1 , used only by mat_1.

( the bottles geometry of obj_2 , that use mat_2 and mat_3 , have baked into bake_target_raw2 correctly , but then also in some strange manner changed pixels in bake_target_raw1 ,adding some and erasing some )

I tried both GPU and CPU bake , results are the same. I discovered this issue while using python to automate an asset production pipeline.

I tried it in blender 3.4.1 and it also has the same bug , slightly worse artifacts though

I tried it in blender 3.0.1 and it DOES NOT have this issue !! hope that helps

**System Information** Operating system: Windows 11 Pro , 22H2 , 22621.1848 Graphics card: NVIDIA GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 536.23 **Blender Version** Broken: version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash: `e1ccd9d4a1d3` Worked: version 3.0.1 **Short description of error** baking error , when baking an object with 3 materials and two different bake target textures , strange artifacts from the one bake target texture are created in the other bake target texture **Exact steps for others to reproduce the error** blend file has two objects , named : "obj_1" and "obj_2" blend file has 3 materials , named : "mat_1" , "mat_2" , "mat_3" obj_1 only has one material slot , using mat_1 obj_2 has 3 materials slots using all three both objects have two uv slots. The second is named "bake" and is selected. the blend file has two generated textures, named : "bake_target_raw1" and "bake_target_raw2" mat_1 has a bake target tex node and its image name link is set to bake_target_raw1 both mat_2 and mat_3 have tex nodes and they point to bake_target_raw2 So the scene is set up and ready for baking , clear image , is set to false and samples are very low for quick testing. Select obj_1 and bake. You will see the result in the uv/image editor window , currently displaying bake_target_raw1. Now for the bug , Select obj_2 and bake. Remember this object has three materials and two bake targets , so its bakes to bake_target_raw1 and to bake_target_raw2. Once baking is complete , You will see the result in the uv/image editor window , currently displaying bake_target_raw2. Change the uv/image editor window to display bake_target_raw1 again. You will notice that while it did create pixels in both images , there are artifacts from bake_target_raw2 that have now also appeared in bake_target_raw1 that should not be there. Meaning mat_2 and mat_3 that use bake_target_raw2 somehow baked into bake_target_raw1 , used only by mat_1. ( the bottles geometry of obj_2 , that use mat_2 and mat_3 , have baked into bake_target_raw2 correctly , but then also in some strange manner changed pixels in bake_target_raw1 ,adding some and erasing some ) I tried both GPU and CPU bake , results are the same. I discovered this issue while using python to automate an asset production pipeline. I tried it in blender 3.4.1 and it also has the same bug , slightly worse artifacts though I tried it in blender 3.0.1 and it DOES NOT have this issue !! hope that helps
Ian Pretorius added the
Status
Needs Triage
Type
Report
Severity
Normal
labels 2023-06-16 17:26:43 +02:00
Member

This changed in 449db0a

The old method is still there, you can use
image

@shaderbytes : does this work for you?
@Baardaap : already asking: would you consider this expected behavior?

This changed in 449db0a The old method is still there, you can use ![image](/attachments/0983f969-ca52-468f-9273-467518536ea9) @shaderbytes : does this work for you? @Baardaap : already asking: would you consider this expected behavior?
Philipp Oeser added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-06-20 14:39:51 +02:00

No, I'd consider this a bug.

I'll try to look into it.

No, I'd consider this a bug. I'll try to look into it.
Author

Thanks @lichtwerk

If I change the Margin Type to Extend it does bake correctly. That is helpful for me to continue working so many thanks for your input.

@Baardaap yes this cannot be expected behaviour regardless of margin type so best wishes in getting it fixed.

Thanks @lichtwerk If I change the Margin Type to Extend it does bake correctly. That is helpful for me to continue working so many thanks for your input. @Baardaap yes this cannot be expected behaviour regardless of margin type so best wishes in getting it fixed.
Philipp Oeser changed title from baking multi texture targets on single object is broken to baking multi texture targets on single object is broken (adjacent faces option, Extend is fine) 2023-06-20 16:33:43 +02:00
Philipp Oeser added
Status
Confirmed
Module
Render & Cycles
and removed
Status
Needs Information from User
labels 2023-06-20 16:34:04 +02:00
Philipp Oeser changed title from baking multi texture targets on single object is broken (adjacent faces option, Extend is fine) to Regression: baking multi texture targets on single object is broken (adjacent faces option, Extend is fine) 2023-06-20 16:34:53 +02:00
Martijn Versteegh self-assigned this 2023-06-20 21:47:44 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-07-05 14:20:40 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
3 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#109057
No description provided.