Comments (12)
@enzyme69 @kcoley I've undercovered a really strange bug. A png image file named basecolor.png used for my base_map PBR texture for some reason was making all my usdz models that uses that png file crash in ios12 beta 6 onwards. By merely replacing that png file but keeping everything else the same I fixed all those corrupted usdz files. It doesn't seem to have anything to do with the naming or referencing - but purely the png file! If I can work out what it is I'll let you guys know.
This was the command line I used to create the file. It was an animated alembic file exported from Blender... which BTW was working perfectly fine up until ios12 beta 6.
xcrun usdz_converter newtons_cradle.abc newtons_cradle.usdz -g base -color_map basecolor.png -metallic_map metallic.png -normal_map normal.png -roughness_map roughness.png -g cradle -color_map basecolor.png -metallic_map metallic.png -normal_map normal.png -roughness_map roughness.png -a -l -v
This is the usdz file which is now working again in ios12 beta newtons_cradle.usdz
from gltf2usd.
I used your gltf2usd python tool to successfully build the monster.gtlf example and it’s working in ios12 beta 9. However, I already had the older version of usd prior to 18.09 built on my system. I’m also on high Sierra. I had to install Pillow and another python module to get it working. I haven’t had much time to play with it yet. I did notice the scaling had to be set to 0.05 in the usda file to get the monster to a viewable 1 metre size to view in my room in AR. I had already drop the Apple usd tool on my system as well, so don’t know for sure if that helped it work properly. Anyway would love to know if the standalone build will suffice as it will make it much easier deploying on my other Mac computers as building USD is still a tricky process on Mac from what i’ve found.
from gltf2usd.
@wave-electron I just pointed to Apple's build of USD_Python instead of my local build, and this tool still works, which makes using this tool more convenient for those without a USD build (on Mac). As for the scaling issue you are running into, I scale the generated USD models by 100x since glTF defaults to meters and USD defaults to centimeters. I could provide an option where the scale of the generated USD file can be customized to something else through command line, though in the meantime, you can overwrite the scale at the top of the USD model (if viewed as a usda file).
@enzyme69 I made some updates to this code to work around some iOS bugs that were preventing animations from working. You can pull the latest master from this code and try converting again. I will report these bugs to Apple's bug reporting tool.
from gltf2usd.
Hi @enzyme69 . I played with the models a bit and got them to work on iOS by removing Armature/
from the bones names. One of the workarounds I previously implemented was naming the skeleton root the same as the root joint. But with the USD models converted from Blender glTFs, Armature is the root of all bones so is part of the bone names based on the hierarchy.
Here are the tweaked models:
monkeybone.zip
tentacle.zip
I'll file another issue to try to handle this workaround as well.
So for now, remove Armature/
from the bone names
from gltf2usd.
Also bouncing ball USD animation from Apple example does not work as USDZ, but maybe it's related to this bug.
@enzyme69 Apple has some samples in the standalone USD library. For example if you run the python script skinnedMeshAnimation.py
You get the skinnedMeshAnimation.usd and skinnedMeshAnimation.usdz in samples/assets directory. These usdz animations are working & i've posted skinnedMeshAnimation.usdz on my fusionar.app gallery. Its a bouncing cube with morph animation.
from gltf2usd.
Hi @wave-electron. It should work theoretically since this code is built against the official USD python API. I can give it a try later today to verify
from gltf2usd.
@wave-electron Kind of on topic, I tested on the Monster asset and getting animated USDZ, however it is not animating on my iOS 12 Beta 9.
So I use the GLTF -> USDA. Then I convert USDA into USDZ using Apple binary at USDZ Gallery.
Wondering if I am doing it right?
Note:
I think I have USD v18.09 that I built normally. I also downloaded Apple one but not sure how to use it. But anyhow, animation USDZ animation works on MacOS, but not on iOS 12 Beta 9. Maybe I need to wait for XCode 10 Beta 7? Hmmm... weird.
from gltf2usd.
@kcoley I tested it just now with latest update and confirming the GLTF -> USD -> USDZ animation works! Thanks! Not sure what causing it, but finally we have a working USDZ animation with bones! Awesome!
@wave-electron Also bouncing ball USD animation from Apple example does not work as USDZ, but maybe it's related to this bug. Also regarding scale, I can see a weird USDZ scaling of this Monster and it seems to be floating high on floor.
from gltf2usd.
from gltf2usd.
UPDATE:
Although monster.usdz animation works correctly, I am not getting animation on this monkey head. Not sure why...
monkey_test_usdz.zip
from gltf2usd.
And this animation does not working on iOS, works on MacOS:
- Exported from Blender, Khronos Group GLTF, default option.
- I have ensured Material and Texture assigned
What could the bug be? Is this something that I can manually edit on USDA for quick fix?
Thanks!
This makes me wondering why the Monster USDZ works on iOS earlier...
from gltf2usd.
Thanks this is now working great! 👍 👍
from gltf2usd.
Related Issues (20)
- Multiple objects animation (no armature) failed to convert HOT 10
- Material opacity lost on export to USDZ HOT 7
- large texture size after convert HOT 3
- Texture of object greatly reduced
- Skinned Mesh Bone Hierarchy
- 'bufferView' key error while loading GLTF
- Value Error('unknown file extension:') error for some gltf files HOT 2
- Addition of opacityThreshold for USD Preview Surface HOT 1
- Texture names with spaces do not work
- Warning: in _CreateNewUsdzPackage HOT 1
- Opacity and Alpha and Transparency HOT 4
- USD conversion stoped working HOT 2
- Sanitise node names HOT 5
- Compatibility with USD Python 19.11?
- Error converting GLTF with animations HOT 2
- Error python gltf2usd.py HOT 9
- Path must be an absolute path:<>
- Python3.7 upgrading and TypeError: TypeError: can't multiply sequence by non-int of type 'float'
- Expected VtArray<TfToken> HOT 1
- Multiple animations in 1 model support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gltf2usd.