Compositor scale offset #42844

Closed
opened 2014-12-08 21:35:27 +01:00 by Mikhail Rachinskiy · 17 comments

System Information
Windows 8.1 x64
Renderer: GeForce GTX 860M/PCIe/SSE2

Blender Version
Broken: 2.72.2 c8995ec

Short description of error
There is a little offset when upscaling render in compositor.

Exact steps for others to reproduce the error

  • Open blend file scale_offset.blend
  • Press render
  • Choose Bicubic or Bilinear filter in Transform node and see how image is offsetting a little bit to the down-left
  • Also choose back to Nearest filter and unmute Pixelate node, which is triggers offset too
**System Information** Windows 8.1 x64 Renderer: GeForce GTX 860M/PCIe/SSE2 **Blender Version** Broken: 2.72.2 c8995ec **Short description of error** There is a little offset when upscaling render in compositor. **Exact steps for others to reproduce the error** - Open blend file [scale_offset.blend](https://archive.blender.org/developer/F130359/scale_offset.blend) - Press render - Choose Bicubic or Bilinear filter in Transform node and see how image is offsetting a little bit to the down-left - Also choose back to Nearest filter and unmute Pixelate node, which is triggers offset too
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @MikhailRachinskiy

Added subscriber: @MikhailRachinskiy
Sergey Sharybin self-assigned this 2014-12-09 11:15:18 +01:00

As for the scale issue it seems to be an inconsistency in assumption where the pixel center is (whether it's coordinate (0,0) or (0.5, 0.5) ). What's even worse, those assumptions seems to be different in different areas of compositor. Would need to carefully look over all of the nodes there..

As for pixelate node, i'm not sure how to prevent offset with it's current implementation -- it's just rounds the coordinates to integer values. That would always give some offset... Personally i'd just get rid of such an obscure node..

As for the scale issue it seems to be an inconsistency in assumption where the pixel center is (whether it's coordinate (0,0) or (0.5, 0.5) ). What's even worse, those assumptions seems to be different in different areas of compositor. Would need to carefully look over all of the nodes there.. As for pixelate node, i'm not sure how to prevent offset with it's current implementation -- it's just rounds the coordinates to integer values. That would always give some offset... Personally i'd just get rid of such an obscure node..
Author
Member

Pixelate node is useful when you need to convert hi pix images to low pix, like on this screenshot:
pixelate.png

Transform node seems to be more useless, because it duplicates functionality of Scale, Rotate and Translate nodes, but missing valuable options:
trfrm.png

Pixelate node is useful when you need to convert hi pix images to low pix, like on this screenshot: ![pixelate.png](https://archive.blender.org/developer/F130444/pixelate.png) Transform node seems to be more useless, because it duplicates functionality of Scale, Rotate and Translate nodes, but missing valuable options: ![trfrm.png](https://archive.blender.org/developer/F130452/trfrm.png)

This issue was referenced by 02fad7dca4

This issue was referenced by 02fad7dca4adc5e248440c98293cdf713f25d39d

I know pixelate could be handy, but it's implementation is not offset-proof and it's not totally clear how to avoid it with the current sampling design in compositor.

Fix for interpolation offset will go to git now.

I know pixelate could be handy, but it's implementation is not offset-proof and it's not totally clear how to avoid it with the current sampling design in compositor. Fix for interpolation offset will go to git now.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 02fad7dca4.

Closed by commit 02fad7dca4.

This issue was referenced by 2ae0f1e70b

This issue was referenced by 2ae0f1e70be543b37f426dc1b7d8a44b05301faf

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'

Re-opening the issue, initial approach was wrong and the actual root of the issue is not just because of the interpolation, but more about how resolution is mapped.

Re-opening the issue, initial approach was wrong and the actual root of the issue is not just because of the interpolation, but more about how resolution is mapped.
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member

In BLI the nearest function is implemented as a float to int conversion
In the COM_MemoryBuffer nearest is implemented as float to int conversion.
In the pixelate it is implemented as a mathematic round. reason for this is to have all pixels the same size in the output.

Yes there is an issue based on the image width/height. Sometimes when translating images you will see rounding issues last/first column missing.
Should be investigated.

In BLI the nearest function is implemented as a float to int conversion In the COM_MemoryBuffer nearest is implemented as float to int conversion. In the pixelate it is implemented as a mathematic round. reason for this is to have all pixels the same size in the output. Yes there is an issue based on the image width/height. Sometimes when translating images you will see rounding issues last/first column missing. Should be investigated.

Added subscriber: @monique

Added subscriber: @monique

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Think at this point it's safe to consider this a TODO and something to be addressed with rest of sampling issues when re-considering the whole compositor.

Think at this point it's safe to consider this a TODO and something to be addressed with rest of sampling issues when re-considering the whole compositor.
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
6 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#42844
No description provided.