[UV] [Multi-Edit] Display>Stretch>Area doesn't work #63755

Closed
opened 2019-04-20 10:17:24 +02:00 by Jakub Daruk · 18 comments

System Information
Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 425.31

Blender Version
Broken: version: 2.80 (sub 57), branch: blender2.7, commit date: 2019-04-17 19:26, hash: b46245470f
Worked: (optional)

Short description of error
There is a bug with Area stretch type in UV window. It doesn't show correct values (colors). Also it doesn't respect size of one object UV Islands according to another objects sizes.

[When you merge all object into one it all works! It doesn't work with multi edit.]

Exact steps for others to reproduce the error
1.Create cube
2.Duplicate this cube, put it aside
3.Open first cube UV window
4.Move UV a bit that it doesn't overlap with other cube UV
5.Now select 2 cubes and open UV window, Go to Display>Stretch(tik)>Area
6. Cubes UVs should be blue, now try resize one of them

They remain blue and they should changing colors based on size of the object and overall unwrap.
This bug is since forever in 2.80 and probably there's more realated to it.

Cheers!
Area type BUG.jpg

**System Information** Operating system: Windows-10-10.0.17763 64 Bits Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 425.31 **Blender Version** Broken: version: 2.80 (sub 57), branch: blender2.7, commit date: 2019-04-17 19:26, hash: `b46245470f` Worked: (optional) **Short description of error** There is a bug with Area stretch type in UV window. It doesn't show correct values (colors). Also it doesn't respect size of one object UV Islands according to another objects sizes. [When you merge all object into one it all works! It doesn't work with multi edit.] **Exact steps for others to reproduce the error** 1.Create cube 2.Duplicate this cube, put it aside 3.Open first cube UV window 4.Move UV a bit that it doesn't overlap with other cube UV 5.Now select 2 cubes and open UV window, Go to Display>Stretch(tik)>Area 6. Cubes UVs should be blue, now try resize one of them They remain blue and they should changing colors based on size of the object and overall unwrap. This bug is since forever in 2.80 and probably there's more realated to it. Cheers! ![Area type BUG.jpg](https://archive.blender.org/developer/F6961329/Area_type_BUG.jpg)
Author

Added subscriber: @KibaX

Added subscriber: @KibaX

#66523 was marked as duplicate of this issue

#66523 was marked as duplicate of this issue

Added subscriber: @Gvgeo-1

Added subscriber: @Gvgeo-1

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
George Vogiatzis self-assigned this 2019-04-20 10:44:26 +02:00

This is how it should be work. You just resize a separate cube. There is no stretch.
If you join the cubes will see that it working fine.
000079.png

This is how it should be work. You just resize a separate cube. There is no stretch. If you join the cubes will see that it working fine. ![000079.png](https://archive.blender.org/developer/F6961337/000079.png)

I just saw the description update.
In 2.79 there was no multi-edit. These objects are 1 joined object and are indeed stretched, as would be in 2.80 if you join them too.
In multi-edit mode are separate objects and as such, there is no stretch.

I just saw the description update. In 2.79 there was no multi-edit. These objects are 1 joined object and are indeed stretched, as would be in 2.80 if you join them too. In multi-edit mode are separate objects and as such, there is no stretch.
Author

So I need to join all dozens objects on my scene to adjust texel density and then separate them again because I need it to bake high into low poly ? ... It doesn't sound any good for guy who work with games- like myself. It looks like the way before I even discover Multi-edit addon for 2.79. Also preparing assets atlases in 2.80 is kinda senseless work right now.

So I need to join all dozens objects on my scene to adjust texel density and then separate them again because I need it to bake high into low poly ? ... It doesn't sound any good for guy who work with games- like myself. It looks like the way before I even discover Multi-edit addon for 2.79. Also preparing assets atlases in 2.80 is kinda senseless work right now.

You are right, this doesn't make sense.
I'm changing the bug status back.
This was a functionality with Multi-edit addon shipped in 2.79.

You are right, this doesn't make sense. I'm changing the bug status back. This was a functionality with Multi-edit addon shipped in 2.79.

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'
George Vogiatzis removed their assignment 2019-04-20 12:58:32 +02:00

Added subscribers: @brecht, @ZedDB

Added subscribers: @brecht, @ZedDB
Brecht Van Lommel was assigned by Sebastian Parborg 2019-04-25 12:12:37 +02:00

@brecht I guess that the UV code has to be updated to take all objects in to account when using multi edit. Now at least, the display seems to be isolated to the geometry of each individual object.

@brecht I guess that the UV code has to be updated to take all objects in to account when using multi edit. Now at least, the display seems to be isolated to the geometry of each individual object.
Brecht Van Lommel removed their assignment 2019-04-25 12:17:26 +02:00
Jeroen Bakker was assigned by Brecht Van Lommel 2019-04-25 12:17:26 +02:00

Right. I'm going to pass this one to someone else, a bit random since this falls between a few areas of the code.

Right. I'm going to pass this one to someone else, a bit random since this falls between a few areas of the code.

@brecht @Jeroen-Bakker

Already looked at this. It feels a bit out of reach for me.

The only way I could thought of is,
to move faces_areas calculations
from uvedit_fill_buffer_data()
to ED_uvedit_draw_main().
But will have to pass a some variables(struct?) through draw functions.

                                    BMFace *efa,
                                    BMesh *bm,
                                    float (*faces_areas)[2],
                                    float totarea,
                                    float totuvarea,
                                    float Fulltotarea,
                                    float Fulltotuvarea

I expect that you can handle it way better than this.
But if, by any chance sounds good enough, I could give it a try.

@brecht @Jeroen-Bakker Already looked at this. It feels a bit out of reach for me. The only way I could thought of is, to move faces_areas calculations from `uvedit_fill_buffer_data`() to `ED_uvedit_draw_main`(). But will have to pass a some variables(struct?) through draw functions. ``` BMFace *efa, BMesh *bm, float (*faces_areas)[2], float totarea, float totuvarea, float Fulltotarea, float Fulltotuvarea ``` I expect that you can handle it way better than this. But if, by any chance sounds good enough, I could give it a try.
Member

Added subscriber: @JVM

Added subscriber: @JVM
Member

I would keep the mesh data (face area and uvarea) as much as possible in the VBO's as these will be reused. My approach would be to move the dynamic part of the data into the shader (totarea, totareauv).
this will be the total sum of all areas and the total sum of all uv area's from the objects that are being edited. The per mesh totals can be stored in the MeshBatchCache.

As I currently see it the calculation needs to take place in world space so we need to take the world_matrix into account. Currently the whole calculation is done in object local space.
I would propose to move the stretch calculation to the vertex shader. (move edit_uv_get_stretch_area to gpu_shader_2D_edituvs_stretch_vert.glsl).

I would keep the mesh data (face area and uvarea) as much as possible in the VBO's as these will be reused. My approach would be to move the dynamic part of the data into the shader (totarea, totareauv). this will be the total sum of all areas and the total sum of all uv area's from the objects that are being edited. The per mesh totals can be stored in the MeshBatchCache. As I currently see it the calculation needs to take place in world space so we need to take the world_matrix into account. Currently the whole calculation is done in object local space. I would propose to move the stretch calculation to the vertex shader. (move `edit_uv_get_stretch_area` to `gpu_shader_2D_edituvs_stretch_vert.glsl`).
Member

Discussed last week and we will do the calculation in local/mesh space.

Discussed last week and we will do the calculation in local/mesh space.

This issue was referenced by 64f8f7db7c

This issue was referenced by 64f8f7db7cce0c8923afcabb523f7400f744387e
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
7 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#63755
No description provided.