It does, Iām using it for that in a personal project. However, it requires a separate pass for each layer (allowing for independent outlines). If you run into any issues with this, please DM me with the Unity/URP version youāre using and Iāll make sure it works for that combo, asap. URP changes a lot so it can be a bit tricky with this stuff.
Yes, each pass is a single outline around a layer of objects.
Yes, but itās screen-space. Itās a linear cost with the pixel width of the outline. However, itās relatively fast so you can get decently thick outlines before performance becomes a concern.
Yes, itās a screen space width that you can change via a slider per-pass.
Thanks for you answers!
As I can see it using same algorythm as in the article:
Any particular reason why the width now is limited by 16? Article mentioned that even extra-wide lines are relatively cheap.
Iām also very interesting in more complex behaviour: is it possible for now outline not the whole objects but only visible pixels? Not just crop overlapped outline but render outline all around visible object.
Yeah you are right, itās using something very similar to that articleās final solution. At the moment, each pass is another compute call, which gets a bit heavy when doing a LOT of them in a row on the cpu side, but the gpu side is basically linear time. It could be improved a lot by moving it to be a loop on gpu, which is controllable by cpu. If you or others request this, I can improve the plugin by changing the behavior to make even wider outlines cheaper.
Can you explain what you mean by this? Iām not quite understanding. A drawing might help clear up what you mean.
I think doing outlines of any width without loosing in performance to much could make your asset to be best on the market Itās especially useful for mobile where devices has ultra resolutions / DPIs that requires strokes to be wide to look same as at desktop but outcome performance is very poor.
As for drawing with obstacles (I guess it requires depth-testing or something like that), Iāll try to explain:
a) Here the model (Unlit material) with 2 outlines ā Black and White
b) And here how outlines react to overlapping object: Black is outlining only visible mask and White still outline whole object without any depth test
c) And here one more behaviour that using by some outlines ā just cropping visible outline. It could be useful sometimes but also could be very undesired (in my case at least). The best option is give the ability to switch between (b) and this behaviour but I understand that itās requires a lot of work.
There is one of the best outline here GitHub - Arvtesh/UnityFx.Outline: Screen-space outlines for Unity3d. that gives control to customize outline as described in (b) that I like very much. But unfortunately this solution is very sensitive to outline width (I guess it uses Blurred Buffer approach) that makes it unusable at mobile.
My plugin will do bās black outline, right now. I could add in the option to optionally depth test or not (although you can also tweak the urp settings to remove the depth stuff, which then the outline has no depth texture to use for obscurity).
How thick of an outline are you desiring? 16 pixels is pretty thicc in my opinion, but if youāre looking for something like 256 pixels the plugin might need some work done to make it possible.
Here the width 4 and 8 for black and white outlines at the screen height 720. Modern resolution of iPhone and iPad about 2500px that means we need to increase outlines about x4 times. And if we are at desktop some Retina and 8K displays also could require even more. But for I need at least 32 pixels width. And ideally I dream about outlines that really could give any width without major performance out drawdownsā¦
But anyway for now Iām a little afraid to buy new assets because Iām not sure that it suit best for my goals (already purchased few and they useless for my case). But if you could implement same performance relative to width I defiantly will give chance to your asset (no pressure here, your asset already has huge advantage) or in the end Iāll try to implement it by myself
Thereās not yet a way, but I can implement this for you and push an update, maybe this weekend or the next.
That graph is a bit idealistic, but I think I can get this plugin closer to matching its trend overall with a bit of effort. Iāll see what I can do soon. Itās not too far off, just a bit too much CPU overhead from the multiple compute dispatches.
I understand, Iāve been bitten by a lot of asset store plugins as well. If you do pick it up, Iāll be happy to work with you to resolve any issues you might have. If youāre not happy, you can always get a refund with no hard feelings.
Working on adding in some custom property drawers, to make the editor side of the tool feel much nicer to use. It gives helpful tooltips and advice based on context. For example, when using texture downscaling it will warn you that depth testing will no longer work (to avoid doing an extra depth blit that would be required to make this work).