What types of shaders does Open Brush use?

What types of shaders does OB use? Vertex? Iā€™m using basic brushes, not particles for AR and some look great others not so great.
22 Replies
andybak
andybakā€¢16mo ago
It's a mix. Nearly all shaders have at least a trivial vertex shader component combined with either a Unity surface shader or a hlsl fragment shader. When hosted in a browser all the shaders have webgl equivalents
Zandy
Zandyā€¢16mo ago
ok so even the particles would work in web gl? I'm testing some things now. Dont want to rely on a 3rd party app outside of aero or reality composer. Many use the artists to push their app then start charging to continue to host, which is fine for storage but not just for using it....Dont want to be married to it. šŸ˜„ Working on my own but until then.....this is what Ive got. So just testing things...
Zandy
Zandyā€¢16mo ago
This is pretty Bad. This is in aero (L to Right) 1) Marmoset FBX, 2) Marmoset GlB 3) Blender FBX, 4) Blender GLB 5) OB Native FBX (GLB wouldnt upload. Color is way off. #1-4 are UV mapped
No description
andybak
andybakā€¢16mo ago
Yep. Here's an example of a particles brush running in the browser: https://beta.icosa.gallery/view/linneamaas/KrfeJQVZqPo
icosa
icosa
andybak
andybakā€¢16mo ago
You need to use our shaders though - so depends how you're publishing
Zandy
Zandyā€¢16mo ago
Yeah I think Im just going to have to create my own so I can use the toolkit
firativerson
firativersonā€¢14mo ago
Hi Andy, how are you hosting it in webgl šŸ¤Æ ? Are we talking about unity build here?
andybak
andybakā€¢14mo ago
Our exported sketches can be displayed in any webgl compatible browser via our three.js loader. You can also use the Unity webgl build target if you use our Unity SDK. And Silk Brush is a prototype port of Tilt Brush that runs entirely in a browser.
firativerson
firativersonā€¢14mo ago
I appreciate the quick response @andybak . I want to create a drawing on webgl, not show the exported file. Can I still do that with webgl build with unity?
andybak
andybakā€¢14mo ago
You mean your want to paint in VR? But in a browser? Or something else?
firativerson
firativersonā€¢14mo ago
Mimic the VR drawing in browser live as a part of a game Generative AI + Open Brush VR controlled 3rd person platformer WEBGL game. Yeah a little challenging šŸ™ƒ
andybak
andybakā€¢14mo ago
Ok. This sounds interesting. But I might need a detailed explanation!
firativerson
firativersonā€¢14mo ago
I am pretty confident in Unity but if I need to use silk-brush for webgl to have the drawing realtime, i ll look into it.
andybak
andybakā€¢14mo ago
With diagrams and stuff probably šŸ˜‰ One user? Or one person drawing and spectators?
firativerson
firativersonā€¢14mo ago
yeah one user, actually. Basically, i ll connect webgl and VR apps, and i will create the level myself realtime. Then play with the browser in the environment created. When the level is cleared, i ll go back to VR and draw the second level of the game. Then come back to webgl and play that level... actually everthing is clear in my mind except the rendering the brushes in webgl realtime this is what i am asking. Whats the best way to render the brushes in webgl realtime, as i am drawing them in VR
andybak
andybakā€¢14mo ago
So. You're drawing in VR. Does that have to be in a browser or can it be regular Open Brush?
firativerson
firativersonā€¢14mo ago
I am drawing in a VR app which will have regular open brush running yes. And i wanna show it in browser app without conversion through three.js or fbx. I wanna run open brush on browser app as well
andybak
andybakā€¢14mo ago
Yeah. It's doable. The tricky part is that Silk Brush hasn't been kept up to date with Open Brush. OB can already do this. (Stroke broadcasting and listener). But Silk Brush is out of sync.
firativerson
firativersonā€¢14mo ago
thank you Andy, I will look into that! I will keep this group posted about open brush + Generative AI progress. It should be interesting šŸ˜„ is stroke broadcasting on main branch? or should i go to any other?
andybak
andybakā€¢14mo ago
It is but it's poorly documented. I'm traveling at the moment so not as focused as usual (well...) but when that changes I can walk you through it (and remind myself)
firativerson
firativersonā€¢14mo ago
sure that would be awesome. Meanwhile, I will try to run the OB source code on unity webgl build
andybak
andybakā€¢14mo ago
Examine this repo very closely and maybe reach out to M2 for tips: https://github.com/msub2/silk-brush
GitHub
GitHub - msub2/silk-brush: An effort to port Tilt Brush to WebXR.
An effort to port Tilt Brush to WebXR. Contribute to msub2/silk-brush development by creating an account on GitHub.
Want results from more Discord servers?
Add your server