nixarn

I'm using the commandline tool to export to Unity. But I can't seem to get premultiplied alpha disabled so in Unity I get warnings "Warning: Premultiply-alpha atlas textures not supported in Linear color space!".

But I don't know what I'm doing wrong, I have an spine-export.json that I've validated is being used. Here it is in all it's glory:
{
"class": "export-binary",
"extension": ".skel.bytes",
"nonessential": true,
"cleanUp": true,
"packAtlas": {
"stripWhitespaceX": true,
"stripWhitespaceY": true,
"rotation": true,
"alias": true,
"ignoreBlankImages": false,
"alphaThreshold": 3,
"minWidth": 16,
"minHeight": 16,
"maxWidth": 2048,
"maxHeight": 2048,
"pot": false,
"multipleOfFour": false,
"square": false,
"outputFormat": "png",
"jpegQuality": 0.9,
"premultiplyAlpha": false,
"bleed": false,
"scale": [ 0.5 ],
"scaleSuffix": [ "" ],
"scaleResampling": [ "auto" ],
"paddingX": 2,
"paddingY": 2,
"edgePadding": true,
"duplicatePadding": false,
"filterMin": "Linear",
"filterMag": "Linear",
"wrapX": "ClampToEdge",
"wrapY": "ClampToEdge",
"format": "RGBA8888",
"atlasExtension": ".atlas.txt",
"combineSubdirectories": false,
"flattenPaths": false,
"useIndexes": false,
"debug": false,
"fast": false,
"limitMemory": true,
"currentProject": true,
"packing": "rectangles",
"prettyPrint": false,
"legacyOutput": false,
"bleedIterations": 2,
"ignore": false,
"separator": "_",
"silent": false
},
"warnings": true,
"open": false
}
So there within packAtlas premultipliedAlpha is set to false.

What could I be doing wrong? Thanks!
nixarn
  • Mesajlar: 3

Nate

The "premultiplyAlpha": false, line should do it. Are you sure your atlas is being recreated and you are using the atlas you think you are? There may be Unity-specific configuration you need to do (Harald would know, but he's on vacation until next week):
spine-unity Runtime Documentation: Advanced Premultiplied vs Straight Alpha Import
Kullanıcı avatarı
Nate

Nate
  • Mesajlar: 11349

nixarn

Nate yazdı:The "premultiplyAlpha": false, line should do it. Are you sure your atlas is being recreated and you are using the atlas you think you are? There may be Unity-specific configuration you need to do (Harald would know, but he's on vacation until next week):
spine-unity Runtime Documentation: Advanced Premultiplied vs Straight Alpha Import
That was it! Didn't have the StraightAlphaPreset set in Unity. When I reimported them using it, everything worked. Thanks for the quick reply :)
nixarn
  • Mesajlar: 3


Dön Editor