Skip to content

Merge materials#64

Open
pkratten wants to merge 14 commits into
Stykka:masterfrom
pkratten:merge-materials
Open

Merge materials#64
pkratten wants to merge 14 commits into
Stykka:masterfrom
pkratten:merge-materials

Conversation

@pkratten

Copy link
Copy Markdown
Contributor

Merge materials on layer or object level.
Merge the default material.

This is to make the gltf more compact and organized.

Current behavior is that every object gets its own material if options.UseDisplayColorForUnsetMaterials is enabled; exceptions is sub-objects with different colors.
If options.ExportLayers is also enabled the layer color gets its own material for all (sub-)objects that are set to layer color.

The DefaultMaterial.RenderMaterial was giving different guids each call so i set it to 0.

@jrz371
jrz371 self-requested a review August 23, 2021 07:21
Comment thread glTF-BinExporter/RhinoDocGltfConverter.cs Outdated
Comment thread glTF-BinExporter/RhinoDocGltfConverter.cs Outdated
Comment thread glTF-BinExporter/RhinoDocGltfConverter.cs Outdated
@pkratten

Copy link
Copy Markdown
Contributor Author

I don't know much about the mac side of things. Good to know, thanks!

@jrz371 jrz371 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the biggest fix is making that for loop that gathers the material indices more coherent and understandable.

Comment thread glTF-BinExporter/RhinoDocGltfConverter.cs Outdated
Comment thread glTF-BinExporter/RhinoDocGltfConverter.cs Outdated
Comment thread glTF-BinExporter/RhinoDocGltfConverter.cs Outdated
Comment thread glTF-BinExporter/RhinoDocGltfConverter.cs Outdated
Comment thread glTF-BinExporter/RhinoDocGltfConverter.cs Outdated
Comment thread glTF-BinExporter/RhinoDocGltfConverter.cs Outdated
@pkratten

pkratten commented Aug 23, 2021

Copy link
Copy Markdown
Contributor Author

Just letting you know that I found a problem that needs a bit longer to fix.

@pkratten

Copy link
Copy Markdown
Contributor Author

In my opinion this is good to go. Let me know if there is anything else!

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.

2 participants