3D texturing: Fix seam bleeding #97352

Open
opened 2022-04-15 11:48:19 +02:00 by Jeroen Bakker · 6 comments
Member

Version 1 (abandoned)

The concept of this approach is create a list of source pixels that should be copied to other areas of the texture. By doing this the seams will be fixed. During copying the pixels can be blended with near pixels to improve quality.

  • Scan over all uv edges that make the bounds of an UV island.
  • Scan over pixels that are 'intersect' with the found uv edges.
  • Pixels that are already part of the PBVH Pixels should be ignored.
  • Pixels that are not part of a PBVH Pixels should be 'fixed'
  • Find a corresponding pixels that could be used as a source to fix the pixel.
  • Add the source pixel to be copied to the pixel to be fixed. This should be added to the PBVHNode of the sourcing pixel. If the pixel was changed it should be copied to the target.

During test we decided that this solution doesn't get to the quality we want.

Version 2 (new approach)

  • for now the unconnected uv edges will be the same as version 1, we can in the future change this by extending the edges. I left this out of scope for now.
  • split the mesh into uv island.
  • extract the pixels of the 'original' mesh.
  • per UDIM tile create uv island map (2d array with ints)
  • dilate the uv islands until they reach each other undecisive pixels should not be solved.
  • This map is used as a mask where uv island can extended.
  • per uv island find the sharpest corner.
  • go over the 3d mesh fan of the corner and see how this fan can be extended. For now I see 3 scenarios
    • the corner is a cut (both edges are connected in 3d space). for example see uvmap of cube. In this case we should duplicate the original faces and
    • the corner connects to another edge on the same uv island. might be similar to the first case,
    • the corner connects to one or multiple uv island. In this case the geometry that isn't connected in uv space, but is in 3d space should be added in between.
  • this generates new primitices that could be extracted using the pixel extractor.
  • the newly primitives should be stored in the PBVH as the uv coords must be stored somewhere.
  • the new primitives should still be mappable to the original primitives.
# Version 1 (abandoned) The concept of this approach is create a list of source pixels that should be copied to other areas of the texture. By doing this the seams will be fixed. During copying the pixels can be blended with near pixels to improve quality. * Scan over all uv edges that make the bounds of an UV island. * Scan over pixels that are 'intersect' with the found uv edges. * Pixels that are already part of the PBVH Pixels should be ignored. * Pixels that are not part of a PBVH Pixels should be 'fixed' * Find a corresponding pixels that could be used as a source to fix the pixel. * Add the source pixel to be copied to the pixel to be fixed. This should be added to the PBVHNode of the sourcing pixel. If the pixel was changed it should be copied to the target. During test we decided that this solution doesn't get to the quality we want. # Version 2 (new approach) - for now the unconnected uv edges will be the same as version 1, we can in the future change this by extending the edges. I left this out of scope for now. - split the mesh into uv island. - extract the pixels of the 'original' mesh. - per UDIM tile create uv island map (2d array with ints) - dilate the uv islands until they reach each other undecisive pixels should not be solved. - This map is used as a mask where uv island can extended. - per uv island find the sharpest corner. - go over the 3d mesh fan of the corner and see how this fan can be extended. For now I see 3 scenarios - the corner is a cut (both edges are connected in 3d space). for example see uvmap of cube. In this case we should duplicate the original faces and - the corner connects to another edge on the same uv island. might be similar to the first case, - the corner connects to one or multiple uv island. In this case the geometry that isn't connected in uv space, but is in 3d space should be added in between. - this generates new primitices that could be extracted using the pixel extractor. - the newly primitives should be stored in the PBVH as the uv coords must be stored somewhere. - the new primitives should still be mappable to the original primitives.
Author
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Author
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Jeroen Bakker changed title from 3D texturing: Seam bleading to 3D texturing: Fix seam bleeding 2022-04-15 11:52:19 +02:00
Jeroen Bakker self-assigned this 2022-04-15 12:03:30 +02:00

Added subscriber: @Vyach

Added subscriber: @Vyach
Member

Added subscriber: @EAW

Added subscriber: @EAW

This issue was referenced by 4ed649352f

This issue was referenced by 4ed649352f410b8511054c86dd7fb89a862f577a
Author
Member

It was mentioned that priority should not be added for regular development.

It was mentioned that priority should not be added for regular development.
Julien Kaspar added this to the Sculpt, Paint & Texture project 2023-02-08 10:48:53 +01:00
Philipp Oeser removed the
Interest
Sculpt, Paint & Texture
label 2023-02-10 09:11:30 +01: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 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#97352
No description provided.