MatMeshMakie.jl
is a Julia package for rendering 3D meshes with material properties specified in OBJ and MTL files. It provides functions for loading, parsing, and visualizing 3D models with various material properties as defined in the .mtl file, like ambient color, diffuse color, and textures. The meshes are visualised with GLMakie.
To install MatMeshMakie.jl
, run the following command in your Julia REPL:
] add https://github.com/nickkeepfer/MatMeshMakie.jl.git
Here's a simple example to get started: (dinosaur mesh from: CGTrader)
using MatMeshMakie
# Load an OBJ file and its associated MTL file
obj_file = "path/to/your.obj"
mtl_file = "path/to/your.mtl"
# Parse the OBJ and MTL files
materials = readMtlFile(mtl_file)
# Render the OBJ file with materials
plot_obj_mtl(obj_file, mtl_file)
For more detailed usage, please refer to the documentation.
- Load and parse OBJ and MTL files
- Support for textures