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

Feature/material-export #1094

Merged
merged 6 commits into from
Jan 18, 2023
Merged

Feature/material-export #1094

merged 6 commits into from
Jan 18, 2023

Conversation

paishoexpert
Copy link
Member

@paishoexpert paishoexpert commented Jan 17, 2023

Feature/material-export

  • Removed the "withMaterial" export type and replaced it with a boolean that applies to all mesh export types (WithRig, MeshOnly, Multimesh).

This works perfectly for WithRig and MeshOnly, but creates a 'problem' with Multimesh:

  • The Blender plugin reads the Material.json from top to bottom and applies materials to meshes in that exact order.
  • An occurence of two submeshes (submesh_00_LOD_0 and submesh_00_LOD_0.001 (technically last mesh in MultiMesh)) would lead to a incorrect order on import as it'd be imported as the second mesh and thus materials being applied wrong.
  • To counteract this I've just added a small prefix, which keeps the order intact on import. That prefix is only applied for Multimeshes and only if "Export materials" is ticked.

image

If someone was now to reimport this exported multimesh object (to for example replace a part of a jacket with some other part of a different jacket) - he'd need to organize the submeshes correctly and then remove the artifically added prefix. If I am not mistaken.

@paishoexpert paishoexpert marked this pull request as ready for review January 17, 2023 22:34
@rfuzzo rfuzzo merged commit 1b5a11e into main Jan 18, 2023
@rfuzzo rfuzzo deleted the feature/material-export branch January 18, 2023 16:17
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.

None yet

2 participants