Blender 2.8 UV packing scales UV islands non uniformly #61239

Closed
opened 2019-02-06 15:42:31 +01:00 by Ludvik Koutny · 23 comments
Contributor

System Information
Operating system: Windows 10
Graphics card: GTX1080Ti

Blender Version
Broken: 2.8 latest master

Short description of error
Pack feature of UV editor in Blender 2.8 scales packed islands non uniformly, making it useless, for anything. A 3D software with no functional UV packing feature is a big problem, as it means any UV mapping work has to be done outside of Blender.

UV islands before Pack:
Pack_Broken.JPG

Same UV islands after Pack:
Pack_Broken_After.JPG

Exact steps for others to reproduce the error
1, Open attached file:
PackBug.zip
2, In Mesh mode, select all mesh elements and Uwrap the mesh using Cube projection:
image.png
3, In the UV editor, select all UV islands and pack them using "Pack" operation
image.png

Result: Pack feature produces garbage, non uniform UV layout

Expected: Pack feature does not alter scale of the UV islands in ANY way unless explicitly allowed by user.

**System Information** Operating system: Windows 10 Graphics card: GTX1080Ti **Blender Version** Broken: 2.8 latest master **Short description of error** Pack feature of UV editor in Blender 2.8 scales packed islands non uniformly, making it useless, for **anything**. A 3D software with no functional UV packing feature is a big problem, as it means any UV mapping work has to be done outside of Blender. UV islands before Pack: ![Pack_Broken.JPG](https://archive.blender.org/developer/F6528546/Pack_Broken.JPG) Same UV islands after Pack: ![Pack_Broken_After.JPG](https://archive.blender.org/developer/F6528551/Pack_Broken_After.JPG) **Exact steps for others to reproduce the error** 1, Open attached file: [PackBug.zip](https://archive.blender.org/developer/F6528593/PackBug.zip) 2, In Mesh mode, select all mesh elements and Uwrap the mesh using Cube projection: ![image.png](https://archive.blender.org/developer/F6528597/image.png) 3, In the UV editor, select all UV islands and pack them using "Pack" operation ![image.png](https://archive.blender.org/developer/F6528605/image.png) Result: Pack feature produces garbage, non uniform UV layout Expected: Pack feature does not alter scale of the UV islands in **ANY** way unless explicitly allowed by user.
Author
Contributor

Added subscriber: @Rawalanche

Added subscriber: @Rawalanche

#61277 was marked as duplicate of this issue

#61277 was marked as duplicate of this issue

Added subscriber: @ZedDB

Added subscriber: @ZedDB

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sebastian Parborg self-assigned this 2019-02-06 15:50:40 +01:00

This is not a bug but a feature request.
All features requests go to: https://rightclickselect.com/

This is not a bug but a feature request. All features requests go to: https://rightclickselect.com/
Author
Contributor

In #61239#614563, @ZedDB wrote:
This is not a bug but a feature request.
All features requests go to: https://rightclickselect.com/

Are you being serious?

Non uniform scaling of packed islands literally defeats the point of UV packing. It's literally impossible to use this feature to any benefit. At the same time, UV packing is absolutely essential feature of any 3D package.

Furthermore, it's a regression from 2.79, where UV packing did not scale the UV islands:
Packing279.JPG

If you fail to recognize significance and severity of this, I have to question whether you are fit to triage bugs for any software application even remotely related to 3D graphics O_o

> In #61239#614563, @ZedDB wrote: > This is not a bug but a feature request. > All features requests go to: https://rightclickselect.com/ Are you being serious? Non uniform scaling of packed islands literally defeats the point of UV packing. It's literally impossible to use this feature to any benefit. At the same time, UV packing is absolutely essential feature of any 3D package. Furthermore, it's a regression from 2.79, where UV packing did not scale the UV islands: ![Packing279.JPG](https://archive.blender.org/developer/F6528891/Packing279.JPG) If you fail to recognize significance and severity of this, I have to question whether you are fit to triage bugs for any software application even remotely related to 3D graphics O_o

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'

This was indeed an unintentional change

@Rawalanche, please be professional and avoid the personal attacks, mistakes happen if you triage dozens of bugs a day.

This was indeed an unintentional change @Rawalanche, please be professional and avoid the personal attacks, mistakes happen if you triage dozens of bugs a day.
Sebastian Parborg was unassigned by Brecht Van Lommel 2019-02-06 16:47:25 +01:00
Brecht Van Lommel self-assigned this 2019-02-06 16:47:25 +01:00
Author
Contributor

In #61239#614646, @brecht wrote:
This was indeed an unintentional change

@Rawalanche, please be professional and avoid the personal attacks, mistakes happen if you triage dozens of bugs a day.

I am sorry I got heated up. Non the less, the report is very clear, screenshots and repro scenes provided, and the issue is significant. I honestly still find it difficult to believe this was just an oversight, since it was so quickly concluded as feature request.

> In #61239#614646, @brecht wrote: > This was indeed an unintentional change > > @Rawalanche, please be professional and avoid the personal attacks, mistakes happen if you triage dozens of bugs a day. I am sorry I got heated up. Non the less, the report is very clear, screenshots and repro scenes provided, and the issue is significant. I honestly still find it difficult to believe this was just an oversight, since it was so quickly concluded as feature request.

This is the result I got when following the instructions in both 2.79 (git) and 2.8 (2.8 to the left and 2.79 to the right):
test.png

As you can see the difference is not that much so I thought you were requesting something that had not been in blender before.
You should have made it clear from the bug report that this was not the case.

But instead you just said to expect garbage output. And because I got nearly the same in 2.79, you can see how I made my conclusion.

This is the result I got when following the instructions in both 2.79 (git) and 2.8 (2.8 to the left and 2.79 to the right): ![test.png](https://archive.blender.org/developer/F6529414/test.png) As you can see the difference is not that much so I thought you were requesting something that had not been in blender before. You should have made it clear from the bug report that this was not the case. But instead you just said to expect garbage output. And because I got nearly the same in 2.79, you can see how I made my conclusion.
Author
Contributor

In #61239#614667, @ZedDB wrote:
This is the result I got when following the instructions in both 2.79 (git) and 2.8 (2.8 to the left and 2.79 to the right):
test.png

As you can see the difference is not that much so I thought you were requesting something that had not been in blender before.
You should have made it clear from the bug report that this was the case.

But instead you just said to expect garbage output. And because I got nearly the same in 2.79, you can see how I made my conclusion.

Yeah, sorry. Now I am very confused.

https://youtu.be/YXGVPEZQ1_g

I am using latest 2.8 master downloaded from Blender.org this morning. No matter how many times I repeat those steps, I always get the wrong, non uniformly scaled pack. I have no idea how you are able to get the right pack

> In #61239#614667, @ZedDB wrote: > This is the result I got when following the instructions in both 2.79 (git) and 2.8 (2.8 to the left and 2.79 to the right): > ![test.png](https://archive.blender.org/developer/F6529414/test.png) > > As you can see the difference is not that much so I thought you were requesting something that had not been in blender before. > You should have made it clear from the bug report that this was the case. > > But instead you just said to expect garbage output. And because I got nearly the same in 2.79, you can see how I made my conclusion. Yeah, sorry. Now I am very confused. https://youtu.be/YXGVPEZQ1_g I am using latest 2.8 master downloaded from Blender.org this morning. No matter how many times I repeat those steps, I always get the wrong, non uniformly scaled pack. I have no idea how you are able to get the right pack

I'm using the latest commit on the 2.8 git branch. But I don't see any obvious fixes for this problem in the commit log.

Just for the sanity of both of us, here you have a video when I try to reproduce this in 2.8:
output.mkv

I'm guessing that something might have broken it and then fixed it today? I'll try the commit from the build bot too.

I'm using the latest commit on the 2.8 git branch. But I don't see any obvious fixes for this problem in the commit log. Just for the sanity of both of us, here you have a video when I try to reproduce this in 2.8: [output.mkv](https://archive.blender.org/developer/F6529577/output.mkv) I'm guessing that something might have broken it and then fixed it today? I'll try the commit from the build bot too.
Author
Contributor

In #61239#614684, @ZedDB wrote:
I'm using the latest commit on the 2.8 git branch. But I don't see any obvious fixes for this problem in the commit log.

Just for the sanity of both of us, here you have a video when I try to reproduce this in 2.8:
output.mkv

I'm guessing that something might have broken it and then fixed it today? I'll try the commit from the build bot too.

Hmm, I've tried even newer build from buildbot, from today's afternoon, and it's the same. I wonder if it could be Linux vs Windows thing :|

> In #61239#614684, @ZedDB wrote: > I'm using the latest commit on the 2.8 git branch. But I don't see any obvious fixes for this problem in the commit log. > > Just for the sanity of both of us, here you have a video when I try to reproduce this in 2.8: > [output.mkv](https://archive.blender.org/developer/F6529577/output.mkv) > > I'm guessing that something might have broken it and then fixed it today? I'll try the commit from the build bot too. Hmm, I've tried even newer build from buildbot, from today's afternoon, and it's the same. I wonder if it could be Linux vs Windows thing :|

Yeah, probably. I get the same result as before with a commit from feb 5.

@brecht any ideas? Or did you manage to reproduce this too?

Yeah, probably. I get the same result as before with a commit from feb 5. @brecht any ideas? Or did you manage to reproduce this too?

@Rawalanche I guess you could see if loading factory settings helps? (I doubt it but just in case)

@Rawalanche I guess you could see if loading factory settings helps? (I doubt it but just in case)

It may be related to the aspect ratio of the assigned image textures. If they are non-square the UV editor does a correction for some operations.

I couldn't immediately reproduce the bug, but can go over the code to check what changed compared to 2.79.

It may be related to the aspect ratio of the assigned image textures. If they are non-square the UV editor does a correction for some operations. I couldn't immediately reproduce the bug, but can go over the code to check what changed compared to 2.79.
Author
Contributor

Reset to factory settings did not help, but Brecht is right, it has something to do with aspect ratio of the texture. I have replaced the texture on the first material slot of the mesh with square aspect ratio texture and pack is no longer distorted. That's very odd behavior for three reasons:

1, It does this correction based on texture of the first material in the material slots, even when the object can have multiple materials, each having multiple textures of different aspect ratios.

2, It does this correction even when none of those non-square textures are selected in the UV editor

3, This "correction" can't be disabled from user side in any way :/

Reset to factory settings did not help, but Brecht is right, it has something to do with aspect ratio of the texture. I have replaced the texture on the first material slot of the mesh with square aspect ratio texture and pack is no longer distorted. That's very odd behavior for three reasons: 1, It does this correction based on texture of the first material in the material slots, even when the object can have multiple materials, each having multiple textures of different aspect ratios. 2, It does this correction even when none of those non-square textures are selected in the UV editor 3, This "correction" can't be disabled from user side in any way :/

Added subscriber: @khader-1

Added subscriber: @khader-1

This issue was referenced by 403ae48063

This issue was referenced by 403ae48063d91126bd36ca56920290bcb53f504e

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Added subscriber: @AdamJanz

Added subscriber: @AdamJanz

Just for future reference, the UV stretching issue (caused by assigning an image with a different aspect ratio than the image the unwrap occurred on) can be corrected by the Magic UV addon (included in Blender). The feature is called "Preserve UV", accessible from the "U" menu in edit mode in the 3D view (once Magic UV is enabled). Example .blend attached.

Scenario shown in the .blend file:

  1. Make sure the Magic UV add-on is enabled in Blender's preferences.

  2. A "non-square" image has been added to the Cube's material, and the Cube has been unwrapped. The UV layout appears normal (non-stretched).

  3. In the shader editor, if you just click on "Browse Image to be linked" and change to "square.png", you will notice the UV layout will become stretched. Change it back to "non-square.png", and the UV will appear normal again. This is important. In order for the addon to work correctly, the currently assigned image MUST possess the same aspect ratio that the UV unwrap occurred on.

  4. Now in edit mode, hit "U" in the 3D view, select "Preserve UV", and choose the image called "square". Notice the square image automatically becomes assigned AND the UV layout is preserved (non-stretched)! This handy feature was added by the developer a few years ago to deal with this very issue and makes it possible to switch between square and non-square images (or vice-versa) while preserving the aspect ratio of the original image where the UV unwrap occurred. :-) There is another option that pops up during the process allowing you to change the "aspect origin", but I honestly don't know how this works, and leaving it set to "center" seems to work fine.

I hope this helps someone who may encounter this issue in the future.

PreserveUVTest.blend

Just for future reference, the UV stretching issue (caused by assigning an image with a different aspect ratio than the image the unwrap occurred on) can be corrected by the Magic UV addon (included in Blender). The feature is called "Preserve UV", accessible from the "U" menu in edit mode in the 3D view (once Magic UV is enabled). Example .blend attached. Scenario shown in the .blend file: 1. Make sure the Magic UV add-on is enabled in Blender's preferences. 2. A "non-square" image has been added to the Cube's material, and the Cube has been unwrapped. The UV layout appears normal (non-stretched). 3. In the shader editor, if you just click on "Browse Image to be linked" and change to "square.png", you will notice the UV layout will become stretched. Change it back to "non-square.png", and the UV will appear normal again. This is important. In order for the addon to work correctly, the currently assigned image MUST possess the same aspect ratio that the UV unwrap occurred on. 4. Now in edit mode, hit "U" in the 3D view, select "Preserve UV", and choose the image called "square". Notice the square image automatically becomes assigned AND the UV layout is preserved (non-stretched)! This handy feature was added by the developer a few years ago to deal with this very issue and makes it possible to switch between square and non-square images (or vice-versa) while preserving the aspect ratio of the original image where the UV unwrap occurred. :-) There is another option that pops up during the process allowing you to change the "aspect origin", but I honestly don't know how this works, and leaving it set to "center" seems to work fine. I hope this helps someone who may encounter this issue in the future. [PreserveUVTest.blend](https://archive.blender.org/developer/F8189493/PreserveUVTest.blend)
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
5 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#61239
No description provided.