Film -> Pixel Filter settings are not used when baking textures #108033

Open
opened 2023-05-18 06:36:48 +02:00 by Nathan Hayes · 4 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: AMD Radeon R9 200 Series ATI Technologies Inc. 4.5.14831 Core Profile Context 21.5.2 27.20.20903.8001

Blender Version
Broken: version: 3.5.0, branch: blender-v3.5-release, commit date: 2023-03-29 02:56, hash: 1be25cfff18b
Worked: (newest version of Blender that worked as expected)

Short description of error

Pixel Filter settings are not used when Baking a Texture, changing them does not effect Baking in any way. The width seems to be fixed at a value of around 0.1
Had a quick look at the github and I'm guessing they aren't passed to the render when Baking.

Exact steps for others to reproduce the error

Render any texture with sub pixel details to a texture, see attached file as example

  • Enable viewport render preview
  • Adjust Film->Pixel Filter value, it's effective
  • Bake the texture
  • No matter how you adjust Film->Pixel Filter value, it's not effective on the baked result
**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: AMD Radeon R9 200 Series ATI Technologies Inc. 4.5.14831 Core Profile Context 21.5.2 27.20.20903.8001 **Blender Version** Broken: version: 3.5.0, branch: blender-v3.5-release, commit date: 2023-03-29 02:56, hash: `1be25cfff18b` Worked: (newest version of Blender that worked as expected) **Short description of error** Pixel Filter settings are not used when Baking a Texture, changing them does not effect Baking in any way. The width seems to be fixed at a value of around 0.1 Had a quick look at the github and I'm guessing they aren't passed to the render when Baking. **Exact steps for others to reproduce the error** Render any texture with sub pixel details to a texture, see attached file as example - Enable viewport render preview - Adjust Film->Pixel Filter value, it's effective - Bake the texture - No matter how you adjust Film->Pixel Filter value, it's not effective on the baked result
Nathan Hayes added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-05-18 06:36:49 +02:00
Member

Can confirm. Baked result does not seem to be affected by the Pixel Filter value, but I'm not sure if this is a bug, because Pixel Filter mostly controls how the result is displayed onto the viewport. Will forward to devs.

Can confirm. Baked result does not seem to be affected by the Pixel Filter value, but I'm not sure if this is a bug, because Pixel Filter mostly controls how the result is displayed onto the viewport. Will forward to devs.
YimingWu added
Module
Render & Cycles
Status
Needs Info from Developers
and removed
Status
Needs Triage
labels 2023-05-18 08:15:45 +02:00
YimingWu changed title from Pixel Filter (anti-aliasing) settings are not used when baking textures to Film -> Pixel Filter settings are not used when baking textures 2023-05-18 08:16:11 +02:00
Author

" but I'm not sure if this is a bug "

I consider it a bug as baking normal maps in some cases results in heavy checkerboard aliasing (fabric detail textures as an example). There are numerous forum posts about it, and some users have commented that they have to bake normals outside of Blender because of it. Or bake at 2x and manually sample down, which does not solve the issue (any banding/aliasing is simply blurred instead of removed)

> " but I'm not sure if this is a bug " I consider it a bug as baking normal maps in some cases results in heavy checkerboard aliasing (fabric detail textures as an example). There are numerous forum posts about it, and some users have commented that they have to bake normals outside of Blender because of it. Or bake at 2x and manually sample down, which does not solve the issue (any banding/aliasing is simply blurred instead of removed)
Author

Please update to triage as this is a bug that prevents texture baking from functioning correctly.
The pixel filter setting needs to be correct, the results of it not being is:

More samples required for light and texture baking, with remedial results
Additional samples do not contribute to noise reduction on smaller details
Gradient boundaries and sharp edges always have aliasing
Normal maps are incorrect due to aliasing
Blender cannot be used to generate correctly sampled Mip Maps
Lightmap baking is subject to unreducible noise due to lack of surface area sampled
Denoising filter is effected heavily by aliasing and incorrectly emphasizes aliasing instead of reducing it

Please update to triage as this is a bug that prevents texture baking from functioning correctly. The pixel filter setting needs to be correct, the results of it not being is: More samples required for light and texture baking, with remedial results Additional samples do not contribute to noise reduction on smaller details Gradient boundaries and sharp edges always have aliasing Normal maps are incorrect due to aliasing Blender cannot be used to generate correctly sampled Mip Maps Lightmap baking is subject to unreducible noise due to lack of surface area sampled Denoising filter is effected heavily by aliasing and incorrectly emphasizes aliasing instead of reducing it
Author

https://github.com/blender/cycles/blob/main/src/kernel/integrator/init_from_bake.h

Unfortunately baking cannot sample over to other triangles. However, the does not explain why the aliasing is so bad in the demo file provided, it only has 2 triangles. It also seems Pixel Width is not used here at all (could we multiply ddx,ddy by filter size?).

It would be reasonable to assume some of these functions are not producing good results. bake_jitter_barycentric for example may be missing in most cases. Resulting in only the center sample being used most of the time, and a performance hit as it needlessly does the whole 10 iterations and ends up returning the unchanged value anyway.

bake_offset_towards_center has two hand picked values that might need testing.

Regardless of the triangle edge cases its clear the sampling width does not cover an entire texel at all.

https://github.com/blender/cycles/blob/main/src/kernel/integrator/init_from_bake.h Unfortunately baking cannot sample over to other triangles. However, the does not explain why the aliasing is so bad in the demo file provided, it only has 2 triangles. It also seems Pixel Width is not used here at all (could we multiply ddx,ddy by filter size?). It would be reasonable to assume some of these functions are not producing good results. bake_jitter_barycentric for example may be missing in most cases. Resulting in only the center sample being used most of the time, and a performance hit as it needlessly does the whole 10 iterations and ends up returning the unchanged value anyway. bake_offset_towards_center has two hand picked values that might need testing. Regardless of the triangle edge cases its clear the sampling width does not cover an entire texel at all.
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
2 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#108033
No description provided.