{"id":23647875,"url":"https://github.com/binzume/modelconv","last_synced_at":"2025-08-31T23:32:21.022Z","repository":{"id":49802971,"uuid":"234858808","full_name":"binzume/modelconv","owner":"binzume","description":"3d model converter for Golang","archived":false,"fork":false,"pushed_at":"2024-06-26T19:34:20.000Z","size":400,"stargazers_count":43,"open_issues_count":3,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-15T01:22:07.786Z","etag":null,"topics":["fbx","golang","metasequoia","unity3d","vrm"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binzume.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-19T07:28:06.000Z","updated_at":"2024-10-31T05:21:28.000Z","dependencies_parsed_at":"2024-06-20T04:16:39.795Z","dependency_job_id":"9b22771d-f966-414f-9ee2-bfb5d2c8ba08","html_url":"https://github.com/binzume/modelconv","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binzume%2Fmodelconv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binzume%2Fmodelconv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binzume%2Fmodelconv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binzume%2Fmodelconv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binzume","download_url":"https://codeload.github.com/binzume/modelconv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231639032,"owners_count":18404265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fbx","golang","metasequoia","unity3d","vrm"],"created_at":"2024-12-28T14:49:09.033Z","updated_at":"2024-12-28T14:49:09.686Z","avatar_url":"https://github.com/binzume.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Experimental 3D model converter\n\n[![Build Status](https://github.com/binzume/modelconv/actions/workflows/test.yaml/badge.svg)](https://github.com/binzume/modelconv/actions)\n[![Go Reference](https://pkg.go.dev/badge/github.com/binzume/modelconv.svg)](https://pkg.go.dev/github.com/binzume/modelconv)\n[![license](https://img.shields.io/badge/license-MIT-4183c4.svg)](https://github.com/binzume/modelconv/blob/master/LICENSE)\n\n\nGoで3Dモデルファイルを読み書きするライブラリ＆変換ツールです．\n\n| Format     | Read | Write | Comment                          |\n| ---------- | ---- | ----- | -------------------------------- |\n| .mqo/.mqoz |  ○  |  ○   | ボーン・モーフに対応             |\n| .gltf/.glb |  ○  |  ○   | 他フォーマットへの変換は暫定実装 |\n| .vrm       |  △  |  ○   | glTF 用のエクステンション        |\n| .pmx/.pmd  |  ○  |  ○   | .pmd は Read only                |\n| .fbx       |  ○  |  △   | 出力はASCIIのみ                  |\n| .unity     |  △  |       | Unity 2018以降のシーンに対応     |\n| .vmd       |  △  |       | 暫定実装                         |\n\n仕様が良くわかからないものは実際のファイルを見ながら雰囲気で実装してるので，読み込めないデータがあるかもしれません．\n\n# Command-line tool\n\n[cmd/modelconv](cmd/modelconv)\n\n以下の組み合わせの変換が可能です．\n\n- (.pmd | .pmx | .mqo | .mqoz | .fbx | .unity) → (.pmx | .mqo| .mqoz | .glb | .gltf | .vrm)\n- (.glb | .gltf | .vrm) → (.glb | .gltf | .vrm) (※1)\n\n※1: glTF同士の変換は特別扱いをしているため，モデルに変更を加えるオプションは未対応です．(scaleは可能)\n\n## Install \"modelconv\" commant\n\n新し目のGoがあればビルドできると思います．\n[Releases](https://github.com/binzume/modelconv/releases/latest)にビルド済みのWindows用の実行ファイルを置いてあります．\n\n```bash\ngo install github.com/binzume/modelconv/cmd/modelconv@latest\n```\n\n## Usage examples\n\n### MMD to VRM\n\n```bash\nmodelconv -physics -unlit \"*\" -autotpose \"右腕,左腕\" \"model.pmx\" \"model.vrm\"\nmodelconv -vrmconfig \"model.vrmconfig.json\" \"model.pmx\" \"model.vrm\"\n```\n\n### gltf to glb\n\n```bash\nmodelconv \"model.gltf\" \"model.glb\"\nmodelconv -format glb \"model.gltf\"\n```\n\n### Unity to glb\n\n```bash\nmodelconv  \"test.unitypackage#Assets/scene.unity\" \"scene.glb\"\nmodelconv  \"YourProject/Assets/Scenes/scene.unity\" \"scene.glb\"\n```\n\n\n### Scaling\n\n```bash\nmodelconv -scale 1.5 \"model.glb\" \"model_scaled.glb\"\nmodelconv -scaleY 1.5 -scaleX 1.3 \"model.mqo\" \"model_scaled.mqo\"\n```\n\n## Flags\n\n| Flag       | Description    | Default    |\n| ---------- | -------------- | ---------- |\n| -format    | Output format  |            |\n| -scale     | Scale          | See `Unit` |\n| -scaleX    | Scale x-axis   | 1.0        |\n| -scaleY    | Scale y-axis   | 1.0        |\n| -scaleZ    | Scale z-axis   | 1.0        |\n| -rot180    | rotate 180 degrees around Y-axis |  |\n| -hide      | hide objects (OBJ1,OBJ2,...) |  |\n| -hidemat   | hide materials (MAT1,MAT2,...)  |  |\n| -unlit     | unlit materials (MAT1,MAT2,...)  |  |\n| -alpha     | override material alpha (MAT1:A1,MAT2,A2) |  |\n| -morph     | apply morph (MORPH1:value1,MORPH2,value2) |  |\n| -vrmconfig | Config file for VRM | \"inputfile.vrmconfig.json\" |\n| -autotpose | Arm bone names |            |\n| -chparent  | replace parent bone (BONE1:PARENT1,BONE2:PARENT2,...) |  |\n| -physics   | Convert colliders (experinemtal) | false |\n\n\n### vrmconfig:\n\n設定ファイルのjsonは [converter/vrmconfig_presets](converter/vrmconfig_presets) にあるファイルや，\n[Qiitaの記事](https://qiita.com/binzume/items/d29cd21b9860809f72cf)も参考にしてください．\n\nMMDからの変換時にはデフォルトで [mmd.json](converter/vrmconfig_presets/mmd.json) が使われます．\n\n### hide,hidemat,unlit:\n\n対象のオブジェクトやマテリアルの名前をカンマ区切りで指定してください．ワイルドカード(`*`)が利用可能です．\n\n### autotpose:\n\n腕のボーンを指定するとX軸に沿うように形状を調整します(暫定実装)\n\n### Unit:\n\n- MQO: 1mm\n- MMD: 80mm\n- glTF/VRM: 1m\n\n例： MMD → VRM : default scale = 0.08\n\n# API\n\nT.B.D.\n\n### Example: .pmx to .mqoz\n\n```go \n\tmmdModel, err :=  mmd.Load(\"model.pmx\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tmqDoc, err := converter.NewMMDToMQOConverter(nil).Convert(mmdModel)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = mqo.Save(mqDoc, \"model.mqoz\")\n\tif err != nil {\n\t\treturn err\n\t}\n```\n\n# License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinzume%2Fmodelconv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinzume%2Fmodelconv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinzume%2Fmodelconv/lists"}