UV: unwrap. Margin size is not related to any useful measure #90782
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#90782
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-8.1-6.3.9600-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 471.41
Blender Version
Broken: version: 2.93.4 Release Candidate, branch: master, commit date: 2021-08-18 12:30, hash:
63559a779c
Try to unwrap and tune 2 pixel margin for example.
It is not related to anything I can count and predict.
Expected: relation to pixels (biggest size), if texture loaded to editor, or relation to UV 0—1 to have ability to enter 1/resolution
2021-08-19_23-16-58.mp4
untitled.blend
p.s. honestly I always use side-packers, so I can tune paddings in pixels. But it will be nice to have it out of box.
Added subscriber: @Vyach
Added subscriber: @APEC
or at least if you change Display - Pixel Coordinates, margin value should also be consistent.
So if I type Margin = 1, it should be 1 pixel value, but not this unknown value
Added subscribers: @brecht, @lichtwerk
Changed status from 'Needs Triage' to: 'Needs User Info'
This is from code:
(so margin is dependent on island area)
I assume this is in order to not have much space "wasted" on many small islands (but this is just an assumption)
Does it make more sense now?
@brecht: do you think a way to set an "absolute" margin would make sense?
New research:
so Margin not related to any of this values.
Ideally it should shift our UV Island from borders exactly on 1 square length.
No point to have this kind of margin IMO.
It is inconsistent, impossible to predict, hard to control and I wonder why it was made this way…
Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'
By definition, this is not a bug since this is working like intentionally coded (even with comment).
Not totally sure what to read from the "not dependent on UV scale" in said code comment though.
Like I said before, I can only assume this was made to not "waste" space around many, many small islands.
Unsure how to classify (personally, I would not consider this a bug, but a request for improved behavior -- which is not tackled here), but will pass on to module devs to decide.
@lichtwerk Yup. but such things are «workflow bugs» and they can be even worse, because they look as working code but work strange way or confuse ppl.
Papercuts usually more obvious
I tested. Blender produces average margin
So it is consistent, but still hard to control on Hipoly (where live margin change can be very slow and it is hard to catch proper size of pixels)
I remember, that once it was per individual islands and it was bug. Sorry for misleading about it.
at least give us example how to calculate 1 pixel with margin between islands?
Added subscriber: @1D_Inc
I made 2 tests and it is totally unpredictable: it is relative to average island size BUT! for smaller islands it makes bigger margins…
@lichtwerk so it looks like it counter-proportional to island size… It is just wrong and should not work like this.
So the minimal request is fixed UV-relative size where 0.01 is 1% of UV.
OFC no hurry and low priority because no one will pack with vanilla packer for production.
@1D_Inc look here, you will «like» such weird thing. How do you call it? Workflow bug?
there is no way to count it as far as it "work" this way
I would call this a gamedev workflow issue, or better - a gamedev workflow limitation.
Such problems are not bugs, but they represent serious limitations of the scope of a program.
Unlike other workflows, precise UV margin in pixels is a gamedev modeling workflow requirement.
If it is assumed that Blender is supposed to be used for producing gamedev (up to AAA) models, it should contain the ability to set precise UV margins in pixels.
Mipmapping depends on pixels anyway.
So it is good to keep margin big enough, but not too big (and save some UV space)
Sure, in the game-design it is more desirable option.
Well, yes, however, it is not a bug or a corrupted/lost functionality (it is not a workflow issue that arose as a result of a redesign process), so I am not sure that a bugtracker is an appropriate place for it.
It appears to be a better fit for an improvement proposal format to expand the scope of the program to meet the requirements of an industry-demanded workflows.
Current realization is working and is still useful, but for a limited range of modeling workflows - like architectural modeling, where you don't care as much about UV because that's where you can afford just about any kind of UV mess.
Added subscriber: @DanielBystedt
@DanielBystedt was planning some gamedev-related UV enhancements, you can check if such a functionality was proposed by him.
https://developer.blender.org/project/board/115/
It could also be related to this task by Felinto.
https://developer.blender.org/T68889
Added subscriber: @Chris_Blackbourn
(hopefully) coming soon
Good!
With D16121 Choose "Fraction" for the Margin Method
Looks interesting!
I guess, the next step value conversion to pixels?
By the way, a link to an explanation why values in pixels are important (in case if it wasn't clarified properly)
http://wiki.polycount.com/wiki/Edge_padding
(Also, some UV unwrappers has the ability to display margins borders visually - which is mostly used for manual packing or checking the result)
Aye, you can enter pixels manually as a fraction, e.g. write "4/256" into the
Island Margin
text entryI didn't put them in D16121 because if the texture is non-square, (e.g. 305px * 713px), then internally the pixel margin becomes two different values,
margin_u
andmargin_v
, and that would have made the differential a bit more complicated.Feel free to create a new Task for "Pixel" based margin, or any of those texture baking / padding tools.
Looks interesting.
So 4/256 value will represent 4 pixels per 256 pixels side margin value, and all mipmap padding sizes that has the same fraction?
Sounds versatile.
How about to use 256/4 format instead of 4/256?
Or it will decrease while value increases so it will be better readable, but feel counterintuitive?
From other side, its fraction anyway, and the resulting value will be easier to store and manipulate with ...
I have tested this approach and it do not work.
Because fraction do not related to UV size, it related to average island size ore something like this.
But I even do not want to test it, because there should be predictable value.
Hi @Vyach , apologies, you will first need to apply the Differential in D16121, build a custom version of Blender, and then select the new "Fraction" margin method to test.
The fraction will be related to the 0..1 unit square, so if your texture is 256 pixels wide, then entering "4/256" == 0.015625 will correspond to a 4 pixel margin around each island, giving a total of 4+4=8 pixels between islands.
We will most likely eventually add a "Pixel" margin method, but as discussed above, specifying a pixel-margin makes the code quite a bit more complicated because the user can have a texture where the width and height are different. That extra complexity is not supported in the current Differential.
Oh, I see. Sadly I can
t build by myself. But okay, I see the Idea. Fraction is okay for me, it is flexible and do not bonded to image/resolution, only to UV 0—1 But on the user side i know, many ppl would prefer two digits: pixels and image resolution. And in case if image opened and seen under UV — just to use/get it
s resolution.So idk, may be both will be fine as options.
Anyway i would be glad to have any of two if method will allow to set pixel size manually and will not break when image is non-quad.
This issue was referenced by
c2256bf7f7
Changed status from 'Needs Developer To Reproduce' to: 'Resolved'
Hi @Vyach , have you been able to test this in the nightly build? Are you still wanting the 'pixel' option, or is it okay as is?
Yes, tested. Now fraction mode works properly after unwrap too (fixed bug)
And yes, thats enough for me as pixel magin, thanks!