Merops
3D integrated DCC tool for Pixar USD.
Install / Use
/learn @sho7noka/MeropsREADME
Merops
English(Google Translate)
Merops は Apple Metal22 と Git、PixarUSD をベースにした、次世代DCCツールの実験プロジェクトです。
Concept
シンプル、早い、イテレーションの3軸が基本です。
- Metal2 ベースの Viewport と Modifier (OpenGL deprecate)
- 中ボタンを使わないウィジェットを極力排したジェスチャ、ゲーム画面に近い使用感
- Pixar USD と libgit2 によるアセットパイプラインとイテレーションを重視
Why?
- 3Dソフトの操作は難しく複雑です。中ボタンクリックの多用を回避してシンプルな操作感を実現します。
- macOS design や iOS に最適化されたDCCアプリケーションは数少ないのでそこを中心に据えます。
- 入出力フォーマットで USDZ に対応します。XR、モバイルのコンテンツ制作連携に特化したツールを目標に開発を進めます。
Author
Contribute
Contribute を一読ください。
License
BSD ライセンスです。
TODO
他のソフトのコンテクストを参考に実装を進めていますが統合ソフトは目指しません。
Editor
- [ ] point, line, face の DrawOverrideを選択オブジェクトから作る
- [ ] primitive選択の実現
- [ ] 背景とグリッドを描画 /カメラコントロールを同期 /設定画面を表示
- [x] マウスイベントの両立
- [x] libgit2でcommitとrevert
- [x] TextField からオブジェクトの状態を変更
- [x] subview 3Dコントローラー ~~bug SpriteKit で 透明 HUD の描画~~
- [x] Blender like な imgui Slider の実装
- [x] ~~PyRun_SimpleStringFlags と PyObjC の GIL 回避~~ Swift SIL を ctypes から ios python
- [x] mouseEvent/TouchEvent と Float をマルチプラットフォーム化
- [x] ~~WebKit View への書き込みと読み込み~~ vscode や vim に外部化
Engine
- [x] Rendererの分離
- [ ] arm64 USD を組み込む / USDKit
- [ ] interpolation を simdベースに
- [ ] Metal2 でモディファイヤ テッセレーションとリダクション + ml/noise/lattice/edit
- [ ] Model I/O で書き出せないgeometryとマテリアル以外を後変更
- [ ] Server から GET/POST
Research
Developper 向け
python build.py
carthage update --verbose --no-use-binaries --use-ssh
https://github.com/libgit2/objective-git/blob/master/README.md
Debug
-
break point 先に以下の設定が必要。
Build Settings > Produce Debuging Infomation > YES, include source code
- [Show Debug the navigator] タブの [FPS] をクリック
- dependency viewer
- [Show Debug the Navigator] タブ > [View Frame By Call] を選択
- geometry viewer
- [Capture GPU Frame] を押す
- shader debugger
- [Debug Shader] > [Debug] の順で押す
- enhanced shader profiler
- A11 を搭載した実機でのみ確認可能
- キャプチャ、ラベル、グループ
renderCommandEncoder.label = "hoge"
// capture
MTLCaptureManager.shared().startCapture(device: device)
// ~~
MTLCaptureManager.shared().stopCapture()
// group
renderCommandEncoder.pushDebugGroup("hoge")
// ~~
renderCommandEncoder.popDebugGroup()
snippets
metalLayer = self.layer as? CAMetalLayer
if let drawable = metalLayer.nextDrawable()
// https://developer.apple.com/documentation/scenekit/scnnode/1407998-hittestwithsegment
child.hitTestWithSegment(from: <#T##SCNVector3#>, to: <#T##SCNVector3#>, options: <#T##[String : Any]?#>)
func degreesToRadians(_ degrees: Float) -> Float {
return degrees * .pi / 180
}
let sceneKitVertices = vertices.map {
let cube = newNode.flattenedClone()
cube.simdPosition = SCNVector3(x: $0.x, y: $0.y, z: $0.z)
return cube
}
// scenekit で頂点作るパターン
1. ジオメトリから simd vertex position を取得する
2. cube を配置する
scene.rootNode.replaceChildNode(<#T##oldChild: SCNNode##SCNNode#>, with: <#T##SCNNode#>)
let vector:[Float] = [0,1,2,3,4,5,6,7,8,9]
let byteLength = arr1.count*MemoryLayout<Float>.size
let buffer = metalDevice.makeBuffer(bytes: &vector, length: byteLength, options: MTLResourceOptions())
let vector2:[Float] = [10,20,30,40,50,60,70,80,90]
buffer.contents().copyBytes(from: vector2, count: vector2.count * MemoryLayout<Float>.stride)
https://qiita.com/lumis/items/311b8c39d61312957195 https://qiita.com/mss634/items/170d3cb401eee4ec1253 https://stackoverflow.com/questions/15470367/pyeval-initthreads-in-python-3-how-when-to-call-it-the-saga-continues-ad-naus]
https://gist.github.com/rikner/2f2677c56d1adef277d03bdb322eca80
Related Skills
node-connect
336.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
336.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
82.8kCommit, push, and open a PR
