Closed ox closed 6 years ago
Hi @ox. I’ll take a look and investigate.
@ox
looks like this model uses morph targets which I have not yet implemented in this tool, but I will create an issue to track it.
Disabling animations allows your carrot model to load on iOS though it is very large so it may end up behind or above you if you look around. glTF uses meters are its unit of measurement while USD uses centimeters, so I scale the glTF models by 100x to match this convention. However, you can tweak the xformOp:scale
at the root node to remove or change the 100x scale to a different value:
def Xform "root"
{
float3 xformOp:scale = (100, 100, 100)
...
}
I mentioned in another issue that I could make this a command line parameter, so I will track that too in case source glTF models are actually not in meters.
I forgot to address the usdview
issue. It was mentioned on the USD interest forum that usdview currently expects all PreviewSurface parameters to be explicitly defined, which this tool does not currently do. There are plans to update usdview
to not require all parameters to be set, but I can create an issue to track this one too.
@kcoley Ahh yea, I forgot to mention that I had to return a (transform, lambda m: m)
(or something like that) when the tool had to parse weights. I'm going to try disabling the animations and trying again. I think it's doable since USD also supports Blendshapes (weights) from what I can tell by playing with ARKit.
What forums are these? Also, would defining all of the params (guessing this?) cause the rendering to show up correctly? I was having trouble rendering the sample plane from that page with one of the carrot's textures, maybe that's why.
@ox
I think it's doable since USD also supports Blendshapes (weights) from what I can tell by playing with ARKit.
Yep, USD does support blend shapes in the latest release, so I would just need to implement it
What forums are these?
There is a USD interest Google group: https://groups.google.com/forum/#!forum/usd-interest You'll just need to sign in with a Google account.
Also, would defining all of the params (guessing this?) cause the rendering to show up correctly?
Yes, that was mentioned in one of the threads in the group. I have not tried it myself, but I will implement it after fixing the bigger skeleton/blend shape animations.
Hmm no dice on getting a single PreviewSurface to render properly. I edited the pbrmaterial_6
Material here and am still getting a black body for the carrot. I then tried to use a primvar to somehow get the normals passed into the PreviewSurface but kind of got lost.
What's interesting is that Apple's models (like this red chair) come out looking gray, and use normal maps and primvar shaders to extract the normals from a png rather than specifying normals
on the Mesh.
@ox
I didn't have any issues with the render, used xcode beta 6. Viewable in IOS 12 beta 10.
@wave-electron Hmm strange. By render I meant in usdview
, which I was assuming would be the definitive tool on USD rendering. Glad to see that it works, but I'm on iOS 12 Beta 11 (16A5365b) and I don't even get the preview.
How is your USDZ 400kb smaller than the USDZ I provided here? The only difference reported by usddiff
between the two is that mine has assets in a dir called 0
and yours does not. Did you use usdzip
or the usdz_converter
?
Ok I think I figured it out! turns out usdzip
is very naive in how it constructs the usdz files. Some changes I had to make:
.usdc
extention.usdc
file is the first argument to usdzip
I was circling around it until I started dumping the contents of @wave-electron's model. I'm now able to get the model to show up in the Files app! Thank you for your help y'all.
I am having trouble figuring out why this USDZ file (I used
gltf2usd
to make a USDA, then zip'd withusdzip
) is rendering incorrectly. Usingusdview
I'm getting a fully black model, and when I try to open it with iOS 12 Beta 9, the model is tiny and invisible. I've combed through the Materials and they seem fine, as do the Meshes. I'm fairly new to USD so I'm not sure where else to look. Is there a better way to check the model's textures?Here is the original gltf: carrothead.gltf.zip.txt
And here is the generated USD file: carrothead.usdz.txt