-
-
Notifications
You must be signed in to change notification settings - Fork 328
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
Add transform_marker
attribute to meshscatter
#4606
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
transform_marker
attribut eto meshscattertransform_marker
attribute to meshscatter
Benchmark ResultsSHA: 00af282008ee877613bb67a1a622ff6b570010b2 Warning These results are subject to substantial noise because GitHub's CI runs on shared machines that are not ideally suited for benchmarking. |
(doesn't check what its supposed to)
…MakieOrg/Makie.jl into ff/meshscatter-transform-marker
SimonDanisch
approved these changes
Nov 28, 2024
SimonDanisch
approved these changes
Nov 28, 2024
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
Fixes #3323 (with changed default)
This pr adds the
transform_marker
attribute to meshscatter, which controls whethermodel
applies to the scattered mesh or not. I.e. withtransform_marker = false
themarker
used with meshscatter does not get affected bymodel
, only the given positions do.Example:
The current master behavior is
transform_marker = true
. I changed this tofalse
to fix #3323. I also think it generally makes more sense, becausemarkersize
,rotation
and the position argument ofmeshscatter
already do what model does, on a per marker basis.Example from Issue (only changed color):

Other changes
This pr now also includes some fixes to the meshscatter transformation/projection pipeline:
float32convert
andmodel
in CairoMakie projection functions. This should befloat32convert * model * transform_func(positions)
(this also affects other primitives)draw_mesh3D
was always applyingtransform_func
to vertices, which does not match the GLMakie behavior for voxels and meshscatterdraw_mesh3D
did not work without normalsTODO:
Type of change
Checklist