Skip to content
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

Make Makie.mesh compatible with MultiMesh (GeometryBasics refactor) #4368

Draft
wants to merge 1 commit into
base: ff/GeometryBasics_refactor
Choose a base branch
from

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented Sep 15, 2024

Description

This is test/prototype for using MetaMesh from JuliaGeometry/GeometryBasics.jl#219 to render a mesh with materials loaded with JuliaIO/MeshIO.jl#98. This is effectively a continuation of #4319.

With this branch (and the related MeshIO, ShaderAbstractions & GeometryBasics branches), using https://free3d.com/3d-model/girl-blind-703979.html:

filepath = "path/to/14-girl-obj/girl OBJ.obj"
metamesh = load(filepath)

# Fix filename, convert white -> alpha
img = map(FileIO.load("path/to/14-girl-obj/tEXTURE/FACE Base Color apha.png")) do c
    Makie.RGBA{Makie.N0f8}(c.r, c.g, c.b, 1 - c.r)
end
metamesh[:materials]["FACE"]["diffuse map"]["image"] = img

# this splits up the mesh, extracts material parameters, loads the remaining textures and generates multiple mesh plots
f, a, p = Makie.mesh(metamesh)

image

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • Added an entry in CHANGELOG.md (for new features and breaking changes)
  • Added or changed relevant sections in the documentation
  • Added unit tests for new algorithms, conversion methods, etc.
  • Added reference image tests for new plotting functions, recipes, visual options, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Work in progress
Development

Successfully merging this pull request may close these issues.

1 participant