Spine examples Show Different Effect in linear color space and gamma color space,
how to make it show same effect ?
Unity Version: 2021.3.23f
Spine version: 4.2.
this is in Linear color space:
this is in Gamma color space:
Spine examples Show Different Effect in linear color space and gamma color space
PbG This is expected behavior because when you export the skeleton atlas from Spine, you must decide whether to use a PMA texture in gamma color space or a straight alpha texture in gamma or linear color space, and accordingly you must set the materials and texture settings to match the color space of the project after it is imported into Unity. This means that a texture and material cannot be compatible with both color spaces. Depending on whether you actually want to use the gamma or linear color space, you will need to change the settings when exporting the atlas from Spine or after importing. (For import, you can change the material settings that are automatically set in Preferences, so you don't have to change them manually each time.)
For more information, see the following section of the spine-unity runtime documentation:
https://esotericsoftware.com/spine-unity-assets#Advanced-Premultiplied-vs-Straight-Alpha-Export
- Modifié
Misaki
they show different effect in linear and gamma color space:
below is my demo
they are exported with docs https://esotericsoftware.com/spine-unity-assets#Advanced-Premultiplied-vs-Straight-Alpha-Export,
and imported with docs https://esotericsoftware.com/spine-unity-assets#Advanced-Premultiplied-vs-Straight-Alpha-Import,
in linear color space:
in gamma color space:
PbG First of all, PMA textures are not compatible with linear color space, so there is no point in testing them. The first thing to check is whether your Unity project will use gamma or linear color space. It is important to make sure that the export and import settings match the color space you intend to use, so please make sure of that first. Then, if your skeleton does not display correctly in the color space you want to use, please show us a comparison of the expected correct display result and the incorrect result currently displayed in Unity.
- Modifié
Misaki
My Unity project use linear color space.
The export setting in Spine:
The color management in Spine:
The preview in spine:
The import setting in Unity:
The effect and component advance setting in Unity:
The effect and atlas setting in Unity:
The effect and Additive material setting in Unity:
For Comparison
PbG Thanks for providing the additional information! Since the editor settings, pack settings, texture and material settings you showed us each appear to be correct, could you please email us the Spine project files or exported skeleton data files that can reproduce this issue?: contact@esotericsoftware.com
Please include the URL of this forum thread in the email so we know the context. Then we can take a look at what's wrong.
Misaki
Thank you for patiently response, the spine project files was sent to contact@esotericsoftware.com.
@PbG Thanks for sending the reproduction Spine project. While Misaki didn't mention it, we would please also require a minimal Unity project which shows this issue in order to efficiently reproduce this issue. Otherwise there might be Unity project settings differences.
We currently don't know from your postings which exact version of the spine-unity runtime or Spine URP shaders package you're using, or which render pipeline you're using.
When encountering any issues, please in general always ensure to try the latest version of the spine-unity and Spine URP shaders (if using URP) package from the download page, or update the package via the Unity Package Manager window.
PbG I checked out the Spine project you sent us, and it looks pretty close to what you showed me in Unity when I selected Linear blending
in the Color Management
in the Spine settings (the background color of the viewport is set to pitch black to make the difference easier to see.):
If set to Gamma blending
, it will look like this:
So I think the results you have achieved are actually as expected. Note that the blending mode setting will not take effect until Spine is restarted, so could you please check again if it looks like the first screenshot I attached when you check with Linear blending
?
Harald
I think i got the point: In the Spine Eidtor, the Preview Section is not consistent with the Edit Section, so even if the Linear Blending is checked, the Preview Section still shows Gamma Blending effect.
The Edit Section shows the right effect, while the Preview Section may not show the right effect.
I think this is the preview bug, is that right?
PbG It certainly seems that color management is not enabled in the preview, as you mentioned. I think this is a bug, so I have created an issue here to fix this problem: EsotericSoftware/spine-editor847
We apologize for the inconvenience, but until a version is released that fixes this issue, please refer to the viewport for the correct color.