-
Notifications
You must be signed in to change notification settings - Fork 124
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
Strange/incorrect sphere shapes #215
Comments
I believe the "normal" sphere uses the distance of the block center to the center point as the deciding criteria for which blocks to consider as the edge. So if the center of the circle is not centered on a block, then I guess it's entirely possible that it will not look symmetrical because the "unsymmetrical distances" on the opposing sides of the sphere result in different blocks being selected as the edge. |
@maruohon The center of the sphere is exactly in the corner of a block though? The block centers of blocks that are symmetric are exactly the same distance from it. For example sphere with center at (0, 63, 0) and radius of 6. Two gold blocks whose centers are at (3.5, 66.5, 3.5) and (-3.5, 66.5, 3.5). The distance is sqrt((3.5^2)*3)=6.062177826. Left one is included in the sphere but right one is not |
Yep that is certainly weird when the center is at the corner of the blocks. I haven't properly debugged this yet, but it might be a sort of directional preference in the way the code builds the "rings" by walking around the perimeter. Maybe it's not properly trying all the required sides when it comes to the points where the "outside direction vector" kinda changes. I'll need to take a proper look at it at some point soon. |
@HiggsBogan Is the center point, block snap setting and radius exactly the same as before? If you didn't use a block snap setting and you moved the center point even slightly, then it's possible that the positions changed like this. What version of the mod did you use before? If this was all in the 1.18+ versions, then I don't think I changed anything yet with the sphere stuff since the first "official" 1.18.0 release. I did rewrite some of the sphere stuff recently at one point, but I think it was leading up to the full 1.18.0 release. I decided to leave the fixes this issue report is related to, to the bigger mod rewrites that are happening in 1.12.2, as I may need to or want to rewrite some more of how the shapes are generated, so I didn't want to delay the 1.18.2 updates further. So it's also possible that the sphere is just slightly crooked depending on the center point in relation to the block bounds (apparently). But even so it shouldn't change over time if the center and the settings remain the same. |
Has there been any update on this bug? I am encountering the same issue. It seems to me like the misshapen side is always on the west, regardless of any combination of settings. I notice the images provided by the OP also show errors on the west side only. As is, I consider the sphere tool to be unusable. |
Still present in 1.19.2. |
Still present in 1.20.1. |
Before creating my issue, I failed to use the search function to figure out if this was already reported. I had the same issue wiuth spheres. It does not matter what snap method is used. The sphere is always asymetrical. Cylinders shapes ARE symetrical so my guess is that the function to calculate the points on the sphere is faulty (My guess is that the floating point arythmetic is incorrect. Ssome rounding issue? Using integers where floating/fixed point values ought to be used?).. |
Still an issue in 1.20.4 |
I am aware of it, I just haven't had a chance to look at it yet (1.20.6/1.21) |
I guess in the meantime the only fix is to make a cylinder with a radius of +1/-1 for each increment of y level Very very very inconvenient but it's better than a wrong sphere Maruohon, like, disable the sphere feature until it's fixed. |
I built something with this, unaware that it was not correct. Please disable the feature until fixed. |
That's a cone my brother, not a sphere. |
This issue still persists in Java 1.21.4! (Latest Minihud as of 12/13/24) Clearly these are not perfect spheres even when using the sphere shape in Minihud. They also don't agree with: https://www.plotz.co.uk/plotz-model.php?model=Sphere which I know has correct dimensions. Please fix this stat! Seems like the most basic feature of Minihud doesn't work correctly: |
Minecraft version: 1.18.1
MiniHUD version: 0.21.3
When using Sphere block-based generator I noticed strange behavior: generated spheres are often not symmetrical, especially when using block snap corner or none options. Adjustable spawn sphere seems to produce better results.
Attached is an example for this behavior. You can see that on the right side there are several extra blocks.
The text was updated successfully, but these errors were encountered: