Skip to content

Adding new materials for each convex hull when saved as an OBJ file#103

Open
adnanmunawar wants to merge 1 commit into
SarahWeiii:mainfrom
adnanmunawar:main
Open

Adding new materials for each convex hull when saved as an OBJ file#103
adnanmunawar wants to merge 1 commit into
SarahWeiii:mainfrom
adnanmunawar:main

Conversation

@adnanmunawar
Copy link
Copy Markdown

Adds an option to generate a companion Material Template Library (.mtl) file when exporting to Wavefront (OBJ) format, assigning random colors to individual convex hulls.

Why This Matters:

  • Blender Workflow: Blender imports OBJ files without materials as multiple disconnected meshes.
  • Vertex Groups: Adding unique materials allows Blender to automatically import the file as a single mesh partitioned into distinct vertex groups.
  • Efficiency: Eliminates manual mesh separation and organization steps for users post-import.

Changes:

  • Added .mtl file generation logic for OBJ exports.
  • Implemented random color assignment per convex hull.
  • Introduced user toggle to make material generation optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant