Mylar Brush Export Issues
Imported an FBX of my model in Unity direct and the mylar brush does not keep the same shape as it does in Open Brush (loses the taper of the brush stroke). That should say Unity up top. Can't edit the title.
85 Replies
I tried changing the brush type within Unity and it didnt solve the issue (single sided, double sided etc)
Default brush prefab is tube UV, is hooked up to MylarTube.shader. My impression is that it modifies the specular shader to do something tricky with reflection. Shader only takes an albedo directly and adds a squeeze amount variable. Not sure if its actually modifying the physical shape of the tube or just the surface lighting. Interestingly it doesn't use a blend mode in the asset export settings on the brush (unless I accidentally changed that).
So not so much an answer, but might be useful info if its script related
If you make a duplicate brush and change the guid and brush prefab might be insightful.
**misread the above. You changed the brush type and used an fbx. Is it losing the script attachment as an fbx? Hmm
**misread the above. You changed the brush type and used an fbx. Is it losing the script attachment as an fbx? Hmm
Just added Mylar material to the Mylar brush manually like I have to when importing fbx into unity. Glbs still don’t export for me.
I played around with single/double because you have to do that with many of the single sided brushes or one side is transparent in Unity or doesn’t show the correct normals
For example tapered marker will show squared edges instead of tapered. I wanted to see if it would change the Mylar as well but it didn’t
Oh. How come I've never noticed that before. I suspect Mylar is doing it's stuff via vertex shader magic which won't be reflected in the mesh itself. @mikesky - this is going to be annoying to fix - we'll have to special case stuff like this in the exporter.
Gonna be fun porting the hlsl logic to C#
If it wasn't for the fact that Mylar is one of my favourite experimental brushes, I'd be tempted to consign it to the bin of "experimental brushes that are too much work to support going forward"
(I guess there must be a way to read vertex positions back out of the shader 🤔 )
It my fav too @andybak
So - places it will work are: 1. Unity via Toolkit/SDK 2. WebGL via our three.js loader.
Anywhere else will have this issue currently.
Oh boy 😅
To be honest though, is this any different to other fancy brushes? They need the SDK to look right as well
Well - all the other brushes have meshes that correspond to how they look in the headset.
This is the only brush that I have encountered so far that I can't fix within unity settings.
this is the only case i know where the actual geometry differs from the exported one.
besides smoke etc.....
Hey @andybak Just checked my party world (9/2021) and the artcrypt world (10/2021) in vrc where I had mylar. Apparently it worked at one time. THose are showing as tapered.
However, when I use it now on new builds it shows the same thickness throughout similar to the icing brush. So something must have changed between now and then in the build.
Maybe its messing something up on export?
I know it was the same issue with mylar as far back as jan 2022 because I also noticed it with my mona build (no taper).
Based on the dates of the two worlds and mona, it must have been in a OB build somewhere in nov/dec 2021 where it broke.
How did you get that into VR Chat? Isn't that via Unity?
yes... all unity
same with mona
So that will work. It's a different process
Unity and three.js should be fine
Is the error in the export?
It's really an error as such. The shape of the mylar brush is partly created in the shader - so any pipeline that doesn't support custom vertex shaders won't show the shape.
Currently custom shaders only work in a) Unity b) WebGL (but only if you use a custom loader)
Blender's materials are totally different so will never be able to use our shaders - so we need to bake in the correct shape at export time.
No other brush does this as far as I know. Animated brushes do something similar but only for the animated shape changes.
This is all in unity sorry about Blender in the title. I couldn’t change the title in the post.
What would cause it to work before and not now?
Are you using the version of the SDK/Toolkit that has support for experimental brushes?
Yes always
Has anything changed to it since 8/2021?
Can you zip up the Unity Assets, Packages and ProjectSettings folder and DM them to me?
Not that I know of
For the model I just showed you?
Any project that has this problem and contains a mylar stroke
Sure I’ll send you a fresh one
Where do you download the SDK from? What's the url you use?
Wait - you're using fbx with the SDK/Toolkit?
Yes
I just tried it - glb works fine. We stopped recommending fbx with the toolkit ages ago. Because it wasn't working
Still having export issues with the builds I’m using. Never generates a glb (0mb). Does this work in the new beta build Mike just pushed out?
I can try again this am
I don't know why you're getting 0mb. Is this is an issue we've previously discussed? What was the resolution?
My recollection was that we'd fixed those issues.
Yes. Same issue. Too many builds… gets confusing. I’ll go back to the beta on oculus and try again…. Or do #you want me to try on steam
Try on what you normally use. The point is - glb should work. If it doesn't we need a reproducible example so we can fix it.
Ok will give it a go this am. I’ll let you know how it goes within the hour
And if this relates to an earlier discussion that wasn't finished, a link to that would be handy.
Ok will do
The Oculus Open Brush Beta doesn't have experimental brushes enabled. Using steam beta with experimentals now
@andybak Glbs exports are not working out of beta - experimental on steam. The file renders nothing 0KB
Reg beta pre release generates the GLB but mylar and waveform (both experimentals in the piece) did not show in the GLB, just the original TB brushes would show.
Ooooh these versions hurt my brain!
yes can we please condense them? Makes it easier for both of us
(we'd love to but that means merging experimental features to main - no other way to do it)
Why would the oculus beta not have experimentals?
It does - but not via the Oculus Store (because Oculus doesn't allow more than two versions)
Grabbing the build from Github should work.
I used the drop down to select beta though
Beta and Experimental aren't the same thing.
"Experimental" is an old Google thing we haven't got rid of yet.
youre really trying to get me confused now.....
I always refer to it as "Experimental Mode" just to distinguish it from other things
Im going by what is on steam and how it is labeled
But its not labeled that way;)
?
shall we put this naming discussion to one side for now?
I want to get the glb thing clear
Glbs exports are not working out of beta - experimental on steam. The file renders nothing 0KBOK. Can you send me the .tilt file?
Reg beta pre release generates the GLB but mylar and waveform did not show in the GLBWhat is "reg beta pre release"?
one sec
(There's a bit of a mixup on Steam. Prerelease and Beta mean the same thing. And they should be identical.)
So - you need to be using "experimental beta" or "experimental prerelease" - they should be the same thing. (I'm going to remove one of them soon)
So - if I try your sketch in that version - I should expect to see a 0kb glb, correct?
I used these two. Beta produced the glb but experimental brushes were not visible.
beta experimental did not produce a GLB at all.
Yes - ignore the first one
OK - so. I think the version confusion is the cause of this.
We're going to clean this up but for now - switch to "prerelease experimental". I get a working glb export:
ok will do.
Perfect! Taper shows in Unity as well as the DOTS!
🙌
And - even if you didn't intend to report the bug in Blender - it's a genuine bug that we wouldn't have spotted otherwise!
(well - "sort-of bug"...)
Thanks so much for your help. will be using prerelease experimental for now as long as there is no issues in this version with the camera and color
One last question. You know in Steam where it tells you what version you're on:
If we rename the versions to be less confusing - there's one annoying side-effect. Anyone on the version we get rid of will get moved on to the normal release.
My question is this: would you notice that label in Steam changing?
Under properties---> beta
Right here in the Library sidebar:
I'm just wondering how confusing it will be for people when they get switched to the normal release.
It shouldnt...Im seeing it show in the library like you
ok. we'll get rid of "prerelease" and keep just "beta" so look out for suddenly switching to the normal release when we do
super helpful
what I have will stay the same though correct since its experimental?
no
we're getting rid of all mentions of "prerelease" because "beta" is consistent with Oculus and other places we use the word
so you'll be moved and you'll have to change back yourself
ok
will the new title be just beta? or beta experimental? or just experimental? lol
Why is this always like a who's on first skit?
beta just means "things we haven't released yet"
experimental means "the stuff google wrote that isn't polished enough for the main release"
we're going to get rid of experimental just as soon as we can make it polished enough (or remove the bits we can't)
noticed the glbs are larger file sizes too huh?
Shouldn't make a difference when you do a build
Curious, are bubbles working?
ran into some kind of error involving version numbers when I was trying some things
Bubbles weee working will have to recheck. Biggest issues were dots, stars, embers, smoke. Looked like the png was the wrong shape
If they worked before, they probably still do, thanks.
Andy another quirky thing is happening with Mylar and I don’t know why. Started a new build and brought in mylar as a glb exported from the prerelease build and everything was perfect. As soon as I brought the same glb into a world that was already built I get the untapered version of the glb. Any idea what would cause this?
It’s the same version of unity
You talking about bringing a glb into the Unity using the Toolkit/SDK ?
Any console errors in the non-working case?
Yes I brought in the Mylar girl glb into unity using the same tbt and glb. One was a new build the other an existing one. Not sure re errors will check this am
@andybak There were no errors in the console log.
All I can suggest is that you zip up the Assets. Packages and ProjectSettings folder and send me a copy
Thanks andy, It's just one piece though. I can try again on another build but its my entire gallery.
I just need one example so I can investigate
ok will create another but will have to be this weekend...hopefully the problem replicates there
I got sent one today and it appeared to be missing some elements that were in the scene picture, including all instances of the disco brush. Haven't confirmed whether the correct model was sent. Definitely possible that there are importer issues. Should know in a couple of days
This is just GLBs @ancientworlds ? I noticed that too with a model I imported yesterday.
It was a glb model. Fbx doesn't transport the animation data, just keeps the underlying geometry, at least within the game environment.
Exports keep the albedo, last I checked. Think it may work differently within Unity at the top level, haven't explored that a lot.
The imported model I saw was made in open brush, no idea which version, was possibly pre-XR.
Was filming a path and looking for a workaround to missing image files, which apparently got deleted. As expected, the glb retained them. Not my file so not sure what was done on the other end aside from the model I got was a glb model.
Was filming a path and looking for a workaround to missing image files, which apparently got deleted. As expected, the glb retained them. Not my file so not sure what was done on the other end aside from the model I got was a glb model.