Pharan I understand why it seems that way but I emphasize the defaultness because it means more users will run into it. And specifically new users.
I completely agree! It's indeed not a good user experience to see several warnings pop up when importing the Spine examples into an unmodified Unity project. With straight alpha textures supporting both color spaces they can still switch to Gamma space afterwards if needed.
FYI, we've already pushed several commits (see issue ticket here) to the 4.3-beta branch which change the example skeletons and scenes to use straight alpha textures and settings instead of PMA. The default Spine Preferences import settings were changed accordingly to straight alpha as well. We'll probably later add functionality to switch the material templates more quickly via a Gamma Templates
and Linear Templates
button.
The documentation still needs some updates, and a unitypackage will be published later as well, but you can already get the new examples as of today.
Pharan Personally, I switched one of my most recent projects to Linear years ago because I wanted the color transitions to be nicer and more controllable in the extremes, especially the way additive blending works for lighting effects. It wasn't a fun migration having to adjust each scene again but in hindsight, I thought it was worth it for the colors. I've hated the PS3-looking light blending since the PS3. I was already doing the HDR tonemapping stuff while still in Gamma and it was already a huge step up back then. I was hesitant to switch to Linear color space back then until I tried it out later. But that was my choice.
Interesting to hear that. Of course Linear color space has it's benefits and it's existence is obviously justified, especially when approaching a more realistic style and layering many effects over each other. My point was mainly that users often come from setting up blending in a single application like Photoshop, and then wondering why their layered attachments blend differently in Unity with Linear color space as the default.
Pharan I totally understand the aspect of it not matching what you'd have in other programs and it's definitely not right for all projects; and the benefits of Linear space calculations don't benefit everyone and it has downsides especially for basic users. Some users get a bit dogmatic about either color space.
Absolutely agree, it shall just be an equal choice based on the project requirements (the targeted look) and the given workflow. For many typical 2D projects using Spine, I assume the better-fitting choice would be Gamma color space, mainly due to setup and previewing in e.g. Photoshop.
Pharan Yes, this is what I meant by PMA shaders. The Spine shaders use PMA blending but doesn't really require PMA to be applied to the texture. I remember when I read the source code for Unity's default Sprite shader, it also uses PMA blending but straight alpha texture input.
Thanks for the clarification, terminology is a bit ambiguous at times. Yes, PMA on vertex color attributes, PMA on textures, and PMA as output blend mode are all independent of each other. With the spine-unity shaders for example PMA Vertex Color
shall (almost) always be enabled regardless of texture settings.
Pharan I didn't know Spine had a Linear color space mode now. That's interesting!
Yes, it's part of the Color Management settings, where you can enable Spine to respect your monitor calibration profile if needed. Not that Unity or games would respect those though, which is another topic..
Pharan I saw the warning on the inspector and I thought it would be a confusing experience for someone just looking at the examples from a newly created dummy project. Having the right example assets for a person testing Spine-Unity will probably get rid of this hitch.
Yes, this should now be much better, see the commits above.
Pharan The issue I wanted to address was that if my project was already using the Linear color space that I chose and I give it a straight alpha atlas texture, Spine-Unity's importer unchecks what would have been the correct settings for the project on import.
But I realize now that these were the settings in Edit > Preferences > Spine I was looking for to fix that:
Yes, that's perhaps a bit hidden. Given that the .atlas.txt
files now contain PMA vs straight alpha information (pma: true
, omitted for straight alpha), a settings mismatch could be detected (Linear color space and straight alpha texture import settings but a PMA .atlas.txt
asset) and either a warning issued or a dialogue offering i.e. "Texture Import Settings: Use PMA Textures" provided (in an unobtrusive way, which is the difficult part). I guess it all will be easier though and less error-prone when the default is set to use straight alpha textures anyway.
Pharan My original thought was that when Spine-Unity is imported, it should detect the project color space and store it as a setting like this one that already exists.
By "store it as a setting like this one that already exists" do you mean that the Spine Preferences auto-import settings should be automatically all set to straight alpha workflow when detecting Linear color space upon importing the spine-unity runtime? The problem is that if new users leave the default Linear color space active and Spine now adjusted everything automatically, many users would never notice that there was even a potentially better choice in the first place. I agree that notifying them via a warning message is not the nicest way though.
Pharan Seems like the issues were:
someone evaluating the examples can't open the examples because they were recommended the version they can't open
This should be fixed now since yesterday, see this ticket. Thanks again for reporting.
someone evaluating the examples and runtime runs into washed out examples
Should be fixed in the recent commits of this ticket as well which switched all example skeletons and the Spine Preferences auto-import settings to straight alpha.
someone evaluating the runtime imports their own assets exported with Spine's PMA defaults and runs into washed out versions of their skeletons or changes the settings around and gets black outlines.
With the new straight-alpha changes they will still encounter part of the issues when exporting as PMA atlas textures - they get black outlines, at least no more washed out textures. I'm afraid we can only issue console warnings here or add a notification dialogue at first incorrect import.
Most of the warning messages nudge the user towards switching to Gamma or change individual texture settings but if the project should be Linear, user actually needs to change their exporting guidelines for Spine assets, and correctly set the Spine-Unity importer settings.
Maybe we should more explicitly say "please decide on a color space, then adjust export and auto-import settings accordingly." Upon mismatch, the most comfortable way I can think of would be a "switch to straight alpha / PMA" button for the import side of things. We can't do anything automatically about incorrect export thought, a warning with hopefully good description is all I can think of.
I will add a washed-out part to the FAQ under Visual
, thanks for bringing this to our attention. Unfortunately when users don't find the FAQ or documentation in general, we're out of luck again. We could mention the documentation URL in the warnings perhaps.