Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeating Textures, new UV Tools and UV options #2427

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

caioraphael1
Copy link

@caioraphael1 caioraphael1 commented Jul 17, 2024

Texture

Added an option for Repeating Textures.

  • Option available in the Texture Properties:
    image

  • Option Off (original behavior):
    image

  • Option On (new behavior):
    image

  • This closes [suggestion] support repeating textures #1391

  • (It's not yet possible to paint the repeating regions in the mesh itself. The brush won't paint anything unless using the brush in a "valid" region of the mesh, where it's not repeating any segment of the texture)

UV

New tool to toggle 'Snap UV to Image Bounds'

  • When the tool is disabled, is possible to:
    • Cube with Box-UV:
      • 'drag move / scale / rotate' UV Faces
    • Cube with Per-face-UV:
      • 'drag move / scale / rotate' UV Faces and UV Edges
    • Meshes with Per-face-UV:
      • 'drag move / scale / rotate' UV Faces and UV Vertices
  • In other words, if the tool is disabled it's now possible to make UV transforms without the UV being locked inside the image bounds.
  • If the tool is enabled, then the old behavior takes place.
  • (It's possible to invert the toggle, but I figure the tool name would be confusing)

New tool to 'Unwrap Mesh Faces', without creating a texture

  • In a nutshell, it's the code from 'texture_generator/generateFaceTemplate', but discarding all the steps to create a new texture and apply it to the object.
  • The tool also has the option to set a "Target Resolution" and "Pixel Density", working just like the 'Texel Density addon for Blender', or similar tools in Maya.
    • The 'Target Resolution' refers to the resolution aimed to be used, while 'Pixel Density' refers to the scale of which the UV should be, based on the Target Resolution.
  • There are also these other options available:
    image

Removal of the Zoom Out limit in the UV panel

  • Considering the additions of all UV tools, It makes more sense to disable to limit to Zoom Out in the UV panel, as it's necessary to be able to make any comfortable modifications for the UV.

UV Overlay rework

  • The UV Overlay is now renamed to UV Show All, as now its only function is to show the UV from all objects.
    • It was its only function before, but it was confusing to use, so I made it more clear what it does.
  • The other UV options are shown normally when clicking with the Right Mouse Button in the UVEditor.
  • The settings option regarding the UV Mode is now an Enum, to properly represent what's happening.
    image

"New" tool to toggle UV visibility in Paint Mode

  • It comes as a consequence of the UV Overlay rework, bringing more clarity to the tool.
    image

Questions

  • The 'package-lock.json' file was updated for me, but I don't know if it's something I should commit.

End

I'm sorry if there's too much change in one PR. This is my first time contributing so I don't know what's the right call. I'm just proposing to change some things that I thought could be better.

That's it, tell me what you think :)

@caioraphael1 caioraphael1 changed the title Repeating Textures, new UV Tools and behaviors Repeating Textures, new UV Tools and UV options Jul 17, 2024
@ReloadedK-git
Copy link

Hi, just wanted to say that I hope this gets merged sooner or later, since it's exactly what I need to properly use blockbench and not having to fiddle with other programs (mainly blender), which makes things complex, time consuming and overall, not fun. Everything works exactly the way I need, minus repeating textures. This deals with the issue, and so I'm grateful you took the time to deal with it. I'll be checking this out from time to time. Thanks!

# Conflicts:
#	lang/zh.json
#	package-lock.json
The UV Overlay is now renamed to UV Show All, as now it's only function is to show the UV from all objects.
     (it was its only function before, but it was confusing to use, so I made it more clear what it does).
The other UV options are shown normally when clicking with the Right Mouse Button in the UVEditor.
The settings option regarding the UV Mode is now an Enum, to properly represent what's happening

# Conflicts:
#	lang/vi.json
#	lang/zh.json
#	lang/zh_tw.json
# Conflicts:
#	lang/vi.json
#	lang/zh.json
#	lang/zh_tw.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[suggestion] support repeating textures
2 participants