Locomotion
@andybak Sorry I wasn't sure how to ask. I think SDK is actually too broad a term because it seems like pretty much any tool kit of any kind can be called an SDK. I've been looking around trying to see if there is an interaction kit that can help create movement like the fly mode in Openbrush. I may have to stick with a more basic idea though. It's starting to look like movement like that is way beyond my understanding.
101 Replies
I'm still not entirely sure I understand what you want to achieve. Are you trying to add new ways for the user to move around inside Open Brush itself?
Not in open brush itself. A friend of mine made an art piece in open brush.
I've been working on importing into unity so it can be accessed as an application. The application is to provide a user with a free roam or on rails experience of the art piece.
I've got the piece imported in. And I've got locomotion with XR interactive toolkit working. I assume it's possible to get movement like the fly mode in open brush to work with the XR toolkit. I was just wondering if there are any other locomotion assets or packages that may be setup for movement like that already.
I've been looking for tutorials on creating flying movement, but I haven't found much.
I'm not looking to have this done for me. Do you think it's possible to mimic the fly mode in open brush with the XR interaction toolkit?
Or is there something better I could be using that might be more intuitive for some inexperienced like me.
Also, I apologize for my poor communication. I never realized how bad I was at asking questions or trying to find information.
No - I think you've mentioned this before - I just have a terrible memory for past conversations!
I don't much experience with the XR Interaction toolkit but mimicking our "Fly Tool" would be pretty simple. Just take the vector from the controller direction and add it to the current player position.
We should consider adding some locomotion options to our official SDK/Toolkit
I keep hoping someone else will contribute stuff like that!
You think something like this could be done with visual scripting? I've practiced some C# but my code writing non existent.
Yeah but don't ask me how! I've not got my head around Unity visual scripting
Who knows. If I play with this stuff long enough to figure out how to contribute maybe I can add a feature or two one day. lol
One idea that's floated around is for the Open Brush Toolkit to support camera paths - and use them for animating the user.
Aren't camera paths already in open brush?
Yes but I don't think they export to the SDK/Toolkit
Right, so you're talking a path system like I want to make, but built in and actually exports out?
Camera paths are already saved in the tilt file. Just need some code that reads them back into Unity.
I see. Is open brush made with unity? If not is open brush still C#?
Open Brush is all Unity
I hadn't look at that yet. I'll have to do some digging and see what steps I need to take to do what you said about matching the controllers vector and applying it to the camera.
I was thinking you had told me that there are better options than the XR Interaction toolkit when working with locomotion.
There are other libraries but if you are a bit new to Unity/C# you should probably find the simplest and most "code-free" solution.
I have an idea.
There's a framework that might be ideal - I've just not had the time to try it out. One sec.
VR Builder - Open source toolkit for VR creation | Visual Scripting...
Get the VR Builder - Open source toolkit for VR creation package from MindPort GmbH and speed up your game development process. Find this & other Visual Scripting options on the Unity Asset Store.
Chat to @davidlahner - he is on Discord and would be happy to tell you a bit about it
ooh yeah I actually saw this one. I wasn't sure how it work or if I could import the Openbrush sketch the same way.
I don't see why it wouldn't though.
If you combine that with our SDK then it should work fine
Our SDK handles the import - VR Builder handles the interaction
Makes sense. When it comes to importing openbrush sketches into unity is there only one way? Which is using the SDK and pulling in the GLB folder into assets?
I was trying to recreate a texture error I was running into. But when I made a new project and imported the art piece in again.. the brush stroke that was giving me trouble was still set to the new texture I had changed it to in the old project.
Sorry. Not sure I understand
"open one way"?
Ah - "only one way"?
pulling in the GLB folder into assets?That's the recommended way
the brush stroke that was giving me trouble was still set to the new texture I had changed it to in the old project.That shouldn't be possible. Are you sure it was a separate project?
I'll have to double check. I was pretty sure I had started a totally fresh project.
I started a new project
loaded in the openbrush sdk
brought the glb folder in
loaded xr plugin management and enabled open xr
Converted the main camera to xr rig
loaded the project into HMD and the texture still shows that off white color it changed to when I messed with it originally.
I need to reorganize some files so I'll scrap all these project folders and try again, but its still not giving me that same render error.
loaded the project into HMD and the texture still shows that off white color it changed to when I messed with it originally.So forget about XR for now. You've got a glb that you modified in one project and the modification shows up in a brand new project? Exactly how did you change the texture?
its this brush
I had changed it here under the shader option
in another project I had changed the material to Brush/DiffuseDoubleSided
and it made it stop showing in pink at least.. but now when I load the sketch into a new project it just shows like it did when I changed it... but its still under the brush/special/DiffuseNoTextureDoubleSided
Did you copy anything from the old project to the new?
Wait. Why is it showing in pink? Are you using experimental brushes?
I don't think my friend used any experimental brushes. I had asked her about that and she said she just used what was available. No I haven't copied anything over.
weird. DoubleTaperedFlat is only used by "Pinched Flat" - which isn't experimental. So not sure why it was pink. That's usually "error loading shader" color.
Unless of course it was just a pink stroke!
No it wasn't a pink stroke. This was definitely the error loading shader pink. I'll have to delete my old projects and try and recreate some steps.
Send me an example glb and i'll take a look
I'll try and make one. I've been meaning to load into open brush and make a sketch with a few of the brush strokes with different colors to see how they all load.
I think I figured something out
I think everything is loading from Openbrush. In my friends sketch she did use a grey pinched flat brush but it looked like a different color because of some of the brushes that were used over the grey brush.
My only guess is that effect is not carrying over into unity.
ok So detail that was not carrying over was the world light in Openbrush. When I changed the main light in unity to a similar color to what my friend has in open brush things are looking better. One thing I've been seeing though is details from certain brushes are not able to be seen from as far away in unity as they can be in open brush.
are not able to be seen from as far away in unity as they can be in open brush.Have you tried changing the camera far clipping value?
I looked into render distance and some others. I didn't think of looking up the term clipping. I'll look at it now.
What is the brush name for brush_CoarseBristles
It's not the clipping plane. Some of the brush_Dots and brush_CoarseBristles only show up when getting close to them.
https://docs.google.com/spreadsheets/d/12fHPnMNhpGGdR1mzFeCjXbg1Nv1PO1LZGcHwgp3S1Og/edit?usp=sharing
Google Docs
Open Brush: Brushes, Materials and Shaders
List
Brush Name,Audio Reactive?,Manifest,Experimental Flag,Material,Shader,Script(s),Export Name,Potential Fallback,Prefab,Priority
Bubbles,Default,Bubbles,Particle/Bubbles,GeniusParticlesBrush,Bubbles,-,GeniusParticle
Cel Vinyl,Default,CelVinyl,Special/CelVinyl,QuadStripBrushStretchUV,CelVinyl,...
brush_CoarseBristles is... "Coarse Bristles"!
lol. I wasn't sure since the DoubleTapered was the pinched flat brush
Ok so I just made a new sketch in OpenBrush with some coarse bristles and dots brush.. and they aren't falling off the same way they are with the other art piece.
Is there anything about a really complex sketch only loading at so much at once?
We fixed a bug in the beta recently. You could try making sure you're on the latest version and re-exporting?
on open brush? I'm at the current steam version.
Beta or the regular version?
Regular. Have not learned enough about the program yet to need to look at betas
I reimported recently and was getting the same effect of the Coarse Bristles fading away on this project piece but not fading away on what I made recently to while testing.
Hello. I was troubleshooting some with my friend, and we found a few things that might be interesting.
We were messing with the "save selected strokes to model catalog and the Merge Brush strokes. The save selected stroke was producing a strange result and I'm not sure the merge brushstrokes was actually doing anything.
What I have been noticing is anything new that I make seems to load fine in unity or works with the save selected strokes to model catalog. But strokes from this current project do not work right.
If my friends sketch was started in tiltbrush before openbrush was a thing and was eventually finished in openbrush cause any issues?
There was a recent discussion about merge brush strokes having issues but I can't find it right now. Remind me what you're using: PC/Standalone? Beta/Standard release?
Currently beta experimental, but a few days ago we were looking at the features on every version on steam beta, beta experimental, experimental, ect.
OK. Pretty sure the merge strokes bug is in the beta only but I've forgotten everything over Xmas so I'll have to retest it.
How is the merge strokes supposed to work?
Are you supposed to select the brushes then run it, or do you run it from the sketch menu without loading the actual sketch?
You press the 3 dots, choose "merge" and then it's supposed to add all the strokes from that sketch to the current sketch
Found my write-up from before Xmas: https://github.com/icosa-gallery/open-brush/issues/350
Ah so it's not meant to merge strokes together? Just bring strokes from one sketch to another?
Yes. It's "merge sketch". I see know that the wording is a bit unclear.
We'll it actually has been working then. I just misunderstood it's use.
The tool that may have been giving us issue was the "save selected strokes to model catalog"
When you use that is it supposed to save a sketch as a whole model or are the brushes still individual when you save selected brushed to a model?
I'm hoping to retire that and replace it with a "save selected strokes (as a normal sketch)" feature so don't worry too much.
When you use that is it supposed to save a sketch as a whole model or are the brushes still individual when you save selected brushed to a model?The former - which is why I'm not keen on it.
Do you think an older project started on tiltbrush then later moved to and finished on open would end up having some sort of issue with exporting?
Exporting what? If you're talking about "save selected strokes to model catalog" then I can't vouch for that feature. It's experimental and hasn't had much usage so I don't know how solid it would be
When exporting a sketch via labs for import into unity or blender.
When I make doodles and play with imports. The things I made seem to work fine, but the models from my friends older sketch unity seems to not like.
I thought it might have been a scene complexity issue. So we isolated and exported a dog model and even by itself unity seems to handle the strokes the dog is made of strangely with brushes fading away as you move away. We messed we with the clipping distances but the clipping does not interact with sketch in the same way.
If you ever have time at some point I could screen share what I'm trying to explain.
I may just be describing what's going on poorly
My broader point is that we probably won't spend time fixing the old "export selected strokes to model catalogue" feature.
And if you're taking stuff from one sketch and bringing it into another then use "merge strokes" (with the caveat that the current beta has a known bug)
when I asked about an older sketch started in tilt brush. I was referring to the export feature in general unrelated to the "export selected strokes to model catalogue"
Found out what was causing the course bristles to fade away.
It was the alpha cuttoff
Can you send me an example sketch that shows the problem (and some numbered "steps to reproduce" - this convo is quite long now and I keep losing track of where you've provided details!)
Sure. Sorry it was so lengthy
I might need help though. You seem to be way better at break things down than me.
The over all issue (to my knowledge) was never anything to do with Openbrush.
Every version when I used Openbrush and exported a sketch to get the GLB to import into blender. The course bristle brushes on this sketch would look like this
I was looking at the shader properties of the course bristle and found the alpha cutoff and turn it to zero. and now they are all showing up.
One sec
How are you editing the shader?
what I see in unity to look like what I seen in Openbrush. The first picture is Openbrush the second is unity
are you exporting to a new project using the Unity Toolkit/SDK and then reexporting?
I'm stuck at your "edit the shader" step.
Yeah sorry you asked while I was making that one
So I export from Openbrush using the option in the Labs menu
and then you open in the Toolkit/SDK?
and edit the shader there?
Toolkit/SDK being in unity?
Yes but using https://github.com/icosa-gallery/open-brush-toolkit
same as these?
yes
ok. now i follow.
ok unless I'm using an old version that's what I have,
it's fine. i just wanted to understand your broad steps
Open Brush > Export GLB > Open using Toolkit
Correct
and Just the GLB folder is needed right?
yes
Or is the folder even needed?
You just copy the glb into your unity project
the .glb itself inside the glb folder? Or could I just copy over the contents of the glb folder in general if I wanted. I've been copying the whole glb folder over.
Just the glb. The toolkit will have copies of all the other files so you don't need them
Ah do you think unity would render in the sketch differently without the other items?
no. they just aren't needed in this case
they are only needed by other apps such as blender
Ah I see how they are all packed into the glb now. I'm not sure I've hit the play button on the glb in unity yet.
they aren't packed into the glb as far as i remember - it's just that the Toolkit already has them
I see. that was just my interpretation of what I saw here.
but yes
Open Brush > Export GLB > Open using Toolkit>Edit Course Brush Bristle Alpha cutoff to zero
OK. Now I'm up to speed, what's the next part of your question?
Getting what I see in OpenBrush to come close to what I see in unity
Earlier I thought you said the other way round. Which is "correct" for you? Unity or Open Brush?
Oh sorry I may have mixed up words. From the start I've been trying to get Unity to look like what I see in open brush. Figuring out the Alpha Brush cutoff was the first step in getting close to that goal.
ok.
and what's your goal after that? What will you do with the Unity project?
my friend wants to publish the program as an interactive art piece that you can fly around in (similar to Openbrush) or be on a guided path. So the user can explore the art piece or be guided to parts the artist would like the user to see.
ok. so you will build an executable in unity that you will distribute to end-users? (or run your self at an event)
Correct
Now - the screenshots above showing differences between OB and Unity are quite complex. There's probably multiple reasons for the differences and you'll need to tackle them one at a time.
It would be helpful if you could DM me a sample .tilt file so I can see for myself and offer some suggestions
Ok. I will have to talk to my friend about that. My friend is ok with me showing screen shots or even doing screen shares, but does not want me to give the file out.
I'd rather not have the whole file. Just a small minimal sketch that shows the issue clearly
Ok. I will do some doodling and see if I can recreate what I'm working on and go from there.
If I can't I'll see if my friend is ok with me sending small parts of the main project.
Tell him we often need .tilt files to help diagnose issues. But if you DM them then I won't ever pass them out.
I'm sure its alot easier that way especially not having any kind of communication barrier.
Not sure I've said this enough, but thank you for helping me with this troubleshooting.