|
|
1行目: |
1行目: |
− | {| style="font-weight:100;float:right;"
| + | #REDIRECT [[Multiverse_Assets_Viewer]] |
− | |__TOC__
| + | |
− | |}
| + | |
− | | + | |
− | UnityでGLBとUSDZを作り<model-viewer>に組込みしてみます。
| + | |
− | | + | |
− | [https://dz.plala.jp/ar Universal AR]
| + | |
− | | + | |
− | [[ファイル:ar_qr.png|240px|border]]
| + | |
− | | + | |
− | =='''具合'''==
| + | |
− | * three.jsにusdz exporterある https://threejs.org/examples/#misc_exporter_usdz
| + | |
− | | + | |
− | * UnityのStandard ShaderはGLBとUSDZで違いが出てる
| + | |
− | * 顔の表情は@google安定してる 真似した方が良さげ
| + | |
− | | + | |
− | audio同期<br />
| + | |
− | [https://github.com/google/model-viewer/discussions/2166 Synced audio · Discussion #2166 · google/model-viewer · GitHub] | + | |
− | | + | |
− | メモ 2021.09.11<br />
| + | |
− | <!--
| + | |
− | [https://zenn.dev/ikkou/articles/5fadc72b6c9e32 モバイル版のGoogle検索で3DモデルとARが表示されるもの一覧(2021/07版) #Google3D #Google検索ARで遊ぼう]<br /> | + | |
− | https://support.google.com/websearch/answer/9817187?hl=ja-JP<br />-->
| + | |
− | [https://dz.plala.jp/wiki_data/google_ar.html Google検索 ARモデル一覧]
| + | |
− | | + | |
− | [[ファイル:ar_qr_google.png|240px|border]]
| + | |
− | | + | |
− | {{#widget:Iframe
| + | |
− | |url=https://dz.plala.jp/wiki_data/google_ar.html
| + | |
− | |width=630
| + | |
− | |height=6300
| + | |
− | |border=0
| + | |
− | }}
| + | |
− | | + | |
− | =='''環境'''==
| + | |
− | {| class="wikitable" style="width:360px;"
| + | |
− | | style="padding-left:10px;padding-right:10px;"| DCCツール
| + | |
− | | style="padding-left:10px;padding-right:10px;" | unity, 3dsMax
| + | |
− | |-
| + | |
− | | style="padding-left:10px;padding-right:10px;"| 検証環境
| + | |
− | | style="padding-left:10px;padding-right:10px;"| iPhone XS
| + | |
− | |}
| + | |
− | | + | |
− | ==='''GLTF Exporter'''===
| + | |
− | [https://github.com/Plattar/gltf-exporter GitHub - Plattar/gltf-exporter]
| + | |
− | | + | |
− | ==='''GLB Packer'''===
| + | |
− | https://glb-packer.glitch.me<br />
| + | |
− | https://github.com/sbtron/makeglb
| + | |
− | | + | |
− | ==='''USD Unity SDK'''===
| + | |
− | [https://github.com/Unity-Technologies/usd-unity-sdk GitHub - Unity-Technologies/usd-unity-sdk]
| + | |
− | | + | |
− | ==='''gltf2usd'''===
| + | |
− | [https://github.com/kcoley/gltf2usd GitHub - kcoley/gltf2usd]<br />
| + | |
− | | + | |
− | VMware Workstation 15 Player
| + | |
− | Ubuntu 18.04.3 LTS
| + | |
− | | + | |
− | インストール
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ sudo apt install zlib1g-dev
| + | |
− | $ sudo apt install openexr
| + | |
− | $ sudo apt install libopenexr-dev
| + | |
− | $ pip install openexr
| + | |
− | $ git clone https://github.com/kcoley/gltf2usd.git
| + | |
− | $ cd gltf2usd
| + | |
− | $ pip install -r requirements.txt
| + | |
− | </syntaxhighlight>
| + | |
− | | + | |
− | 変換
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ cd ~
| + | |
− | $ cd gltf2usd/Source
| + | |
− | $ export PYTHONPATH=$PYTHONPATH:/usr/local/USD/lib/python
| + | |
− | $ export PATH=$PATH:/usr/local/USD/bin
| + | |
− | $ python gltf2usd.py -g ../../gltf/littlest-tokyo.gltf -o ../../littlest-tokyo.usdz
| + | |
− | log
| + | |
− | Alpha Mask not supported in USDPreviewSurface! Using Alpha Blend...
| + | |
− | </syntaxhighlight>
| + | |
− | | + | |
− | ==='''USD from glTF'''===
| + | |
− | [https://github.com/google/usd_from_gltf GitHub - google/usd_from_gltf]
| + | |
− | | + | |
− | VMware Workstation 15 Player
| + | |
− | Ubuntu 18.04.3 LTS
| + | |
− | | + | |
− | インストール
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ sudo apt update
| + | |
− | $ sudo apt upgrade
| + | |
− | $ sudo apt install build-essential cmake libboost-dev libboost-all-dev libtbb-dev git pyside-tools python-pip
| + | |
− | $ pip install PyOpenGL
| + | |
− | $ sudo apt install libx11-dev libglew-dev libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev
| + | |
− | $ git clone https://github.com/PixarAnimationStudios/USD
| + | |
− | $ sudo python USD/build_scripts/build_usd.py /usr/local/USD
| + | |
− | </syntaxhighlight>
| + | |
− | | + | |
− | usdview
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ cd ~
| + | |
− | $ export PYTHONPATH=$PYTHONPATH:/usr/local/USD/lib/python
| + | |
− | $ export PATH=$PATH:/usr/local/USD/bin
| + | |
− | $ cd USD
| + | |
− | $ usdview extras/usd/tutorials/convertingLayerFormats/Sphere.usda
| + | |
− | </syntaxhighlight>
| + | |
− | | + | |
− | USD_from_glTF
| + | |
− | <syntaxhighlight lang="bash">
| + | |
− | $ cd ~
| + | |
− | $ sudo apt install nasm
| + | |
− | $ pip install Pillow
| + | |
− | $ git clone https://github.com/google/usd_from_gltf
| + | |
− | $ python usd_from_gltf/tools/ufginstall/ufginstall.py ~/usd_from_gltf /usr/local/USD
| + | |
− | </syntaxhighlight>
| + | |
− | | + | |
− | <span style="color: red;">error</span>
| + | |
− | | + | |
− | ==='''Adobe Aero'''===
| + | |
− | [https://www.adobe.com/jp/products/aero.html Adobe AeroでARを制作 | Adobe]<br />
| + | |
− | [https://helpx.adobe.com/jp/aero/using/supported-file-formats.html Adobe Aero サポートされているファイル形式]<br />
| + | |
− | [https://helpx.adobe.com/jp/aero/using/prepare-3d-content-aero.html 3D コンテンツを Aero 用に準備する]
| + | |
− | ポリゴン:130,000まで
| + | |
− | ボーン:6つまで?
| + | |
− | テクスチャ:1024x1024(最大2048x1080)まで
| + | |
− | | + | |
− | =='''<model-viewer>'''==
| + | |
− | 参考: [https://github.com/google/model-viewer/blob/master/packages/model-viewer/README.md GitHub - model-viewer/README.md]<br />
| + | |
− | 参考: [https://github.com/GoogleWebComponents/model-viewer/blob/master/packages/model-viewer/POLYFILLS.md GitHub - model-viewer/POLYFILLS.md]<br />
| + | |
− | 参考: https://modelviewer.dev/<br />
| + | |
− | 参考: [https://modelviewer.dev/examples/tester.html <model-viewer> Interactive Example]
| + | |
− | | + | |
− | ソース<br />
| + | |
− | [https://dz.plala.jp/ar/index.html index.html]
| + | |
− | [https://dz.plala.jp/ar/script.js script.js]
| + | |
− | [https://dz.plala.jp/ar/style.css style.css]
| + | |
− | [https://dz.plala.jp/ar/data.json data.json]
| + | |
− | | + | |
− | =='''リソース'''==
| + | |
− | ==='''HDRI'''===
| + | |
− | https://hdrihaven.com/
| + | |
− | <!--
| + | |
− | ==='''Model'''===
| + | |
− | [https://www.cassina-ixc.jp/shop/g/glc2 Le Corbusier LC2 © CASSINA IXC. Ltd.]<br />
| + | |
− | [https://www.hermanmiller.com/ja_jp/products/seating/office-chairs/aeron-chairs/pro-resources Aeron Chair © Herman Miller, Inc.]<br />
| + | |
− | Ball Chair © Eero Aarnio<br />
| + | |
− | [https://www.modelplusmodel.com/furniture/chairs/0225-chair.html Panton Chair © Vitra]<br />
| + | |
− | [https://www.modelplusmodel.com/furniture/tables/f14-coffee-table.html Noguchi Coffee Table © Vitra]<br />
| + | |
− | [https://www.louispoulsen.com/ja-jp/download-center?type=fbx&productId=90293 PH 5 Classic © Louis Poulsen]
| + | |
− | | + | |
− | ==='''Sketchfab'''===
| + | |
− | CC BY 4.0<br />
| + | |
− | [https://sketchfab.com/3d-models/spot-mini-rigged-5dcbee77730640269cef5bd2587e328a Spot Mini (Rigged) @ Greg McKechnie]<br />
| + | |
− | [https://sketchfab.com/3d-models/model-mechanics-93e2849f69894083866efab3278f009b model mechanics @ sandwichsoul]<br />
| + | |
− | [https://sketchfab.com/3d-models/littlest-tokyo-94b24a60dc1b48248de50bf087c0f042 Littlest Tokyo @ glenatron]<br />
| + | |
− | [https://sketchfab.com/3d-models/thor-and-the-midgard-serpent-2ef4c45caa35450db1b876a7f94ff79d Thor and the Midgard Serpent @ Mr. The Rich]<br />
| + | |
− | [https://sketchfab.com/3d-models/mech-drone-8d06874aac5246c59edb4adbe3606e0e Mech Drone @ Willy Decarpentrie]<br />
| + | |
− | [https://sketchfab.com/3d-models/robot-steampunk-3d-coat-45-pbr-91eb0eb061024bf1bc5e3eb5ffe385d8 Robot Steampunk 3D-Coat 4.5 PBR @ 3d-coat]<br />
| + | |
− | [https://sketchfab.com/3d-models/junkrat-7deb2dd552df4bf4bb65005018176647 Junkrat @ Claudia Luehl]<br />
| + | |
− | [https://sketchfab.com/3d-models/sgp-25-space-invader-db14ddb138fc43d7bec20084b519c129 Space Invader @ Sirhaian]<br />
| + | |
− | [https://sketchfab.com/3d-models/cute-dog-1c37d9af2a6f421e93033b39f9580841 cute dog @ RODX81]<br />
| + | |
− | [https://sketchfab.com/3d-models/animated-eagle-8fb150270adb45aa9653e857f3fa351b animated EAGLE @ Asim3d]<br />
| + | |
− | [https://sketchfab.com/3d-models/flying-bee-4e9ec9d9e4044e6ea6d47614f7daf533 Flying Bee @ elly77ellison]
| + | |
− | | + | |
− | CC BY-NC 4.0<br />
| + | |
− | [https://sketchfab.com/3d-models/model-12-tokay-gecko-8f19aac5694b40c3a0a53bf107fd30a4 Tokay gecko @ DigitalLife3D]<br />
| + | |
− | [https://sketchfab.com/3d-models/model-56a-southern-white-rhino-8e97b62a90f44ce19ea9e3fd421f55b4 Southern White Rhino @ DigitalLife3D]<br />
| + | |
− | [https://sketchfab.com/3d-models/model-47a-loggerhead-sea-turtle-c438e81e796d41d9a6ae4cc147ef8d4f Loggerhead sea turtle @ DigitalLife3D]
| + | |
− | | + | |
− | CC BY-NC-SA 4.0<br />
| + | |
− | [https://sketchfab.com/3d-models/bb8-animated-15db7644c5b645f195f4d2dc0c5154ec BB8 (Animated) @ StarWars-Universe]<br />
| + | |
− | [https://sketchfab.com/3d-models/r2-d2-animated-476fe6527305404cb0d7e1ebe9eead63 R2-D2 (Animated) @ StarWars-Universe]<br/ >
| + | |
− | [https://sketchfab.com/3d-models/dancing-stormtrooper-12bd08d66fe04a84be446e583d6663ac DANCING STORMTROOPER @ StrykerDoesAnimation] 自主規制
| + | |
− | | + | |
− | ==='''Google'''===
| + | |
− | CC BY 4.0<br />
| + | |
− | https://developers.google.com/ar/develop/java/scene-viewer<br />
| + | |
− | https://storage.googleapis.com/ar-answers-in-search-models/
| + | |
− | | + | |
− | ==='''Mixamo'''===
| + | |
− | [https://www.mixamo.com/#/?page=1&query=Kachujin+G+Rosales&type=Character Kachujin G Rosales]<br />
| + | |
− | [https://www.mixamo.com/#/?page=1&query=Shannon&type=Character Shannon]<br />
| + | |
− | [https://www.mixamo.com/#/?page=1&query=Michelle&type=Character Michelle]<br />
| + | |
− | [https://www.mixamo.com/#/?page=1&query=AJ&type=Character AJ]
| + | |
− | -->
| + | |
− | | + | |
− | =='''更新履歴'''==
| + | |
− | * 2021.09.11 Google検索 ARモデル一覧 追加
| + | |
− | * 2020.05.13 ソース書き換え
| + | |
− | * 2020.05.10 アニメーション付きUSDZ追加
| + | |
− | * 2019.10.25 公開
| + | |