-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
makie.surface generates incomplete meshes #4227
Comments
This doesn't look like a whole, but rather incorrect normals |
I didn't know much about computer graphics, so I wasn't sure what proper noun to use to describe the object, so... I chose a more vivid one :) |
For what it's worth, I also get this when using a planar to spherical transform_func. Except the poles are basically gaps then, you can see through them. |
I'm pretty sure this isn't new. Maybe I'll come across another issue pointing this out in the coming days. My guess would be that because the points fall on top of each other the shader ends up calculating |
Related: #3624 Hmm, weird, I can't reproduce this with GLMakie and WGLMakie. Maybe there's some GPU dependency in this too |
#4735 has added more aggressive/complete nan checks which I believe fixed this. If this persists in the next release we can reopen the issue |
Unfortunately not fixed on M1 (tested on latest master, commit de99964) ![]() ![]() |
@ffreyer I guess we'll need |
Hmm, maybe I was barking at the wrong tree. The nan checks in normal gen are for nan positions, but we don't have those here Makie.jl/GLMakie/assets/shader/surface.vert Lines 94 to 98 in de99964
Maybe it's a div by 0 in normalize? Makie.jl/GLMakie/assets/shader/surface.vert Line 106 in de99964
maybe that needs something like float n = length(result);
return n < 1e-20 ? result : (invert_normals ? -1.0 : 1.0) / n * result; |
@ffreyer your suggested fix works, now I get this: ![]() I also tried replacing Should we just add that line to the surface shader, or does this also merit changes in mesh? |
Yea, just add the normalize replacement then. Mesh shouldn't have anything to do with it. For isnan, could you check if this test produces the right image? If that doesn't reproduce the isnan replacement would probably fix it Makie.jl/ReferenceTests/src/tests/primitives.jl Lines 638 to 691 in de99964
|
Discourse: There’s a hole in a sphere generated by makie.surface
Unlike
mesh(spheremesh)
method, currentsurface(x,y,z)
method leaves a circular hole at the north pole of the ball, see:and sometimes leave an 1. circular hole / 2. irregular hole composed of several black triangular faces at the south pole as well, see:
a MWE would be
v0.21.5
)]activate --temp; add Makie
)Windows / Nvidia
)The text was updated successfully, but these errors were encountered: