GLB Models Import Problems.

Using the oculus store version. Attempting to import a glb/gltf file created exported from adobe stager. When attempting to import the model, it appears to import and the outline is visible when select all is used. The image is viewable and readable in paint3d (windows), 3dviewer and is visible in explorer via 3dViewer.
I uploaded the piece to a site, minted it and redownloaded it. Attempted to import that way and received an "invalid file format" response and an X through the model. The downloaded file is visible in explorer, 3d Viewer.
So upshot is, the importer seems to be having difficulty reading some glb models. EDIT: Tested import into blender. Imports fully with materials. Possible that the final version of the model was created there, lost track of the exact process, was shotgunning import strategies
23 Replies
andybak
andybak3y ago
Yeah. The current glb import is very limited. We've got a replacement underway. https://github.com/icosa-gallery/open-brush/pull/278
GitHub
Feature/gltfast by andybak · Pull Request #278 · icosa-gallery/open...
Use GLTFast as the importer and fall back to the old code if GltfImport.Load() fails. Tested on most of the Kronos GLTF 2.0 samples. Apart from some more obscure examples, they all seem to import f...
AncientWorlds
AncientWorldsOP3y ago
Nice! Finding this quite erratic. Thought I had it sort of worked out, but can't seem to replicate. Exported models often lose textures. Sometime won't open its own exports or find the textures that it previously had. Unclear how well other programs read the files, seems like they usually don't but sometimes get color if its albedo assigned and built into the brush. GLBs exported generally aren't readable in the main version. Will keep plugging at that, a bit confused about what I've tried so far, maybe a more detailed report later.
AncientWorlds
AncientWorldsOP3y ago
GitHub
GitHub - KhronosGroup/glTF-Validator: Tool to validate glTF assets.
Tool to validate glTF assets. Contribute to KhronosGroup/glTF-Validator development by creating an account on GitHub.
AncientWorlds
AncientWorldsOP3y ago
Their online model validator with error checking https://modelviewer.dev/editor/ Also has an online model viewer https://modelviewer.dev/
3D model-viewer embed
Neil Armstrong's Spacesuit from the Smithsonian Digitization Programs Office and National Air and Space Museum
andybak
andybak3y ago
Our current exporter fails on tons of those checks so it's not terribly useful. We need to replace the exporter with UnityGLTF ideally but that ain't gonna be fun. There's some gnarly code on the Open Brush export side of things.
AncientWorlds
AncientWorldsOP3y ago
When I ran it on actual models it was usually just one check missing repeatedly. At least at a glance, although wasn't keeping too close of track of the models, just sort of randomly opening anything with a working glb file. Think maybe something with that was an optional accessor in 1.0 and required in 2.0. Will maybe take a bit more of a careful look at it. Functionally speaking, might have had something to do with failure to move the normal maps, but that might have been in a different context. Maybe take another look at that today if I get time. Read quite a bit about gltf specs and things last night. Few more times some of it might sink in :: Update (PR278) Systematically testing this, still a few questions, but in better shape than I initially thought it was. Will give a more detailed summary after I run some more extensive tests (lots of things to look at here) Observations 1. It's generally usable, although has some slight weirdness. Has difficulty with models created outside of open brush, it can display and use them (if albedo and normal present), just can't export properly in any format. Appears to be unsuccessfully attaching linked external models on export or important parts of them. Imported external models that the version can read have to be loaded twice. Importing into unity generally does not display, although displays in game in most instances. Multiple resaves (new sketch) may increase breakage issues. Possible color space issues in some instances. 2. Is not backwards compatible for GLB (as expected) 3. Using custom non-animated unity brushes that are internal to unity, at least the initial albedo will be exported when done as FBX user modified brushes have less testing, and I'll have to load different versions to look at that more closely. Animated brushes not tested yet, with or without existing shader scripts. 4. Exports of sketches that only contain models doesn't work, and the sketches may not be loadable at all. The game appears to expect at least one brush stroke, possibly using an in game brush.
5. Unconfirmed: Mixing some brushes with models may create issues with the model load, seems to be related to animated brushes, lots more to look at there. Possible that this is limited to external model imports (not isolated yet) 6. Rebrushing doesn't appear to cause issues based on the legacy brush (needs further testing) 7. Resulting glb files are viewable in color (if the base brush has color, no additional color applied/read with earlier version brushes at the minimum). Reads only the albedo. Possibly improved in interim versions. The brush strokes added in PR278 retain color qualities or can be reattached in unity. External viewers (very limited testing using windows tools) as applies to custom brushes 8a. 3dViewer will view the view both the fbx and glb in color 8b. Paint3d requests an import of a texture linked to model @andybak Do we have a code version available for PR278 that includes the "experimental" brushes? Some tests I'd like to do with that
andybak
andybak3y ago
Anything you run inside Unity has access to experimental brushes.
andybak
andybak3y ago
GitHub
GitHub - IxxyXR/open-brush at feature/gltfast_openxr
Open Source Fork of Tilt Brush. Contribute to IxxyXR/open-brush development by creating an account on GitHub.
AncientWorlds
AncientWorldsOP3y ago
Excellent, thank you Hmm can't seem to get 1.0173 working at the moment (prepackaged version). Seems to not be finding steam.
Never mind that the steam home environment is in there, but not showing any game icons. Needs further testing. Possible issues with exporting both glb/fbx in the same sketch with the latest version I have that works in headset (278) Models imported from earlier versions didnt' display custom hulls on first try, got them to go later (needs more checking), not tested with triplanars since I converted all of them in my current test set. Handled new brushes fine, as long as they weren't animated (fbx only in that version). Every time I run something down seems like I get more questions than answers, but its slowly sorting itself out. Wondering how hard it would be for me to install glfast in the old version until I can launch something that's up to speed. Lot of rewriting or just plug and play?
andybak
andybak3y ago
Hmm can't seem to get 1.0173 working at the moment (prepackaged version).
Sorry to be thick but does this refer to the Store version on Steam? Version numbers don't mean a huge amount to me - I tend to think in terms of "where did you download it from and when did you last update it?"
AncientWorlds
AncientWorldsOP3y ago
Must have got it from git? Hmm, what version do you recommend? Oculus headset, pc setup. Ideally something that can export glbs with some success if we have that going on Easy to lose track of what's where and what the status is on things
andybak
andybak3y ago
Recommend for what?
AncientWorlds
AncientWorldsOP3y ago
Exporting glb?
andybak
andybak3y ago
There's only two options at the moment: 1. The GLTFast branch which has some bugs and might end up being replaced by UnityGLTF 2. The normal store release (all other branches use this importer)
AncientWorlds
AncientWorldsOP3y ago
Ok, need to double check that. Turn off experimental releases in oculus?
andybak
andybak3y ago
Makes no difference. All versions other than the GLTFast build use the same importer Actually - to clarify - GLTFast build only replaces the Importer - the exporter is the same However might be some unintended side effects on exporting when your sketch uses imported gltf models...
AncientWorlds
AncientWorldsOP3y ago
Alright thanks. I'll check it on a fresh piece. May have used the wrong version Possible workaround? Is there a command line that can be used to export fbx/glb/etc? I noticed the release notes show that this can be done with full sketches, with this command (example) TiltBrush.exe --export Untitled_15.tilt Untitled_2*.tilt C:\Downloads\downloaded.tilt --exportPath C:\Temp -batchmode Also not clear how I'd structure the above command with openbrush?
andybak
andybak3y ago
It would be exactly the same except OpenBrush.exe Buti if you're running inside Unity then drop that part entirely
AncientWorlds
AncientWorldsOP3y ago
so just start with the dashes? and export path is just wherever I want the output to go?
andybak
andybak3y ago
yeah - i think so
AncientWorlds
AncientWorldsOP3y ago
Alright will give it a shot and see what it does Different approach. Does appear that I can get some form of mixed model out. The white area is an imported model (previously colored) from my custom set, exported as fbx, reloaded and exported as glb, as viewed through a viewer testnet.
The textures stored with the model appear to be stored differently than those in the final glb export, which has new brush strokes added. An interim possibility, if we can do it, is to bake the textures in (will test that with an external tool, which has that capability, to see what happens there). I don't think it would allow animation on the model presumably. Although in theory it would allow combining active elements with static models, which would be a fairly decent workaround. Will test that and see if I can find a way to make that work.
AncientWorlds
AncientWorldsOP3y ago
AncientWorlds
AncientWorldsOP3y ago
Still pretty hacky, but better than the model coming in without new brushes at all, or alternately the model in color, without brushes. Feels like a form of progress
Want results from more Discord servers?
Add your server