Smart UV island margin value changed since C rewrite #85978

Closed
opened 2021-02-25 10:26:08 +01:00 by Francesco Mazzoli · 28 comments

System Information
Operating system: Linux (NixOS)
Graphics card: Intel

Blender Version
Broken: 2.91.2
Worked: 2.83.5

Short description of error
Smart UV mapping seems to work significantly worse (at least for my test case) since the C rewrite, which landed in 2.91.2 (I think).

Exact steps for others to reproduce the error

**System Information** Operating system: Linux (NixOS) Graphics card: Intel **Blender Version** Broken: 2.91.2 Worked: 2.83.5 **Short description of error** Smart UV mapping seems to work significantly worse (at least for my test case) since the C rewrite, which landed in 2.91.2 (I think). **Exact steps for others to reproduce the error** - Import uploaded file - In UV editing workspace -> {nav UV > Unwrap > Smart UV Project} - Expand redo panel -> change `Island Margin` to 0.03 video: https://www.youtube.com/watch?v=illIxYKb-1k Test mesh: [mesh-clean.ply](https://archive.blender.org/developer/F9837923/mesh-clean.ply) | After | Before | | -- | -- | | ![uv-map-after.png](https://archive.blender.org/developer/F9837918/uv-map-after.png) | ![uv-map-before.png](https://archive.blender.org/developer/F9837916/uv-map-before.png) |

Added subscriber: @bitonic

Added subscriber: @bitonic

Also, the newer version ( https:*github.com/blender/blender/blob/0e1c6a29cbb21476d6913a592fb12e29bf700b43/source/blender/editors/uvedit/uvedit_unwrap_ops.c#L2017 ) removed the very nice comments in the old version ( https:*github.com/blender/blender/blob/ad0da42751596a63a1bc4de5135cd43f7c3921bb/release/scripts/startup/bl_operators/uvcalc_smart_project.py ), which I think is a bit of a shame, given how nicely commented the old version was.

Also, the newer version ( https:*github.com/blender/blender/blob/0e1c6a29cbb21476d6913a592fb12e29bf700b43/source/blender/editors/uvedit/uvedit_unwrap_ops.c#L2017 ) removed the very nice comments in the old version ( https:*github.com/blender/blender/blob/ad0da42751596a63a1bc4de5135cd43f7c3921bb/release/scripts/startup/bl_operators/uvcalc_smart_project.py ), which I think is a bit of a shame, given how nicely commented the old version was.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Please try a fresh build from https://builder.blender.org/download/

There have been a couple of fixes, now I am getting matching results (first is py version, second is C in current master):

image.png
image.png

Do you see the same results now?

Please try a fresh build from https://builder.blender.org/download/ There have been a couple of fixes, now I am getting matching results (first is py version, second is C in current master): ![image.png](https://archive.blender.org/developer/F9838473/image.png) ![image.png](https://archive.blender.org/developer/F9838471/image.png) Do you see the same results now?

In #85978#1118897, @lichtwerk wrote:
Please try a fresh build from https://builder.blender.org/download/

There have been a couple of fixes, now I am getting matching results (first is py version, second is C in current master):

image.png
image.png

Do you see the same results now?

I just tried with 2.93, and I get the same results as the older version.

mesh-uv-2.93.PNG

blender-version.PNG

> In #85978#1118897, @lichtwerk wrote: > Please try a fresh build from https://builder.blender.org/download/ > > There have been a couple of fixes, now I am getting matching results (first is py version, second is C in current master): > > ![image.png](https://archive.blender.org/developer/F9838473/image.png) > ![image.png](https://archive.blender.org/developer/F9838471/image.png) > > Do you see the same results now? I just tried with 2.93, and I get the same results as the older version. ![mesh-uv-2.93.PNG](https://archive.blender.org/developer/F9838944/mesh-uv-2.93.PNG) ![blender-version.PNG](https://archive.blender.org/developer/F9838943/blender-version.PNG)
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Member

Watched the video now.
That is because of the Island Margin of 0.03, if I set it to 0.00 all is fine in the C version.

But you are right, in this particular file, the python version could still keep up, even with a Island Margin of 0.03.
Will confirm for now, needs some further investigation.

Watched the video now. That is because of the `Island Margin` of 0.03, if I set it to 0.00 all is fine in the C version. But you are right, in this particular file, the python version could still keep up, even with a `Island Margin` of 0.03. Will confirm for now, needs some further investigation.
Philipp Oeser changed title from Smart UV mapping provides significantly different results since C rewrite to Smart UV mapping provides significantly different results since C rewrite (Island Margin non zero) 2021-02-25 17:35:25 +01:00

Added subscriber: @ideasman42

Added subscriber: @ideasman42

The margin behaves differently, as this has been in multiple releases I'll mark this as papercut, although it would be good to resolve.

The margin behaves differently, as this has been in multiple releases I'll mark this as papercut, although it would be good to resolve.
Campbell Barton changed title from Smart UV mapping provides significantly different results since C rewrite (Island Margin non zero) to Smart UV island margin value changed since C rewrite 2022-05-03 05:32:21 +02:00

Added subscriber: @Chris_Blackbourn

Added subscriber: @Chris_Blackbourn

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'

Is this now a duplicate of #90782 ?
(Is there more here that isn't there?)

Is this now a duplicate of #90782 ? (Is there more here that isn't there?)
Member

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'
Member

Added subscriber: @Chris_Blend

Added subscriber: @Chris_Blend
Member

@Chris_Blend : why would the area dependent margin (as described in #90782) result in the outcome described here?

@Chris_Blend : why would the area dependent margin (as described in #90782) result in the outcome described here?

In #85978#1380497, @lichtwerk wrote:
@Chris_Blend : why would the area dependent margin (as described in #90782) result in the outcome described here?

Ahh, my mistake, I didn't realise these were two different operators.

> In #85978#1380497, @lichtwerk wrote: > @Chris_Blend : why would the area dependent margin (as described in #90782) result in the outcome described here? Ahh, my mistake, I didn't realise these were two different operators.

Changed status from 'Needs Developer To Reproduce' to: 'Needs Triage'

Changed status from 'Needs Developer To Reproduce' to: 'Needs Triage'

Just tried this in Blender 3.3 (LTS) with default settings and getting the following result: image.png

Unless there's some further change requested, I recommend we change the status of this task to "Resolved".

Just tried this in Blender 3.3 (LTS) with default settings and getting the following result: ![image.png](https://archive.blender.org/developer/F13542416/image.png) Unless there's some further change requested, I recommend we change the status of this task to "Resolved".
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

@Chris_Blackbourn hi, did you check with 0.03 Island Margin? I got similar results as reporter has shown

@lichtwerk : That is because of the Island Margin of 0.03

@Chris_Blackbourn hi, did you check with 0.03 Island Margin? I got similar results as reporter has shown > @lichtwerk : That is because of the `Island Margin` of 0.03

@Chris_Blackbourn this was never broken with the default settings, so I don't think anything has changed here.

@Chris_Blackbourn this was never broken with the default settings, so I don't think anything has changed here.

Oops, yes, again, I overlooked changing the island margin to 0.03, and now get the tiny boxes result :
image.png

Oops, yes, again, I overlooked changing the island margin to 0.03, and now get the tiny boxes result : ![image.png](https://archive.blender.org/developer/F13542715/image.png)
Member

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

Changed status from 'Needs Triage' to: 'Confirmed'
Chris Blackbourn self-assigned this 2022-09-25 08:01:46 +02:00

Apply D16058 and choose {"Simple Margin" : True }

Apply [D16058](https://archive.blender.org/developer/D16058) and choose ` {"Simple Margin" : True } `

This issue was referenced by c2256bf7f7

This issue was referenced by c2256bf7f714bbd41388af3e184b3d84b496fbf3

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

Updated: Use "Add" margin method.

Updated: Use "Add" margin method.
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#85978
No description provided.