GLB export inconsistent importing into unity

Still experiencing issues exporting GLBs. Sometimes they generate a valid file other times they don’t work in unity but the pngs and model is there. 2) GLBs brought into unity sometimes have missing brush strokes. This is random and happens with different brushes. 3) the original TBT worked fine with bubbles as well as other brushes in the particles category. 4) in the newest TBT bubbles no longer works at all and the png for each of the particle brush types the PNG in TBT is wrong. It’s basically a splatter for all and do not have the correct shape/representation for that brush. If anything, bubbles should work because it was never an issue, now it is.
116 Replies
Zandy
ZandyOP2y ago
I think one of the problems with glbs is the number or combo of brushes in the output file. I tried only selecting a couple of brushes with bubbles and it will work as a glb. Still having an issue with random brushes disappearing when using the glb as well. Again, very random. Also found that the TBT can break the gui in code. It’s obsolete and have to change it to UI.text for it to work properly (in VRC… not sure if it’s universal). The gui as is in unity will break worlds using TBT. Not sure if this is related to the errors above as well.
mikesky
mikesky2y ago
mikesky
mikesky2y ago
@zandyxr please tag this post with the relevant tags to help us out
andybak
andybak2y ago
Just reformatting the top post so it's easier to read:
Still experiencing issues exporting GLBs.
1. Sometimes they generate a valid file other times they don’t work in unity but the pngs and model is there.
2. GLBs brought into unity sometimes have missing brush strokes. This is random and happens with different brushes. 3. The original TBT worked fine with bubbles as well as other brushes in the particles category.
4. In the newest TBT bubbles no longer works at all and the png for each of the particle brush types the PNG in TBT is wrong. It’s basically a splatter for all and do not have the correct shape/representation for that brush. If anything, bubbles should work because it was never an issue, now it is
@mikesky - the change in that PR was designed to fool the toolkit into recognising our exports. i.e. it was meant to fix this issue. So in theory this should work now if the glb was created in the beta
mikesky
mikesky2y ago
Yep, badly worded but I was suggesting that beta may fix this 😄 Light assumption that Zandy is using official
andybak
andybak2y ago
(we maybe should have released this as a hotfix instead of waiting for the beta)
Zandy
ZandyOP2y ago
Sorry about that @mikesky It’s not allowing me now. It’s beta experimental using Unity 2019.4.3.f1 and the latest tbt vs the original. So if it’s an older sketch that I opened in beta it won’t work? So if you re-save under the beta it will?
andybak
andybak2y ago
Just try re-exporting using the beta.
Zandy
ZandyOP2y ago
I did that and had the error stated above…. I didn’t re-save in the beta version before exporting. Was just wondering if the re-save would fix the export errors
andybak
andybak2y ago
I wouldn't have thought so but it's worth a try. Can you send me the glb?
Zandy
ZandyOP2y ago
I’ve had several. Got to go back and figure out which ones had an error. Won’t be able to do it til tomorrow. Swamped today
andybak
andybak2y ago
that's ok. i can't look at it today
Zandy
ZandyOP2y ago
Sorry for the delay sending over a glb with this error (got sidetracked). Will send one in DM this AM @andybak Just sent the dm along with the pics of the included pngs. You'll see the import error with the snowmen.
andybak
andybak2y ago
So - the error is with "Fairy" - an experimental brush. Are you using the version of the toolkit that supports experimental?
andybak
andybak2y ago
and is this the same error you see?
andybak
andybak2y ago
@zandyxr
Zandy
ZandyOP2y ago
Its actually the icing brush not showing in the build. Part of one snowman, not another. Yes I am using the latest TBT that supports experimentals and unity 2019.4.31f
andybak
andybak2y ago
so - do you get that error above?
Zandy
ZandyOP2y ago
no
andybak
andybak2y ago
cool these bits use Icing. How do they appear in your copy of Unity?
andybak
andybak2y ago
Zandy
ZandyOP2y ago
Completely jacked .....
andybak
andybak2y ago
You said "Its actually the icing brush not showing in the build. " - is that not showing in my screenshot? it's hard for me to see what's wrong in your screenshots as they are quite busy
Zandy
ZandyOP2y ago
yes
andybak
andybak2y ago
and i don't know the original maybe send me the .tilt as well?
Zandy
ZandyOP2y ago
I'm just dropping them in the build I saw the issue.
andybak
andybak2y ago
i'm also not seeing an error in TBT when i import your glb file what is the error you get?
Zandy
ZandyOP2y ago
I dont get an error. Just bits missing
andybak
andybak2y ago
ah ok. i misunderstood what parts are missing?
Zandy
ZandyOP2y ago
There are two snowmen missing icing and theelf is missing icing
andybak
andybak2y ago
i see this
Zandy
ZandyOP2y ago
I'll send the part of the tilt I exported in DM
andybak
andybak2y ago
and this
Zandy
ZandyOP2y ago
yes.....two snowmen missing icing the elves are jacked too
andybak
andybak2y ago
this is just the icing for the snowmen:
Zandy
ZandyOP2y ago
Do you see the hat floating? there should be icing under it. I'll send the file hang on. It'll be a bit.. I closed OB but it still says its open when its not. Need to restart. File sent is just a partial scene but what I generated the glb from
andybak
andybak2y ago
i'm getting a bit confused. that scene is more complex than the glb - and quite different.
andybak
andybak2y ago
and i get an error when i export it that you don't get:
Zandy
ZandyOP2y ago
I selected the items and exported threw away the rest but that is the scene that generated the glb.
andybak
andybak2y ago
i just need a way to easily see the problem you're having. that's hard in a scene with dozens of things - can you make a screenshot showing the difference? or just explain to me?
Zandy
ZandyOP2y ago
Ive got to head out....be back later tonight...gotta fly running late. Can come back later to troubleshoot when I get back home.
andybak
andybak2y ago
my poor brain just sees lots of things and i don't know which ones to look at!
Zandy
ZandyOP2y ago
lol will have to tonight..I am sooo late. lost track of time.
andybak
andybak2y ago
but - i do get an error when i export the whole tilt you sent. i wonder if that's the source of the problem correction - i get an error importing the whole scene you sent no error when exporting Here's the previous discussion of my error: https://discord.com/channels/783806589991780412/804677406572150814/923117010676764702 Gonna try that workaround
andybak
andybak2y ago
Now I get no error - but stuff is missing:
andybak
andybak2y ago
@mikesky remember the gltf bug this relates to?
if ((binLength % 4) != 0) { Err("bin length%4"); }
if ((binLength % 4) != 0) { Err("bin length%4"); }
not sure if we ever fixed it - or really got to the bottom of it
mikesky
mikesky2y ago
vaguely 😅
andybak
andybak2y ago
I'm going to pause here until @zandyxr is back as I want to make sure this is the same issue. the binLength thing does need fixing but it might not be the problem Zandy is getting basically - we seem to generate corrupt gltf meshes on rare occasions
mikesky
mikesky2y ago
gotcha - I didn't implicitly trust the gltf import/export code to be honest
andybak
andybak2y ago
I explicitly don't trust it! 😉 trouble is - our fbx exports have issues as well and they are harder to fix I get a warning if i comment out that line:
No forward progress
UnityEngine.Debug:LogWarningFormat(String, Object[])
TiltBrushToolkit.<GenerateMeshSubsets>d__28:MoveNext() (at Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs:696)
TiltBrushToolkit.ImportGltf:CreateMeshPrecursorsFromPrimitive(ImportState, GltfPrimitiveBase) (at Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs:870)
TiltBrushToolkit.ImportGltf:CreateMeshPrecursorsFromMesh(ImportState, GltfMeshBase) (at Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs:425)
TiltBrushToolkit.ImportGltf:CreateMeshPrecursorsFromNode(ImportState, GltfNodeBase) (at Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs:414)
TiltBrushToolkit.ImportGltf:CreateMeshPrecursorsFromScene(ImportState) (at Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs:408)
TiltBrushToolkit.ImportGltf:BeginImport(String, IUriLoader, GltfImportOptions) (at Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs:317)
TiltBrushToolkit.ImportGltf:Import(String, IUriLoader, IImportMaterialCollector, GltfImportOptions) (at Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs:166)
TiltBrushToolkit.Glb2Importer:OnImportAsset(AssetImportContext) (at Assets/TiltBrush/Scripts/Editor/Glb2Importer.cs:45)
UnityEditor.Experimental.AssetImporters.ScriptedImporter:GenerateAssetData(AssetImportContext)
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
No forward progress
UnityEngine.Debug:LogWarningFormat(String, Object[])
TiltBrushToolkit.<GenerateMeshSubsets>d__28:MoveNext() (at Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs:696)
TiltBrushToolkit.ImportGltf:CreateMeshPrecursorsFromPrimitive(ImportState, GltfPrimitiveBase) (at Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs:870)
TiltBrushToolkit.ImportGltf:CreateMeshPrecursorsFromMesh(ImportState, GltfMeshBase) (at Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs:425)
TiltBrushToolkit.ImportGltf:CreateMeshPrecursorsFromNode(ImportState, GltfNodeBase) (at Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs:414)
TiltBrushToolkit.ImportGltf:CreateMeshPrecursorsFromScene(ImportState) (at Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs:408)
TiltBrushToolkit.ImportGltf:BeginImport(String, IUriLoader, GltfImportOptions) (at Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs:317)
TiltBrushToolkit.ImportGltf:Import(String, IUriLoader, IImportMaterialCollector, GltfImportOptions) (at Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs:166)
TiltBrushToolkit.Glb2Importer:OnImportAsset(AssetImportContext) (at Assets/TiltBrush/Scripts/Editor/Glb2Importer.cs:45)
UnityEditor.Experimental.AssetImporters.ScriptedImporter:GenerateAssetData(AssetImportContext)
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
that looks related
Zandy
ZandyOP2y ago
Ok before I give you the comparison, I need to mention this again. 👆 This was an error I was able to correct by changing the code as stated above. Not sure if gui in code was impacting this issue, but the latest TBT code had to be changed to not produce console errors.
Zandy
ZandyOP2y ago
random icing missing.
Zandy
ZandyOP2y ago
Again Icing and what appears to be missing is a partial bit of matte hull as well (girl elf's face and part of the elf near santa) as well as icing. Again this is very random.
Zandy
ZandyOP2y ago
I was able to import the fbx and in some cases select only a few pieces on export and use the glb and it seemed ok. The final result is in VRC as a world along with other OB exports. So if you have a question about a particular part just give me a shout. The world is a combo of TB, OB and GS I did update a major part of an original TB sketch in OB and added OB art to it. Not sure if the combo is breaking anything either
andybak
andybak2y ago
If that's a separate issue, make a separate forum post. This one looks to be pretty complex on it's own 1 issue per post is ideal
Zandy
ZandyOP2y ago
Which part the gui?
andybak
andybak2y ago
no idea because i'm still trying to untangle all this
Zandy
ZandyOP2y ago
It’s all one issue. Just telling you what was happening as I was building it with the exports In case it helps point to the problem
andybak
andybak2y ago
something about the gui breaking in vr chat? is that not a different issue?
Zandy
ZandyOP2y ago
It was happening with this build. Again it hasn’t happened on others, maybe because this is the first I used GLBs. All my other worlds are fbx only
andybak
andybak2y ago
🤯
Zandy
ZandyOP2y ago
😂 sorry
andybak
andybak2y ago
so. let me try and get the indisputable facts down. 1. You're not seeing any errors when you import a glb? not the binLength % 4 error i was getting? 2. Missing brush strokes. Icing and hull and maybe some others? 3. When building for vr chat you got a gui error? "This was an error I was able to correct by changing the code as stated above." - once a post becomes this long "as stated above" isn't too helpful. Changing what code?
Zandy
ZandyOP2y ago
The gui was obsolete according to the error and I had to change the code to .text as stated above for it to work 1. No 2. Yes 3. UI.text
andybak
andybak2y ago
i think the obsolete thing is a red herring. I'd want to see the actual error message.
Zandy
ZandyOP2y ago
UI.text
andybak
andybak2y ago
exact error message. not a memory of it.
Zandy
ZandyOP2y ago
I don’t remember the error message because I fixed it as Unity suggested.
andybak
andybak2y ago
don't worry - i don't think it's related any way
Zandy
ZandyOP2y ago
But it is an obsolete line of code in TBt. It was gui something and changed it to UI.text and it fixed it It broke the build before I changed it to UI.text
andybak
andybak2y ago
ok. so looking at the images you posted and comparing them to what i can see
andybak
andybak2y ago
Do you get any warnings like this?
andybak
andybak2y ago
the yellow ones
Zandy
ZandyOP2y ago
I’ll check again…. Gotta load it first hang a sec None related to TBT
andybak
andybak2y ago
None that say "No forward progress"?
Zandy
ZandyOP2y ago
No Using TBT v 23.0.1
andybak
andybak2y ago
Version numbers don't help. You're using this one? https://github.com/IxxyXR/open-brush-toolkit/tree/experimental-brushes
Zandy
ZandyOP2y ago
Should be. It’s the only one that works for experimentals unless it was recently updated
andybak
andybak2y ago
experimental supported branch:
andybak
andybak2y ago
Standard branch:
Zandy
ZandyOP2y ago
yes its the same one....same tbt since aug 21
andybak
andybak2y ago
did you say there was an older version where you had less issues? or was that just related to bubbles brush?
Zandy
ZandyOP2y ago
standard TBT Original one
andybak
andybak2y ago
?
Zandy
ZandyOP2y ago
Yes The original TBT worked fine with all animated particle brushes etc. including bubbles. All brushes in the particle category are an issue now in the newest TBT for OB using FBX (stars, snow, embers, smoke, etc....now bubbles is touch and go depending if its fbx or glb.
andybak
andybak2y ago
i'm trying to hone in on JUST the issue with icing and hull strokes disappearing
Zandy
ZandyOP2y ago
The issue I had was that same sketch I sent you. Exporting all out caused the bubbles to not show in the glb. When I selected only a few things the glb worked you asked about bubbles so just explaining and the bubbles also disappeared for me in this build. so not limited to icing and hull....its really random what disappears in the glb
andybak
andybak2y ago
ok. i've got a much smaller, simpler sketch that shows the problem in the morning i'll try removing even more stuff and see what the smallest sketch that i can come up with the still demonstrates this issue I also managed to sustain my first tilt brush injury in the process. We need a better way to delete things than just "wild fling"! My shoulder isn't up to it.
Zandy
ZandyOP2y ago
🤣🤣🤣 the joys of VR! Set the guardian and it’ll be no worries! Hope you’re ok. No holes in the wall? Keep the fling. Please don’t get rid of that
andybak
andybak2y ago
@zandyxr OK. Currently testing your claim that "the original TBT worked fine". I've got a subset of your scene with just 3 snowmen. For me, it imports with 1 snowman broken in all versions of TBT. So my current hypothesis is "whatever the issue is, it's independent of which TBT version you use". If you have anything that might indicate otherwise then let me know (but bear in mind there might be more than one issue with the full scene so use the small test scene I'm talking about) I'll DM you that
Zandy
ZandyOP2y ago
The original TBT worked fine on pieces created in TB only The piece I sent you was originally created in TiltBrush, it was updated with experimental brushes and saved, then I divided the piece as needed for the world where parts were exported
andybak
andybak2y ago
I've got to be strictly scientific in forming hypothesis and testing them if I'm going to fix this "The original TBT worked fine on pieces created in TB only" - I need to work from a single scene so I can replicate the test multiple times Currently - exporting the three snowmen scene from the non-beta seems to work. I'm now testing in beta for comparison
Zandy
ZandyOP2y ago
TB pieces created only in TB and using the original TBT was never an issue at all. All brushes worked and converted properly on export into unity. No exception. The problem is either happening when you use an TB piece OB piece or a TB piece updated with OB and exported with the newest OB TBT
andybak
andybak2y ago
and exported with the newest OB TBT
As far as I can tell the TBT version makes no difference Or rather "for the test scene I'm using, the issue appears for all TBT versions" again - there may be more than one bug here
Zandy
ZandyOP2y ago
Why do the particle brushes not work with the latest TBt then?
andybak
andybak2y ago
there may be more than one bug here my job is to find one bug and fix it. currently it's the "missing snowman" bug
Zandy
ZandyOP2y ago
Ok will work with you to help solve it as best as I can Just trying to provide as much info as possible In addition once GLBs exports work properly, the particle brushes work as they should, but not for fbx
andybak
andybak2y ago
if it's not related to the missing snowman, save it for now I think I've found the cause. Remember when we increased the limit for a single mesh - so that brush strokes weren't split across many gameobjects when exported? If I undo that change, then I can export fine from the latest beta at least for the three snowmen scene
andybak
andybak2y ago
andybak
andybak2y ago
vs
Zandy
ZandyOP2y ago
The eyes/mouths are missing At least you’ve got a festive piece to work on. 🤣
andybak
andybak2y ago
The eyes/mouths are missing
Well one bug down, some more still to go
Zandy
ZandyOP2y ago
So is there a way to fix and retain the ability to export larger meshes?
andybak
andybak2y ago
possibly but for now I'm reverting the large mesh change. Breaking exports is more serious.
Zandy
ZandyOP2y ago
Wonder if you put things on layers it will export as one mesh?
andybak
andybak2y ago
i don't think so anyway -
andybak
andybak2y ago
andybak
andybak2y ago
the eyes are there but there's a bug with the experimental brushes version of TBT they come in as white - not black
Zandy
ZandyOP2y ago
Lol. She’s sad lol. The little one has one too?
andybak
andybak2y ago
the workaround is probably to either a) don't use experimental brush version or b) fix the colours yourself At some point we'll fix this properly but - experimental is called "experimental" for a reason so it will just go on the list
Zandy
ZandyOP2y ago
But they are soooooo goood! And very efficient brushes
andybak
andybak2y ago
which ones are essential in this sketch?
Zandy
ZandyOP2y ago
None in this particular one.
andybak
andybak2y ago
which ones are especially "efficient" in your view?
Zandy
ZandyOP2y ago
I exported those and saved separately My party world etc. The experimental brushes are very low poly as is. All Mylar, fairy, tapered waveform (use those the most). But the party world is mostly experimental. Very efficient brushes
andybak
andybak2y ago
Marking this as solved as the original issue was fixed by backing out the large mesh support. Feel free to create a new post for the other issues discussed after that.
Want results from more Discord servers?
Add your server