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

UV bug #6

Open
BrahRah opened this issue Oct 8, 2023 · 12 comments
Open

UV bug #6

BrahRah opened this issue Oct 8, 2023 · 12 comments

Comments

@BrahRah
Copy link

BrahRah commented Oct 8, 2023

Screenshot 2023-10-08 12:25:22
While painting textures some faces uv gets messed up.

@BrahRah
Copy link
Author

BrahRah commented Oct 8, 2023

Doesn't happen with this version.

@BrahRah BrahRah closed this as completed Oct 8, 2023
@BrahRah BrahRah reopened this Oct 12, 2023
@BrahRah
Copy link
Author

BrahRah commented Oct 12, 2023

I managed to get the issue with this version too. I don't know how but sometimes the uv projection is just lines like this:
Screenshot 2023-10-12 15:32:26

@ionthedev
Copy link
Owner

ionthedev commented Oct 12, 2023

click this when extruding edges to make new faces
image

It should mediate the issue as long as your world units are set to None, this will make each grid 1 pixel large

@BrahRah
Copy link
Author

BrahRah commented Oct 12, 2023

@ionthedev I'm not modeling, I'm painting on a finished model. I've noticed some things. It mainly happens when painting in a certain angle:
Screenshot 2023-10-12 18:53:13

Or when the object is small:
Screenshot 2023-10-12 18:58:25

@BrahRah
Copy link
Author

BrahRah commented Oct 12, 2023

With and without correct face attributes resprytile collapes the uv into that one line.
UV before resprytile:
Screenshot 2023-10-12 18:59:50

UV after painting with resprytile:
Screenshot 2023-10-12 18:59:58

@BrahRah
Copy link
Author

BrahRah commented Oct 13, 2023

I remember blender having had issues with small objects and modifiers/face selection if this is related then maybe a good workaround would be a slider that temporarily increases the objects size without increasing the pixel count. Kinda like zooming in and out but increasing mesh size instead.

@BrahRah
Copy link
Author

BrahRah commented Oct 13, 2023

I've done some more tests and it's possible to get rid of the bug by increasing the size of the object, then using the sprytile paint brush, sizing it back and using the sprytile paint brush again.

@BrahRah
Copy link
Author

BrahRah commented Oct 13, 2023

The pixel projection seem to not work correctly when this is done tho:
Screenshot 2023-10-13 18:27:12

@BrahRah
Copy link
Author

BrahRah commented Oct 13, 2023

Ok it's not just with small sizes and certain angles it also happend to a large object when facing like this:
Screenshot 2023-10-13 18:33:45

@BrahRah
Copy link
Author

BrahRah commented Oct 26, 2023

This should not be closed..... it's a serious problem...

@ionthedev
Copy link
Owner

Resprytile only UV's faces when selecting from the tile palette and generating them that way, For this to have happened, you had to have created new faces and from what I can see in your screenshots the model wasn't unwrapped when you began texture painting.

Resprytile and sprytile adjust the UV of the face you are modifying through means of extrusion, fill or bridge. Unwrap your model and tell me if it works

@ionthedev ionthedev reopened this Oct 27, 2023
@BrahRah
Copy link
Author

BrahRah commented Oct 31, 2023

Blender already had issues unwrapping it:

Screenshot 2023-10-31 11:35:17

I fixed up the uv with zen uv to look like this:
Screenshot 2023-10-31 11:39:51

But when I wanted to paint the palette didn't show:
Screenshot 2023-10-31 11:38:35

So I couldn't test it. A button to open and close the palette would be nice. I'll test it again once the palette shows up again.

Also I've noticed that blender has issues with objects that are smaller then 1 blender unit.

I had to do this:

def is_plane(obj):
    # Define a threshold to determine if an object is a plane
    plane_threshold = 0.1  # Adjust this threshold as needed

    # Get the dimensions of the object
    dimensions = obj.dimensions

    # Check if one of the dimensions is significantly smaller than the other two
    for dimension_index in range(3):
        # Get the current dimension based on the current iteration
        current_dimension = dimensions[dimension_index]
        # Create a list of the other two dimensions by excluding the current one
        other_two_dimensions = [dimensions[dim] for dim in range(3) if dim != dimension_index]
        # Check if the current dimension is significantly smaller than the other two dimensions
        if current_dimension < plane_threshold * min(other_two_dimensions):
            return True

    return False

For my own addon in order to check if the object was a plane or a 3d object. Maybe some of resprytiles issues derive from that blender issue too.

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

No branches or pull requests

2 participants