GSoC 2021 Proposal Draft - UV Editor Improvements

This is a draft and not the final proposal. I will be making changes to this draft before final submission, but till then I would like to collect feedback from the community and developers regarding the ideas mentioned. Any form of feedback is welcome and I’m open to any discussions that may concern the clarity of ideas, scope of the project and adding/substituting new ideas.

Name

Siddhartha Ajay Jejurkar

Contact

Email : [email protected]
blender.chat nickname : sidd017
Devtalk : sidd017
ID on developer.blender.org : sidd017

Synopsis

Many users have requested features and suggested improvements to certain existing UV Editor tools. A good subset of the suggested improvements and smaller requests make ideal tasks that can be accomplished in a GSoC project. By the end of this project, users will have a new set of tools and features that will help speed up UV editing workflows and provide more flexibility to the the UV editor.

Benefits

This project will implement user suggested improvements to existing UV Editor tools and also add some new tools/features. The plan is to make the UV editor in Blender, more approachable for newcomers while also providing a new set of tools for more experienced users to work with. Operations such as packing and moving UV islands across UDIM tiles will be improved, while new options for snapping will be added.

Deliverables

  • Improvements to the Pack islands operator
  • New features and Improvements to Snapping option(s) in the UV editor
  1. Dynamic grid
  2. New option for grid snapping in the UV editor
  • Features to simplify moving UVs across UDIM tiles
  1. Add new key bindings to navigate through UDIM tiles
  2. Direct snapping selections to user specified UDIM target
  • User documentation and notes

Project Details

Improvements to the Pack islands operator :

Presently the operator will pack the selected islands to the first UDIM tile(1001), even if the islands were originally placed on a different UDIM.(see T78397)

Default behavior of the operator can be changed to pack the selected islands to the same UDIM tile they were originally placed on and an option can be added to the UI where the user can specify the target UDIM for packing.

The target UDIM can be specified either through the tile number or tile label.

Example use case - Suppose the user selects UV islands present on UDIM 1012, the operator will by default pack the islands to UDIM-1012 (from the UI mockup) and in case a target UDIM 1002 is specified then they will be packed to 1002 instead.

New features and Improvements to UV Editor Snapping option(s):

Presently increment snapping in the UV editor works with fixed values of 0.0625 units and 0.03125 units with the shift key-binding. There are many use cases where it would be beneficial if the user could have more control over the increment value. One such case is when the user is working with UDIM tiles of different texture sizes, for example - 1K and 8K.

I plan on implementing 2 improvements for this :

  1. Implement Dynamic grid and add a new option for Grid Snapping -
    This will be a 2 step implementation :
  • Dynamic grid (T78389)

    I will be following the description for the dynamic grid implementation given in T78389. The basic idea here is that the user can change the number of grids that make up one UV unit. Note that original UV unit length will always remain the same.

    In the UI mockup the user defines the size of the dynamic grid=4.

    Value of 4 would mean 4x4 grids is equal to one UV unit (constant).

  • New option for Grid Snapping (T78391)

    A new option for Grid snapping will be added to the snap settings in the UV Editor. As the name suggests the selections will snap to the UV grid and this will also work with the dynamic grid implementation specified above.

    I will be implementing Grid snapping with the intended behavior similar to T78391.

  1. Option to change the default increment value -
    Let the user define the increment value by providing an option to change the default value of 0.0625 units. A simple UI mockup can look like this :

    The UI mockup demonstrates an example case where the user has specified an increment value of 0.25

Features to simplify moving UVs across UDIM tiles in UV editor

Presently islands can be moved to different UDIM tiles by moving them freely in UV space. 2 functionalities can be added to make this task more organised and simpler :

  1. Use CTRL+ARROW KEYS to move the selected UVs to neighbouring UDIM tiles. Example - pressing CTRL+LEFT will shift the selected UVs to the neighbouring UDIM on the left. This will eliminate the task of specifying an offset when moving selections between UDIM tiles. I will also implement some more features with their suggested key bindings described in T78405.
  2. Provide an option in the UI where the user can specify the target UDIM tile. This is useful when there are many UDIM tiles present in the editor (current limit is 10x10=100 tiles). Directly specifying the target tile would eliminate the need for the user to blindly navigate/search for the required UDIM tile in an already populated UV space.

Secondary tasks :

This will be a list of secondary targets for improving UV editing, and ideas in this list will be populated based on user/community suggestions and tasks listed on the UV editing workboard.

Project Schedule

As per the official University schedule, final exams for the current semester will conclude on 13th May.
Until the official announcement (17th May), I will spend time learning more about the code-base and working on tasks and bugs listed on the UV editing workboard.

Community Bonding period (May 17 to June 7)

During this period I will finalize the details of the tasks such as the design (specifically the UI), implementation logic and the edge cases that will need to be addressed during testing. I will also be actively collecting more ideas from community/user suggestions and RCS to include and prioritize in the list of secondary tasks.

WEEK 1-2 : Implement deliverable 1 - Improvements to the Pack islands operator

WEEK 3-4-5 : Implement deliverable 2 - Improve Snapping option(s) for UV editor

WEEK 6-7 : Implement deliverable 2 - Simplify moving UVs across UDIM tiles in UV editor

WEEK 8-9 : Buffer period since next semester may start early. I’ll be completing pending tasks, backlogs and collecting user feedback/bug reports for all deliverables. Major bugs and deviations from intended behavior will be addressed during this period

WEEK 8-9 : Code clean up and documentation

This is a tentative schedule and I expect tasks to take longer or finish earlier than expected.

Bio

I’m Siddhartha Jejurkar, a 3rd year undergraduate student at BITS Pilani K K Birla Goa Campus, India pursuing my major in Electronics and Electrical engineering. I’ve been using Blender for about 2 years and I first started by completing the famous doughnuts tutorial on 2.79. Since then I have used Blender along with Unity and Unreal Engine for many personal projects related to game development, some of which I have uploaded here.

I got into graphics programming at the end of my second year and since then I have been learning about OpenGL and various rendering techniques. Regarding my background in programming :

  • Have used C++ for about a year and half. Mostly used for learning OpenGL and writing a simple path tracer following along Peter Shirley’s book on Ray tracing. C++ is also my preferred language for competitive coding and solving DSA problems

  • Used C# for gameplay programming in Unity

  • Used Java for University course on OOP

  • Also worked with Python but mostly for smaller tasks and problem solving

I started contributing to Blender about 2 months ago and have enjoyed my journey so far. I have submitted 5 small patches so far :

  • D10658 (DNA defaults for Unified paint settings)

  • D10743 (DNA defaults for sculpt and paint structs)

  • D10694 (Minor bug fix for fluid diffusion preset)

  • D10833 (Add missing tooltips for UV pivot options)

  • D10830 (Bug fix - Add missing selection check for UV Sync selection)

I haven’t worked on any major tasks or patches yet, but hope that GSoC will provide that opportunity and I can continue contributing to Blender after the summer program as well.

30 Likes

Blender is allowing to create UDIM tiles.
But packing operator does not take them into account.

It would be welcomed to have a way to pack Islands to a specified UDIM tile without having to draw a region border.

4 Likes

this may be out of scope, but I would like some kind of python function to get all of the faces in an island. since Blender has no concept of an “island” we’re forced to use flood fill algorithms to find islands which is extremely slow.

things like straightening and mirroring UVs are great- but addons have been bridging this gap for years with a less than adequate API- it would be nice to get a little tiny bit of API love in return.

It would be very welcomed. There are some tasks tackling UV shortcomings authored by Daniel Bystedt , but I don’t know how are they going.

One welcomed addition would be the ability to select/stack similar UV islands. AFAIK it isn’t implemented yet

I know that it is old, but time ago in a ¿GSOC? was implemented a new unwrap system that was really good but never ended. Could be a target or out of the scope?

1 Like

yeah i think it was GSOC 2016, or somewhere in that neighborhood anyway. I remember that- there’s still a branch for it and everything. I think it even had some packing improvements… I don’t think we ever got any closure on that one, it had a lot of momentum and then just disappeared

1 Like

Thanks for the suggestion @RonanDucluzeau
I agree, this would be a good addition to include with pack islands and the idea is quite similar to T78397.

I haven’t looked at how UDIM is implemented in Blender’s code so that’s probably the first place I’ll start with. If the task is doable within the GSoC timeframe I will consider adding it to the proposal.

Hey @testure, while this is something that should be looked into, unfortunately this falls out of scope for GSoC. I can look into this after the summer, since I plan to continue contributing to Blender outside of GSoC as well.

2 Likes

Many user would welcome match scale island to stitched island scale - using Average Island Scale is not always desirable.

Pattern checker - I guess it’s out of scope because it’s more a viewport thing.

Also, here is documentation for 2016 GSOC UV improvements

2 Likes

Thanks for the feedback @txo !

I have indeed looked into those tasks and shortlisted a few, but I’m still familiarising myself with the code so it’ll take some time to evaluate which tasks would be feasible considering the shorter duration of GSoC this year.

There is actually a task created for this - T47437 and I intend to work on this before GSoC begins since it is tagged as Good First Issue .

2 Likes

Thanks for the feedback and suggestions @jacek007g!
I’m currently busy at the moment. I’ll definitely take a look at your suggestions once I get some free time.

@Alberto implementing a new system for UV unwrapping might be out of scope since the time commitment for GSoC this year has been reduced.

I actually wasn’t aware about this

1 Like

I talked about to complete the GSOC that was near to be completed but the dev leave the rpoject, not to create a new unwrap.

Oh man… THE thing I hope to see in the Blender UV editor someday is, a proper/actual iterative relax method… ! :open_mouth: :pray: That’s the main reason I go back to other DCCs yet… since there is nothing i’ve seen in blender that can do a proper/actual relax…

An algorithm that takes into account the 3D Mesh/shape and conforms the UVs in a way to match/respect that, and not do whatever it wants, would be amazing.

I would post videos as reference, but it’s “naughty” to post videos/links to other DCCs…

Actually maybe this is ok…

2 Likes

Are you talking about this ?

There is an task on d.b.o but nothing new happened in 3 years.

4 Likes

Yes, I tried the build years ago and I never found a bug or situations where didn’t work. So I suppose that the implementation was in a good point but not complete

Aurel ended up with 2 big patches that should be reviewed by Brecht and Sergey.
It looks like a guy only registered to d.b.o to mess up status of D2530 patch to “changes requested” because he did not succeeded to build the patch.
Maybe that is the reason why Brecht did not continue his review of Aurel changes.
And patch D2531 has not been reviewed at all.

Lost that feature for that stupid reason…

Do you plan to add “overlap check” tool so it’s possible to detect and highlight overlaps on already made islands? Such option is available in UVPackmaster addon and it’s pretty useful.

Like in Magic UV addon?
MagicUV

1 Like

Yes, this is similar, however MagicUV doesn’t detect self-intersecting uv islands or overlapping vertices from same island often generated by bevel. Packmaster also automatically selects vertices/faces so it’s possible to quickly focus overlaps, useful when there are lots of small islands.

2 Likes