Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

glTF標準のマテリアル情報がほとんどエクスポートされない #12

Closed
vyv03354 opened this issue Jul 31, 2018 · 2 comments
Labels
Milestone

Comments

@vyv03354
Copy link

vrm-c/UniVRM#17 より移動

現状だとUnity以外の実装もUnity向けの情報をVRM独自拡張から解析して変換しなければならないのが辛いです。glTF標準で表現できない情報であれば仕方ありませんが、たとえばUnityのRenderTypeタグのうち透明度に関わるものは

UnityのRenderTypeタグ glTFのmaterial.alphaModeプロパティ
Opaque OPAQUE (デフォルトなので出力は不要)
Transparent BLEND
TransparentCutout MASK

のように対応します。またVRM/Unlit系シェーダーは、すでに標準化されているKHR_materials_unlit拡張で(ZWriteの有無以外)ほぼ表現可能です。VRM/UnlitCutoutなどのシェーダーの_Cutoffプロパティは、glTFのmaterial.alphaCutoffに変換して表現できます。

互換性のために従来の情報を維持するのはかまいませんが、これらのglTF標準の情報もエクスポートできないでしょうか。VRMの独自拡張に非対応のglTFビューアーとの相互運用性も向上すると思われます。

@ousttrue
Copy link
Owner

コードを確認ました。

public static glTFMaterial ExportMaterial(Material m, List<Texture> textures)

強化します。

ousttrue added a commit that referenced this issue Aug 17, 2018
ousttrue added a commit that referenced this issue Aug 17, 2018
@ousttrue ousttrue added the bug label Sep 3, 2018
@ousttrue
Copy link
Owner

ousttrue commented Sep 3, 2018

@ousttrue ousttrue added this to the 1.21 milestone Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants