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
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.
@andybak is this partially caused by istanceof(https://github.com/icosa-gallery/open-brush/pull/294) with regards to particles?
@zandyxr please tag this post with the relevant tags to help us out
Just reformatting the top post so it's easier to read:
Still experiencing issues exporting GLBs.@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
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
Yep, badly worded but I was suggesting that beta may fix this 😄
Light assumption that Zandy is using official
(we maybe should have released this as a hotfix instead of waiting for the beta)
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?
Just try re-exporting using the beta.
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
I wouldn't have thought so but it's worth a try. Can you send me the glb?
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
that's ok. i can't look at it today
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.
So - the error is with "Fairy" - an experimental brush.
Are you using the version of the toolkit that supports experimental?
and is this the same error you see?
@zandyxr
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
so - do you get that error above?
no
cool
these bits use Icing. How do they appear in your copy of Unity?
Completely jacked .....
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
yes
and i don't know the original
maybe send me the .tilt as well?
I'm just dropping them in the build I saw the issue.
i'm also not seeing an error in TBT when i import your glb file
what is the error you get?
I dont get an error. Just bits missing
ah ok. i misunderstood
what parts are missing?
There are two snowmen missing icing and theelf is missing icing
i see this
I'll send the part of the tilt I exported in DM
and this
yes.....two snowmen missing icing
the elves are jacked too
this is just the icing for the snowmen:
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
i'm getting a bit confused.
that scene is more complex than the glb - and quite different.
and i get an error when i export it that you don't get:
I selected the items and exported
threw away the rest but that is the scene that generated the glb.
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?
Ive got to head out....be back later tonight...gotta fly running late. Can come back later to troubleshoot when I get back home.
my poor brain just sees lots of things and i don't know which ones to look at!
lol will have to tonight..I am sooo late. lost track of time.
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
Now I get no error - but stuff is missing:
@mikesky remember the gltf bug this relates to?
not sure if we ever fixed it - or really got to the bottom of it
vaguely 😅
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
gotcha - I didn't implicitly trust the gltf import/export code to be honest
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:
that looks related
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.
random icing missing.
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.
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
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
Which part the gui?
no idea because i'm still trying to untangle all this
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
something about the gui breaking in vr chat? is that not a different issue?
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
🤯
😂 sorry
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?
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
i think the obsolete thing is a red herring. I'd want to see the actual error message.
UI.text
exact error message. not a memory of it.
I don’t remember the error message because I fixed it as Unity suggested.
don't worry - i don't think it's related any way
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
ok. so looking at the images you posted and comparing them to what i can see
Do you get any warnings like this?
the yellow ones
I’ll check again…. Gotta load it first hang a sec
None related to TBT
None that say "No forward progress"?
No
Using TBT v 23.0.1
Version numbers don't help. You're using this one? https://github.com/IxxyXR/open-brush-toolkit/tree/experimental-brushes
Should be. It’s the only one that works for experimentals unless it was recently updated
experimental supported branch:
Standard branch:
yes its the same one....same tbt since aug 21
did you say there was an older version where you had less issues? or was that just related to bubbles brush?
standard TBT
Original one
?
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.
i'm trying to hone in on JUST the issue with icing and hull strokes disappearing
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
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.
🤣🤣🤣 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
@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
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
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
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
and exported with the newest OB TBTAs 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
Why do the particle brushes not work with the latest TBt then?
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
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
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
vs
The eyes/mouths are missing
At least you’ve got a festive piece to work on. 🤣
The eyes/mouths are missingWell one bug down, some more still to go
So is there a way to fix and retain the ability to export larger meshes?
possibly but for now I'm reverting the large mesh change. Breaking exports is more serious.
Wonder if you put things on layers it will export as one mesh?
i don't think so
anyway -
the eyes are there but there's a bug with the experimental brushes version of TBT
they come in as white - not black
Lol. She’s sad lol. The little one has one too?
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
But they are soooooo goood!
And very efficient brushes
which ones are essential in this sketch?
None in this particular one.
which ones are especially "efficient" in your view?
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
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.