Workbench/Solid : Texture interpolation not displaying properly in viewport (shared across all users of an image) #106312

Open
opened 2023-03-30 15:37:28 +02:00 by Jake Moore · 5 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.18

Blender Version
Broken: version: 3.5.0, branch: blender-v3.5-release, commit date: 2023-03-29 02:56, hash: 1be25cfff18b
Worked: --

Short description of error
Low resolution textures are no longer being correctly displayed as a sharp graphic in the viewport when the texture interpolation is set to "closest" in the material shader.

feature works as intended in rendered view so long as Eevee or Cycles is selected. Workbench does not work as intended in rendered view.

Exact steps for others to reproduce the error
place object into scene. Locate a low resolution asset such as pixel art and map the texture to the object.

textures have always appeared blurry at first in the viewport but common pixel art practice is to set the interpolation from "linear"(or whichever is set to default) to "closest"

We have 4 materials each having individual Image Texture nodes (but all using the same image).

If you take the example file, and set Interpolation to Closest on all of them, you'll get it working in the viewport as well.

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.18 **Blender Version** Broken: version: 3.5.0, branch: blender-v3.5-release, commit date: 2023-03-29 02:56, hash: `1be25cfff18b` Worked: -- **Short description of error** Low resolution textures are no longer being correctly displayed as a sharp graphic in the viewport when the texture interpolation is set to "closest" in the material shader. feature works as intended in rendered view so long as Eevee or Cycles is selected. Workbench does not work as intended in rendered view. **Exact steps for others to reproduce the error** place object into scene. Locate a low resolution asset such as pixel art and map the texture to the object. textures have always appeared blurry at first in the viewport but common pixel art practice is to set the interpolation from "linear"(or whichever is set to default) to "closest" We have 4 materials each having individual Image Texture nodes (but all using the same image). If you take the example file, and set Interpolation to Closest on all of them, you'll get it working in the viewport as well.
Jake Moore added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-03-30 15:37:28 +02:00

I don't think this is a bug since it shouldn't work in the first place. But I'm not sure here.

I don't think this is a bug since it shouldn't work in the first place. But I'm not sure here.
Iliya Katushenock added the
Interest
EEVEE & Viewport
Interest
Nodes & Physics
labels 2023-03-30 15:45:16 +02:00
Author

Beg pardon, on further investigation it looks like there's an addition facet of the problem that I'd not taken into account. The object that I'd introduced into this scene was originally a .obj.

If I completely remove the default material generated from the accompanying .mtl file and build it from scratch the issue doesn't appear.

I'd missed this originally as the workflow between a native blender object and .obj object has been identical up until this point.

quick recording of the workflow in a previous version for reference:

https://imgur.com/a/WEn5BAm

Beg pardon, on further investigation it looks like there's an addition facet of the problem that I'd not taken into account. The object that I'd introduced into this scene was originally a .obj. If I completely remove the default material generated from the accompanying .mtl file and build it from scratch the issue doesn't appear. I'd missed this originally as the workflow between a native blender object and .obj object has been identical up until this point. quick recording of the workflow in a previous version for reference: https://imgur.com/a/WEn5BAm

You have tested this in 3.2.0, but I can't reproduce such behavior. That said, I have only 3.2.2 build, but not sure if viewport interpolation would be included in corrective release. Also tested 3.0 and 3.1. This looks like intended behavior to me.

You have tested this in 3.2.0, but I can't reproduce such behavior. That said, I have only 3.2.2 build, but not sure if viewport interpolation would be included in corrective release. Also tested 3.0 and 3.1. This looks like intended behavior to me.
Member

I can confirm an issue here.

We have 4 materials each having individual Image Texture nodes (but all using the same image).

If you take the example file, and set Interpolation to Closest on all of them, you'll get it working in the viewport as well.

You should be able to set Interpolation on each of them individually though (I think -- without having looked at code) . If I export the whole thing (after unpacking the texture) to OBJ and then import again, this seems to work as expected.

So the issue seems to be that for some reason the property is shared across all materials in the viewport -- and it is unclear which of the Image Texture nodes Interpolation is being considered.

I can confirm an issue here. We have 4 materials each having individual `Image Texture` nodes (but all using the same image). If you take the example file, and set `Interpolation` to `Closest` on all of them, you'll get it working in the viewport as well. You should be able to set Interpolation on each of them individually though (I think -- without having looked at code) . ~~If I export the whole thing (after unpacking the texture) to OBJ and then import again, this seems to work as expected.~~ So the issue seems to be that for some reason the property is shared across all materials in the viewport -- and it is unclear which of the `Image Texture` nodes `Interpolation` is being considered.
Member

Well, not so sure anymore how this is intended to work, seems like workbench_material_get_image will get the same image across multiple materials (and Image texture nodes) and switch multiple times. Order obviously makes a difference here then. If you want to be sure for Solid viewport shading, all users of the same image would have to set Interpolation the same.

Will reach out to the module to decide here.
If this is a limitation of Workbench/Solid, it might be good to mention this in the manual.

Well, not so sure anymore how this is intended to work, seems like `workbench_material_get_image` will get the same image across multiple materials (and Image texture nodes) and switch multiple times. Order obviously makes a difference here then. If you want to be sure for Solid viewport shading, all users of the same image would have to set Interpolation the same. Will reach out to the module to decide here. If this is a limitation of Workbench/Solid, it might be good to mention this in the manual.
Philipp Oeser changed title from Texture interpolation not displaying properly in viewport to Workbench/Solid : Texture interpolation not displaying properly in viewport (shared across all users of an image) 2023-04-11 10:22:55 +02:00
Philipp Oeser added the
Interest
Images & Movies
Interest
Core
labels 2023-07-12 11:24:39 +02:00
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#106312
No description provided.