Open Brush API on Quest 3

Does anyone know whether openbrush api can be used on Meta Quest3? Seem meta integration was depricated and XR UPM is necessary. But we do not find a proper way to use it
17 Replies
andybak
andybakβ€’3mo ago
Do you mean the HTTP API? It should just work.
Seem meta integration was deprecated and XR UPM is necessary
I'm not sure I understand you here. UPM as in Unity Package Manager? The API is something you use at runtime - not via Unity. What are you trying to do exactly ?
madorin
madorinβ€’3mo ago
Sorry my final objective is use openbrush api througn unity or python. https://docs.openbrush.app/user-guide/open-brush-api/api-commands Now I'm getting stuck with first step of github explanation. (https://github.com/icosa-foundation/open-brush?tab=readme-ov-file). Now I use openbrush 2-4-27 from github release. I can open the unity project by following procedure. But once click the play bottom, it will crash now...
Start Unity.
Go to File > Open Scene. \
Select /Assets/Scenes/Main.unity. Unity should automatically prompt you to import TextMesh Pro.
Choose Import TMP Essentials.
You can also do this through Window > TextMesh Pro > Import TMP Essential Resources.
Press Play.
Start Unity.
Go to File > Open Scene. \
Select /Assets/Scenes/Main.unity. Unity should automatically prompt you to import TextMesh Pro.
Choose Import TMP Essentials.
You can also do this through Window > TextMesh Pro > Import TMP Essential Resources.
Press Play.
GitHub
GitHub - icosa-foundation/open-brush: Open Brush is the open source...
Open Brush is the open source, community led evolution of Tilt Brush! Forked from https://github.com/googlevr/tilt-brush - icosa-foundation/open-brush
No description
andybak
andybakβ€’3mo ago
You say unity or python. The choice between those two would require quite a different approach. It should work via unity but I've never tried it. The expectation was always that people would use the API fire JavaScript or python or whatever - via a build from Steam or the Oculus store (rather than running it directly in unity) Do you have a particular reason you want to do it in Unity rather than just sending commands over HTTP from a scripting language?
madorin
madorinβ€’3mo ago
Thank you for your comment. I didn't quite focus on using unity. If I could obtain the 3D painting results and drawing commands and etc via API any language is fine (hopefully python is better but not limited like lua C++ etc.) But since I'm beginner, I don't know much deteails about them. Aside from using API, I hope to connect mac (windows) and Meta Quest3 just to sync the VR view to PC
andybak
andybakβ€’3mo ago
The easiest way to get started using the API is just to copy the HTML examples. They have simple javascripts and show you really simply how to do various things. That's the way that's had the most testing and has the most examples so it'll be the easiest for you to work with. But as you mentioned lua, our new realtime plugin scripting is the most powerful approach - and that's entirely based on lua!
madorin
madorinβ€’3mo ago
For html approach, is there page that shows any examples (I just can't find it on opebrush docs) If possible, I want to use lua since I want to use API on real-time setting. In this case is the unity setting necessary? I assume following procedure I want to attain via API 1. send API command of Lua from Mac PC 2. recieve the API command at VR 3. do action (like brush drawing etc.) on VR 4 send the 3d painting result to Mac PC
andybak
andybakβ€’3mo ago
ok. so the lua plugin scripting is totally different. it's not currently in the regular build so you need to follow the instructions here: https://docs.openbrush.app/alternate-and-experimental-builds/runtime-scripting
andybak
andybakβ€’3mo ago
The existing HTTP API is still realtime in a sense - but it's not interactive - it's just a way to queue up commands for Open Brush to execute. It's simpler to use however.
I assume following procedure I want to attain via API 1.send API command of Lua from Mac PC 2. recieve the API command at VR 3. do action (like brush drawing etc.) on VR 4. send the 3d painting result to Mac PC
That's a description of how the HTTP API works - but the plugin scripting API runs lua scripts directly inside Open Brush. it would be useful if you could explain in more detail what kind of things you hope to do - I could advise you better if I knew more.
madorin
madorinβ€’3mo ago
Now I didn't get how to use HTTP API in this case actually... Assume I open the openbrush in VR 1. https://docs.openbrush.app/user-guide/open-brush-api/api-commands : how to launch this localhost ( http://localhost:40074/api/v1?) ? It recieve the command and then execute? I assume 1. write drawing command (draw.paths, draw.polygon) in any language (for example lua) 2. send them to openbrush app 3. draw sent drawing commands(draw.paths, draw.polygon) 4. openbrush app sent the drawn results. OK this also might be fine to use inside VR like 1. send API command of Lua from VR's bash terminal (like assume execute code using vscode) 2. recieve the API command at VR 3. do action (like brush drawing etc.) on VR 4. send the 3d painting result to VR's bash terminal | That's a description of how the HTTP API works |- but the plugin scripting API runs lua scripts | directly inside Open Brush. I want to know how to do in this case (run lua scripts inside open brush) ```
andybak
andybakβ€’3mo ago
So a command is as simple as sending a http request to http://localhost:40074/api/v1 for example: http://localhost:40074/api/v1?draw.text=hello if you're doing it from the same device it should just work if you're doing it from another PC then set EnableApiRemoteCalls to true as explained here: https://docs.openbrush.app/user-guide/open-brush-api and of course - replace localhost with the IP address of your headset. The easiest way to test is to paste that url into the address bar of a web browser.
madorin
madorinβ€’3mo ago
For the localhost, how to start the localhost:40074? (I assume we need to launch the localhost at first, then we can send the api command to localhost) I might confuse by @andybak 's suggestion sorry for this.
andybak
andybakβ€’3mo ago
you don't need to start anything. Open Brush listens for http requests itself. Just make sure Open Brush itself is running. Launch the app.
madorin
madorinβ€’3mo ago
Very thanks!, I'll try and will report the result on this threadπŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ
dwillington
dwillingtonβ€’2mo ago
I too am vested in seeing others leverage the API. Reach out if you want some guidance, I can jump on the voice channel. And feel free to see what I've created using the API: https://x.com/DwillingtonWest
madorin
madorinβ€’2mo ago
Thanks!, the twitter's several demos are very fantastic!, do you also use API with localhost?
Want results from more Discord servers?
Add your server