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
19 Replies
andybak
andybakβ€’4mo 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
madorinOPβ€’4mo 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β€’4mo 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
madorinOPβ€’4mo 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β€’4mo 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
madorinOPβ€’4mo 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β€’4mo 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β€’4mo 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
madorinOPβ€’4mo 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β€’4mo 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
madorinOPβ€’4mo 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β€’4mo 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
madorinOPβ€’4mo ago
Very thanks!, I'll try and will report the result on this threadπŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ πŸ™‡β€β™‚οΈ
dwillington
dwillingtonβ€’4mo 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
madorinOPβ€’4mo ago
Thanks!, the twitter's several demos are very fantastic!, do you also use API with localhost?
dwillington
dwillingtonβ€’4mo ago
Sometimes, I use PCVR, yes. Often I use a Quest 2. And then send http commands from my laptop via Python to the ip_address of my Quest 2. If you need help to get bootstrapped, we can do a voice call and screens hare. Here is my public repo with many examples: https://github.com/dwillington/open-brush
madorin
madorinOPβ€’4mo ago
@dwillington thanks to tell me it, in terms of ip_address, how did you check the actual ip address? it means ob_host (= "127.0.0.1") ?. https://github.com/dwillington/open-brush/blob/39d0773931e8285aa9047a45c1a5872d7c40b228/python_scripts/ob_helper.py#L6 and ip_adress sharing means you have laptop and vr and vr set a certain ip address and then directy send from PC to VR using this command? https://github.com/dwillington/open-brush/blob/39d0773931e8285aa9047a45c1a5872d7c40b228/python_scripts/ob_helper.py#L15
GitHub
open-brush/python_scripts/ob_helper.py at 39d0773931e8285aa9047a45c...
Contribute to dwillington/open-brush development by creating an account on GitHub.
dwillington
dwillingtonβ€’2mo ago
@madorin , so sorry I'm just seeing this, I don't recall getting a notification. anyhow, yes is the answer to your question but...i would be happy to jump on a screen share with you to help answer any questions
madorin
madorinOPβ€’2w ago
Thanks!,will summarize the points I wonder if I further did not understand the usage. Thanks!
Want results from more Discord servers?
Add your server