-
-
Notifications
You must be signed in to change notification settings - Fork 327
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
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 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.) |
…Org/Makie.jl into ff/GeometryBasics_refactor
Merged
SimonDanisch
added a commit
that referenced
this pull request
Dec 13, 2024
* update CI * update versions * dont test on branch push (already runs for prs against master) * fix versions * Updates for GeometryBasics refactor (#4319) * get Makie to compile * get GLMakie to compile * fix nromal rename, meshscatter * fix pointtype in mesh conversion * avoid matrix in vector rotation * fix more tests * update GeometryBasics functions/interface * fix voronoiplot clipping * update CairoMakie * update RPRMakie * prepare WGLMakie * Update CI to use the GeometryBasics refactor branch (#4326) * Update ci.yml * Update Docs.yml * Update reference_tests.yml * add MeshIO branch --------- Co-authored-by: ffreyer <[email protected]> * update _faces * normals -> normal * add ShaderAbstractions to ci * update docs, normals deprecation * fix branch names * fix catmesh getting normals regenerated * update for ShaderAbstractions * handle voxel clipping in CairoMakie like in GLMakie * fix another two "normals" * add dev branches for RPRMakie CI * fix missing kwarg name in conversion * update for FaceViews * add example for per-face colors and normals * improve typing * fix Sampler, allow mipmap via Sampler * try to fix benchmarks * add to correct env * remove from master project * fix docs * fix Rect decomposition * fix poly converts * fix typo * improve precompilation by avoiding constprop and more direct icon loading via PNGFiles * fix CairoMakie precompile * fix old syntax * fix ambient light * add temp dependencies to relocatbility test * bump RPR to required version * update changelog * fix test * fix other branch in ray cast test * fix relocatability ci * fix rpr and relocatability --------- Co-authored-by: Anshul Singhvi <[email protected]> Co-authored-by: SimonDanisch <[email protected]> * rename clear_faceviews * update GeometryBasics dev branch * update CI * more CI bumps * fix relocatibility CI * fix 2x2 surface * fix CairoMakie * fix WGLMakie 2x2 surface * fix picking tests * remove reliance on Rect mesh generation * Metamesh and multi mesh loading (#4496) * prototype `mesh(::MetaMesh)` * tweak default color handling * add refimg test * add docs * add fallback for MetaMesh * update CI dependencies * try matching file without capitalization * fix CairoMakie, WGLMakie test errors * exclude from CairoMakie --------- Co-authored-by: ffreyer <[email protected]> * rename Tesselation -> Tessellation (#4564) * try fix benchmark * regenerate bundled * update Changelog [skip CI] * allow GeometryBasics 0.5 [skip ci] * Change automatic color generation for Voronoiplot (#4357) * Chane color generation * Changelog --------- Co-authored-by: Simon <[email protected]> Co-authored-by: Frederic Freyer <[email protected]> * add precompile for refreshcallback * try gc() between compile timings * update GeometryBasics, MeshIO versions * update ShaderAbstractions & CI * remove branches from relocatability * remove dev branches from docs * Split marker_offset from quad_offset (#4594) * split marker_offset from quad_offset * add test * fix typo * add 3D tests * fix FastPixel scaling with marker_offset in data space * improve test, remove old * fix CairoMakie image scatter offset * tweak test some more * test marker_offset with 2D and 3D rotations * fix 2D rotation + marker_offset + Rect in CairoMakie * exclude 3D test in CairoMakie * fix test error * 1.6 compat * update changelog * add attribute example * remove TODO * Add `transform_marker` attribute to meshscatter (#4606) * add transform_marker attribute * add refimg test * update changelog * allow mesh with no normals in mesh3d path * cleanup mesh3d transformation pipeline * add test * apply f32c.scale to meshscatter vertices in GLMakie, WGLMakie * fix WGLMakie * tweak test to include significant float32convert scaling * fix voxels * remove f32c + transform func tests (doesn't check what its supposed to) * fix wrong order for f32convert and model * fix double translation with transform_marker = true * fix unwanted model application with transform_marker = false * make limits static in test * test model + transform_marker with f32c and transform func * update and test boundingbox with transform_marker * Makie.rotate! * remove initial refimg test * update changelog * fix missing newline * fix deprecated normals * Add zooming & translation controls to Axis3 (#4131) * zoom prototype * add zooming as an Interaction * add limit reset * add translation * make translation more accurate * add docstrings * fix x/y/z reversed * update changelog [skip ci] * move code to the right places * fix corrupted gl state * fix CairoMakie text - clip planes interaction * remove comment * reuse and conform to existing infrastructure * add docs for Axis3 interactions * add unit tests & fix zoom coordinate system * do plot picking ray cast as part of :cursor zoom * remove old code * match zoom direction with Axis, LScene * update tests * add viewmode = :free * tweak refimg to include perspectiveness and be less wide * fix some test failures * revert change to decorations * fix backend dependency of new refimg * fix var name in new test * avoid rendering issues from too small near * skip irrelevant code for viewmode = :free * fix aspect problems with translations * cleanup some stuff * reuse in-axis translations for viewmode = :free * add center-on-cursor interaction * fix limit reset not resetting targetlimits * fix position_on_plot error for 2D meshes * move framelines to 3D scene to avoid line inversion issue Which comes from just doing xyz/w in inversions. This is not valid if w <= 0, at least with perspective projection * use Float64 * bandaid fix for render order * Change LimitReset to more closely match Axis * update docs * fix offset between ticks and grid/frame * fix test error * add test for project(scene, point) * add option to clip decorations (default on) * use viewport for clipping * don't clip decorations by default because it clips titles and too much of labels/tick labels * make test more robust --------- Co-authored-by: Simon <[email protected]> * Fix Float32 constraints in poly pipeline (#4615) * Fix Float32 constraints in poly pipeline Also fix dimensionality constraints * changelog * Update poly.jl * Update poly.jl --------- Co-authored-by: Simon <[email protected]> * try fixing memory leak * aggressively clean up objects * check screen outside animationframe + upload electron logs in CI * Clean up CI + CHangelog * Update CHANGELOG.md --------- Co-authored-by: Anshul Singhvi <[email protected]> Co-authored-by: SimonDanisch <[email protected]> Co-authored-by: Daniel VandenHeuvel <[email protected]>
ffreyer
added a commit
that referenced
this pull request
Dec 16, 2024
* Added field fullbox to controll if the full box of Framelines is drawn. Added fields xspinecolor_4, yspinecolor_4 and zspinecolor_4 to control the color of the 4th line when the fullbox is drawn. * Renamed function to_topscene_z_2d into to_topscene_small_z_2d. Createted function to_topscene_big_z_2d to project points into parent space with a big z value * Renamed varaiable framepoints to framepoints_main. Added variable fraimpoints_fullbox replicating the functionality of assining to framepoints_main using p7 and p8 and the function to_topscene_big_z_2d. Added an if statement to add the front lines of the fullbox if the field fullbox od Axis3 is true. * Correctet/removed coments * Added spinecolor_4 to theme_black. * Create the fullbox lines anyway, just controll visibility by ax.fullbox && attr(:spinesvisible). * Changed the name "fullbox" into "front_spines" * spine_color * Update CHANGELOG.md * update CI * update versions * dont test on branch push (already runs for prs against master) * fix versions * Updates for GeometryBasics refactor (#4319) * get Makie to compile * get GLMakie to compile * fix nromal rename, meshscatter * fix pointtype in mesh conversion * avoid matrix in vector rotation * fix more tests * update GeometryBasics functions/interface * fix voronoiplot clipping * update CairoMakie * update RPRMakie * prepare WGLMakie * Update CI to use the GeometryBasics refactor branch (#4326) * Update ci.yml * Update Docs.yml * Update reference_tests.yml * add MeshIO branch --------- Co-authored-by: ffreyer <[email protected]> * update _faces * normals -> normal * add ShaderAbstractions to ci * update docs, normals deprecation * fix branch names * fix catmesh getting normals regenerated * update for ShaderAbstractions * handle voxel clipping in CairoMakie like in GLMakie * fix another two "normals" * add dev branches for RPRMakie CI * fix missing kwarg name in conversion * update for FaceViews * add example for per-face colors and normals * improve typing * fix Sampler, allow mipmap via Sampler * try to fix benchmarks * add to correct env * remove from master project * fix docs * fix Rect decomposition * fix poly converts * fix typo * improve precompilation by avoiding constprop and more direct icon loading via PNGFiles * fix CairoMakie precompile * fix old syntax * fix ambient light * add temp dependencies to relocatbility test * bump RPR to required version * update changelog * fix test * fix other branch in ray cast test * fix relocatability ci * fix rpr and relocatability --------- Co-authored-by: Anshul Singhvi <[email protected]> Co-authored-by: SimonDanisch <[email protected]> * rename clear_faceviews * update GeometryBasics dev branch * update CI * more CI bumps * fix relocatibility CI * fix 2x2 surface * fix CairoMakie * fix WGLMakie 2x2 surface * fix picking tests * remove reliance on Rect mesh generation * Metamesh and multi mesh loading (#4496) * prototype `mesh(::MetaMesh)` * tweak default color handling * add refimg test * add docs * add fallback for MetaMesh * update CI dependencies * try matching file without capitalization * fix CairoMakie, WGLMakie test errors * exclude from CairoMakie --------- Co-authored-by: ffreyer <[email protected]> * rename Tesselation -> Tessellation (#4564) * try fix benchmark * regenerate bundled * update Changelog [skip CI] * allow GeometryBasics 0.5 [skip ci] * Change automatic color generation for Voronoiplot (#4357) * Chane color generation * Changelog --------- Co-authored-by: Simon <[email protected]> Co-authored-by: Frederic Freyer <[email protected]> * add precompile for refreshcallback * try gc() between compile timings * update GeometryBasics, MeshIO versions * update ShaderAbstractions & CI * remove branches from relocatability * remove dev branches from docs * Split marker_offset from quad_offset (#4594) * split marker_offset from quad_offset * add test * fix typo * add 3D tests * fix FastPixel scaling with marker_offset in data space * improve test, remove old * fix CairoMakie image scatter offset * tweak test some more * test marker_offset with 2D and 3D rotations * fix 2D rotation + marker_offset + Rect in CairoMakie * exclude 3D test in CairoMakie * fix test error * 1.6 compat * update changelog * add attribute example * remove TODO * Add `transform_marker` attribute to meshscatter (#4606) * add transform_marker attribute * add refimg test * update changelog * allow mesh with no normals in mesh3d path * cleanup mesh3d transformation pipeline * add test * apply f32c.scale to meshscatter vertices in GLMakie, WGLMakie * fix WGLMakie * tweak test to include significant float32convert scaling * fix voxels * remove f32c + transform func tests (doesn't check what its supposed to) * fix wrong order for f32convert and model * fix double translation with transform_marker = true * fix unwanted model application with transform_marker = false * make limits static in test * test model + transform_marker with f32c and transform func * update and test boundingbox with transform_marker * Makie.rotate! * remove initial refimg test * update changelog * fix missing newline * fix deprecated normals * Add zooming & translation controls to Axis3 (#4131) * zoom prototype * add zooming as an Interaction * add limit reset * add translation * make translation more accurate * add docstrings * fix x/y/z reversed * update changelog [skip ci] * move code to the right places * fix corrupted gl state * fix CairoMakie text - clip planes interaction * remove comment * reuse and conform to existing infrastructure * add docs for Axis3 interactions * add unit tests & fix zoom coordinate system * do plot picking ray cast as part of :cursor zoom * remove old code * match zoom direction with Axis, LScene * update tests * add viewmode = :free * tweak refimg to include perspectiveness and be less wide * fix some test failures * revert change to decorations * fix backend dependency of new refimg * fix var name in new test * avoid rendering issues from too small near * skip irrelevant code for viewmode = :free * fix aspect problems with translations * cleanup some stuff * reuse in-axis translations for viewmode = :free * add center-on-cursor interaction * fix limit reset not resetting targetlimits * fix position_on_plot error for 2D meshes * move framelines to 3D scene to avoid line inversion issue Which comes from just doing xyz/w in inversions. This is not valid if w <= 0, at least with perspective projection * use Float64 * bandaid fix for render order * Change LimitReset to more closely match Axis * update docs * fix offset between ticks and grid/frame * fix test error * add test for project(scene, point) * add option to clip decorations (default on) * use viewport for clipping * don't clip decorations by default because it clips titles and too much of labels/tick labels * make test more robust --------- Co-authored-by: Simon <[email protected]> * Fix Float32 constraints in poly pipeline (#4615) * Fix Float32 constraints in poly pipeline Also fix dimensionality constraints * changelog * Update poly.jl * Update poly.jl --------- Co-authored-by: Simon <[email protected]> * try fixing memory leak * aggressively clean up objects * check screen outside animationframe + upload electron logs in CI * Clean up CI + CHangelog * Update CHANGELOG.md * fix merge, cleanup * add refimg test * add Sphere to verify z-order and check for artifacts * fiddle with rendering so that WGLMakie, CairoMakie order frame lines correctly without GLMakie, WGLMakie artifacting + tweak test --------- Co-authored-by: ffreyer <[email protected]> Co-authored-by: Simon <[email protected]> Co-authored-by: Anshul Singhvi <[email protected]> Co-authored-by: Daniel VandenHeuvel <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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