Closed donmccurdy closed 7 years ago
In a bit of a roundabout way this is supported in https://github.com/AnalyticalGraphicsInc/obj2gltf/pull/49 with the --bypassPipeline
flag. obj2gltf
works with HKR_materials_common
by default, but then sends it through gltf-pipeline
to create techniques/shaders. This can be bypassed with that flag.
An explicit option for this seems like a good idea though.
A --kmc
flag is added in https://github.com/AnalyticalGraphicsInc/obj2gltf/pull/49 with a few caveats right now that would need fixing in gltf-pipeline:
gltf-pipeline uses the same kmc options for each material and doesn't recognize the transparent flag
The new flag looks good, thanks!
Another comment from the code to add here and keep track of:
It's not completely clear whether transparent and doubleSided belong under values or KHR_materials_common Put under both for now to handle both situations. https://github.com/KhronosGroup/glTF/tree/master/extensions/Khronos/KHR_materials_common https://github.com/KhronosGroup/glTF/issues/632
Now in master with the --materialsCommon
flag.
Similar to
-k
in COLLADA2GLTF, which an upcoming PR may rename to-m
.Some A-Frame users have been surprised when lighting/shadows do not work, and three.js has a bug (fixed but not yet released) with glTF custom shaders used in VREffect, so the common materials are preferable in several cases.