-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
Updates for GeometryBasics refactor #4319
Conversation
* Update ci.yml * Update Docs.yml * Update reference_tests.yml * add MeshIO branch --------- Co-authored-by: ffreyer <[email protected]>
…Org/Makie.jl into ff/GeometryBasics_refactor
…Org/Makie.jl into ff/GeometryBasics_refactor
The refactor now makes it easier to work with per-face attributes, so I added an example to the mesh docs: using GeometryBasics
# Reduce quality of sphere
s = Tesselation(Sphere(Point3f(0), 1f0), 12)
ps = coordinates(s)
fs = faces(s)
# Use a FaceView to with a new set of faces which refer to one color per face.
# Each face must have the same length as the respective face in fs.
# (Using the same face type guarantees this)
FT = eltype(fs); N = length(fs)
cs = FaceView(rand(RGBf, N), [FT(i) for i in 1:N])
# generate normals per face (this creates a FaceView as well)
ns = face_normals(ps, fs)
# Create mesh
m = GeometryBasics.mesh(ps, fs, normal = ns, color = cs)
mesh(m) (This still requires vertex duplication, it just happens automatically now.) |
|
||
# For correct z-ordering we need to be in view/camera or screen space | ||
model = copy(primitive.model[]) | ||
model = copy(primitive.model[])::Mat4d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems weird to copy an immutable? Not part of this PR, but still we may want to remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may come from my first attempt to get 3D meshes working in CairoMakie where I didn't know what kind of types to expect. I guess technically you could do plot(..., model = rand(4, 4)
and pass a Base.Matrix, but iirc this errored when copy(::Mat4d) was generating a Base.Matrix anyway...
…ding via PNGFiles
…Org/Makie.jl into ff/GeometryBasics_refactor
Description
Requires:
Version bumps:
This is still in prototyping stage as I'm looking what things GeometryBasics is missing/should do.
TODO:
All RPRMakie examples run with JuliaGraphics/RadeonProRender.jl#22 except for:
I'm not familiar enough with RPRMakie to say they look correct with confidence, but most look good to me. I'm not sure what to make of
eat_topographie_sphere.jl
(that's not a sphere?) and "volume.jl", they might be wrong.Test failures:
(:red, 0.5)
, so this seems more correct to me here. I'm just confused why it's different here at allshading of catmesh changed, seams visiblefixedCairoMakie Merged color Mesh changebut that's expected due to updates to vertex orderCairoMakie voxel clipping looks more odd because triangle faces have shifted orientationfixed via Cleanup voxel clipping #4397Issues:
GeometryBasics
such asTetrahedron
#3705 now as far as I can tellType of change
Checklist