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

Ggraffiti entites don't appear to line up quite right(?) #11

Open
KaylebJay opened this issue Apr 7, 2024 · 7 comments
Open

Ggraffiti entites don't appear to line up quite right(?) #11

KaylebJay opened this issue Apr 7, 2024 · 7 comments
Labels
bug Something isn't working needs reproduction steps

Comments

@KaylebJay
Copy link

To reproduce:

Graffiti four nodes completely with different colors, all on the same plane.
There seem to be small glitches between the graffiti entities, maybe z-fighting?

Tested on Minetest 5.8.0 with a few custom commits unrelated to this

@grorp
Copy link
Owner

grorp commented Apr 8, 2024

Hmm, I don't really know what you mean. This is how it looks for me:

screenshot 1
screenshot 2

(Minetest 5.8.0 with shaders disabled and 16x FSAA)

There is an offset of 0.001 units between the node surface and the graffiti entity to prevent Z-fighting between them. However, that offset shouldn't result in glitches since it's the same for all graffiti entities on the same plane.

@KaylebJay
Copy link
Author

Hmmm, not sure how to reproduce it then. For me, I see tiny glitches between the painting entities (picture attached - it's the little line on the right). I'm on 5.8.0 with shaders disabled as well (not sure about FSAA).
screenshot_20240406_192333

@grorp
Copy link
Owner

grorp commented Apr 15, 2024

  1. First things first: Is your version of ggraffiti modified somehow?

  2. Looking at your screenshot, this doesn't seem to happen in all cases / between all canvases. When does it happen, when not?

    specific directions, axes, mapblock borders, every second node, specific nodes, ... ?

@KaylebJay
Copy link
Author

After more testing, this seems to have to do with the distance between the node and the ggraffiti entity being too small. How can I extend this value a bit and see if it fixes things for me?

@grorp
Copy link
Owner

grorp commented May 2, 2024

How did you come to this conclusion?

The value are the 0.001 in these two places (both must be the same):

vector_prerot(vector.new(0, 0, rot_box_size.z * 0.501), canvas_prerot)

vector_prerot(vector.new(0, 0, rot_box_size.z * 0.501), self_prerot)

Changing it for an existing world may result in existing canvases not being found anymore. To avoid that, you can increase this value:

shared.EPSILON = 0.0001

@KaylebJay
Copy link
Author

It was just a guess, because in certain cases I got z-fighting, which would suggest that the surfaces are on the same plane. This still appears to be an issue in our world - since you're now in our repo, maybe try painting on some canvas blocks in a similar way to the original screenshot and see if you get z-fighting or other glitches?

Otherwise, if you join Tunnelers' Abyss briefly I could teleport you to the location and you could tell me if you see z-fighting/glitches - it could just be a client issue, I guess, and I've only tested it on two computers.

@KaylebJay
Copy link
Author

@grorp I have a new theory - maybe try the same thing you did before, but near the bottom of the world, and see if there are any glitches? Then maybe on one of the edges of the world too. I just noticed that the painting in question is in a pretty deep spot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs reproduction steps
Projects
None yet
Development

No branches or pull requests

2 participants