Stykka / glTF-Bin

[Deprecated See https://github.com/mcneel/glTF-IO] glTF exporter for Rhinoceros. Supports: mode-text, mode-binary, binary-draco, materials, and textures.
MIT License
31 stars 18 forks source link

Rhino PBR MaterialName fix #73

Closed alitehami closed 3 years ago

alitehami commented 3 years ago

Hello all,

Many thanks for this awesome project, much appreciate all your incredible efforts and work.

I've been having issues exporting the material names properly from rhino 7 and figured the plugin currently only work correctly with Rhino's most recent "Custom" Material type and a few others only, but mainly fails with PBRs. (it would not even work with older 'Custom' materials from older versions of rhino until they're reset and recreated in Rhino7).

Test with Grasshopper C# for both Render vs Simulated(which is how the current plugin is working) Materials Names: image

glb models exported with both, the current plugin release (1.8) vs my PR version that relies on the RenderMaterial :

SimulatedMaterials: image

RenderMaterials: image

Attached are the rhino & glb models for your reference: gltf-bin sample model for material names fixes.zip

Thanks! Ali Tehami

jrz371 commented 3 years ago

Great, thanks for the contribution!