Open Brush Toolkit with URP

We're experimenting with it and it seems like, it won't work if we're using URP. Is that correct?
30 Replies
andybak
andybak•4y ago
Well - it doesn't contain URP shaders. But depending on the brushes you used it might be possible to convert them.
Tina Debove
Tina DeboveOP•4y ago
Hello! Can we invite EricB#2490 ? He's the one mainly working on the OpenBrush Toolkit integration @nericb
andybak
andybak•4y ago
Ah Minsar. Pretty sure this has cropped up before. Have we already chatted?
EricB
EricB•4y ago
Hi there ! 🙂
Tina Debove
Tina DeboveOP•4y ago
We might have, I'm not entirely sure though! But you might have seen stuff on social media about it, or tried the app... 😄
andybak
andybak•4y ago
Hi! I think we chatted about various export issues - something about vertex colors?
Tina Debove
Tina DeboveOP•4y ago
Oh yes! It was a couple weeks ago on your Discord server. And basically it's more or less a follow-up of that conversation, in the sense that our intent is to properly support TiltBrush/OpenBrush creations in our app 😉
andybak
andybak•4y ago
ok. so you'd need to support all brushes I guess. Here's some notes I made when I looked into it: https://discord.com/channels/783806589991780412/804251629993197618/835089840943923211 And here's a branch with a really rough initial stab: https://github.com/IxxyXR/open-brush-toolkit/tree/urp
Tina Debove
Tina DeboveOP•4y ago
Oh nice!
andybak
andybak•4y ago
although in that branch I didn't give any thought to properly supporting urp as well as the legacy renderer - I just went ahead and started converting shaders to see how much effort was involved.
Tina Debove
Tina DeboveOP•4y ago
I guess that will definitely be a great starting point, it'll be of great help!
andybak
andybak•4y ago
There's also the experimental brushes to consider at some point.
Tina Debove
Tina DeboveOP•4y ago
Yeah I suspect that if people appreciate the new support of importing brushes, they'll want the newest ones as well
andybak
andybak•4y ago
Although - there's less experimental brushes that need converting than it initially appears: 1. Some are broken and should be hidden for now (the 4 ParentBrush subclasses) 2. Some are duplicates of existing brushes updated to use the GeometryBrush superclass and out of the rest - some use existing shaders so the work won't need to be done twice
andybak
andybak•4y ago
It's handy to use this spreadsheet to get an overview of brushes/brushscripts > materials > shaders : https://docs.google.com/spreadsheets/d/12fHPnMNhpGGdR1mzFeCjXbg1Nv1PO1LZGcHwgp3S1Og/edit#gid=0
Google Docs
Open Brush: Brushes, Materials and Shaders
List Brush Name,Audio Reactive?,Manifest,Material,Shader,Script(s),Export Name,Potential Fallback,Experimental Flag,Prefab,Priority Bubbles,Default,Bubbles,Particle/Bubbles,GeniusParticlesBrush,Bubbles,-,GeniusParticle Cel Vinyl,Default,CelVinyl,Special/CelVinyl,QuadStripBrushStretchUV,CelVinyl,...
andybak
andybak•4y ago
I'd like to flesh out the docs a bit better on this as well
Tina Debove
Tina DeboveOP•4y ago
😮 didn't realize there were that many brushes
andybak
andybak•4y ago
There's about 65 distinct shaders that matter - that's the only number that matters for converting to URP and 9 of those account for most of the brushes the rest are the funky one-off brush shaders
Tina Debove
Tina DeboveOP•4y ago
ok thanks a lot for this precious info! we've now gone back to the code and will let you know how it goes!
andybak
andybak•4y ago
Cool. Happy to help some more. I'd like to see this happen.
EricB
EricB•4y ago
Hello ! Im just working on a first URP Disco shader version. my first approach is based on custom functions it's maybe an easy way to port the surface based shader to URP ?!
andybak
andybak•4y ago
Disco isn't a lit shader though? it should be fairly easy oh! it is lit. weird. i assumed it was additive or something So - i haven't thought this through in depth - but for surface shaders I was going to start with a lit shader graph and add in some custom hlsl nodes. or i guess you could start with something like https://gist.github.com/phi-lira/225cd7c5e8545be602dca4eb5ed111ba but i think we eventually want to base this on shadergraph (don't we?) But yeah - i maybe wouldn't have started with something like Disco 🙂
EricB
EricB•4y ago
Oh, I see.. Indeed, having a common base for lit shaders is consistent approach. Using custom functions in the Shader Graph was just a first draft test :p
andybak
andybak•4y ago
I think shadergraph will make life easier for other contributors in the future. And it's less likely to break with newer Unity versions And most importantly - also supporting HDRP will be a lot easier
moat
moat•4y ago
URP is particularly good for dealing with situations where you would like to reuse a few shaders with many variations in parameters. For instance, if you were working with the BIRP (built in render pipeline)... then if you made many materials all using the same shader for each material, there is an additional draw call each material allows for a different set of parameters and each draw call causes a bit of overhead. the thing that URP brings to the table is a significant reduction to the overhead of each draw call associated with having many many materials that all use the same shader
moat
moat•4y ago
URP shader parameters must be kept within a CBUFFER_START(UnityPerMaterial) block (like this)
No description
moat
moat•4y ago
this will allow it to make use of the batching optimizations so, under URP you are going to have a ton of draw calls but the hit is far less I should also mention that Post-Processing effects under URP must be done somewhat differently because Blit() will break in VR!!!! I don't know if OB uses any post-processing effects, but you will have to look into Renderer Features I've actually managed to make them work in both VR and in Pancake (I'm making a hybrid game in URP) the process is a little bit involved but I won't infodump any further on URP-XR-SPI-PPFX unless prompted to. there are things that have to be done both on the Renderer Feature side as well as the shader side
andybak
andybak•4y ago
GitHub
Release tilt-brush-toolkit-URP-AltSpace-alpha_v02 · kijai/tilt-brus...
Electricity and Toon brush tweaks Added Disco -brush Fixed couple of brushes not using Vertex Color Added more color adjustments to the Shader graph brushes, emission toggle Tested compatibility w...
andybak
andybak•4y ago
no idea who made it. the username doesn't match anyone here
EricB
EricB•4y ago
👌 I will check that, thank you !
Want results from more Discord servers?
Add your server