Smoke, Comet, Soft highlighter brushes not rendering in unity the same way the do in openbrush

The brushes are exported from Steam version of OpenBrush(beta) they are loaded into unity with the 24.0.0 SDK
25 Replies
andybak
andybak2y ago
The second example has too much going on to be useful. The first one however looks like it's just 4 strokes with the smoke brush and nothing else. Is that right? That should be easy to reproduce.
Cattasraafe
Cattasraafe2y ago
Yes the first is just a few brush strokes.
mikesky
mikesky2y ago
is the project using linear color space?
Cattasraafe
Cattasraafe2y ago
In the SDK?
mikesky
mikesky2y ago
no, your actual unity project that you've made, Project Settings -> Player -> Other Settings -> Color Space
mikesky
mikesky2y ago
Cattasraafe
Cattasraafe2y ago
Yes it's on linear. Is gamma better?
andybak
andybak2y ago
It will make it look the same as Open Brush!
Cattasraafe
Cattasraafe2y ago
holy hell.... gamma is crazy better
andybak
andybak2y ago
Well - linear is better in many ways - but we're stuck with gamma if we want to maintain the same look Linear is more physically correct - and tends to cope with transparency blending better.
Cattasraafe
Cattasraafe2y ago
I had no idea about this setting. lol
mikesky
mikesky2y ago
it's a lot of color theory that nobody's got time for now 😅 but basically for most other use cases you probably would want linear also the changes probably aren't as dramatic in other use cases, but it matters a lot to us at the moment, unfortunately
Cattasraafe
Cattasraafe2y ago
So the goal is getting this to look like open brush while using linear, but using gamma is fine for now?
andybak
andybak2y ago
we might one day introduce a switch. "backwards compatible" vs "brave new world" but we don't want to change how people's existing sketches look. there's no way to make them look the same. they just work differently you could make smoke brighter and it would help - but it's still different when you layer them up
Cattasraafe
Cattasraafe2y ago
Have not checked in gamma color space yet, but smoke imported into unity in linear color space seemed to move when tilting my head while wearing the HMD. If linear is never going to look the same as using gamma color space. What do people normally use the linear color space for?
andybak
andybak2y ago
Because it looks better for many things - and it's physically correct. Gamma was the "old way" and was simpler to implement on older hardware.
andybak
andybak2y ago
andybak
andybak2y ago
top is linear, bottom is gamma. notice the unnatural fringing on gamma
Cattasraafe
Cattasraafe2y ago
The linear definitely blends the smoke in more.
andybak
andybak2y ago
I've updated the docs. Hope you don't mind - I used your smoke images above to illustrate the point! https://docs.openbrush.app/user-guide/open-brush-unity-sdk#_nvutjzw2fj1u
Open Brush Unity SDK
Using Open Brush with Unity
andybak
andybak2y ago
I'm curious about this part which I've only just noticed:
The v11 toolkit shaders support both sRGB (Gamma) and Linear color spaces. The shaders are set to Gamma mode by default. If you wish to use Linear, add this call somewhere in your program. Shader.EnableKeyword("TBT_LINEAR_TARGET");
Not terribly user-friendly! I wonder how it looks... @mikesky ☝️
mikesky
mikesky2y ago
Still not great sadly, it’s mainly on color conversion and doesn’t solve the blending
andybak
andybak2y ago
That figures. Can you suggest a sentence to add to the docs to clarify that?
mikesky
mikesky2y ago
For the brief time we were on linear I’d switched to that Note: while this improves the colour accuracy, due to fundamental differences between linear and gamma rendering, brushes may still not exactly replicate the look of their gamma counterparts. Perhaps have ‘fundamental differences’ link to the unity docs page on it?
Cattasraafe
Cattasraafe2y ago
Of course I don't mind. I'm happy to be able to contribute.