Gameboy121

Hello, I'm a new user to Spine 2D and I am trying to unpack textures from an atlas file.

However, every time I try to unpack the textures, I get an error message:

Processing image for black_dot: x[1016] y[452] w[6] h[6], rotate[false]
Sorry, an unexpected error has occurred:
java.lang.NullPointerException
at hU.a(SourceFile:149)
at hU.a(SourceFile:102)
at Aa.run(SourceFile:152)
at uM.a(SourceFile:1302)
at fs.a(SourceFile:65)
at eT.a(SourceFile:96)
at eW.a(SourceFile:46)
at vK.a(SourceFile:105)
at eW.a(SourceFile:49)
at fb.a(SourceFile:221)
at fb.c(SourceFile:185)
at us.f(SourceFile:1622)
at com.esotericsoftware.spine.editor.Editor.b(SourceFile:826)
at ao.run(SourceFile:244)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue.access$600(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

I should point out that I am using Spine 3.6.41 because the .skel file that came with the atlas file, won't show up in the latest release.

Another thing is that the atlas file is associated with an .etc2 file with the same name so I don't know if that has something to do with it.
Please help.
Gameboy121
  • Messaggi: 4

Nate

3.6 is quite old. You can run the latest (eg 3.8) just to use the texture unpacker. You could also import data using 3.6.41, save the project, then open it with the latest (but note you'll need to use the latest runtimes to match).
Avatar utente
Nate

Nate
  • Messaggi: 10070

Gameboy121

I did what you said and saved the .skel file as a project then I set Spine to run its latest version. It opened successfully but it told me the skel file uses the Professional Version so I bought that, thinking the meshes/textures were in the file, but instead I see that the textures are missing so I'm assuming I have to unpack the textures from the atlas/etc2 file.

By the way, I tried the Texture Unpacker with the latest version of Spine but it gives me a similar error:

ERROR: Unable to unpack atlas:
java.lang.NullPointerException
at Gq.Z(SourceFile:201)
at Gq.Z(SourceFile:184)
at Gq.Z(SourceFile:117)
at Bl.run(SourceFile:156)
at vf.Z(SourceFile:1188)
at eM.Z(SourceFile:65)
at en.Z(SourceFile:98)
at eq.Z(SourceFile:46)
at wQ.Z(SourceFile:128)
at eq.Z(SourceFile:49)
at ev.Z(SourceFile:222)
at com.esotericsoftware.spine.editor.Editor.F(SourceFile:13186)
at z.run(SourceFile:265)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue.access$600(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

I'd be happy to send the files if anyone wants to take a look and see if they can get it working.
Gameboy121
  • Messaggi: 4

Nate

Ah sorry, I didn't mean for you to feel pressured into purchasing Spine Professional. You can email us if you'd like a refund within 30 days: contact@esotericsoftware.com

Thanks for the log with the 3.8 version. We've fixed it in v4 so it prints the right error, which is that the image can't be read because the format is not recognized.

ETC2 is a special image format. You can likely use some free online ETC2 to PNG convertor to get image files that Spine can read.
Avatar utente
Nate

Nate
  • Messaggi: 10070

Gameboy121

I should've know Spine wouldn't be able to recognize etc2 files. However, I was able to get my hands on etc1 and pvr files of the same character but the Texture Unpacker won't accept those either.

Also, I tried looking for an ETC2 to PNG converter online but I couldn't find anything (I guess you can't just simply convert those files). I was able to find a converter for PVRTC to PNG but every time I try to open the pvr file, it won't recognize it and claim that it could be encrypted or damaged. I don't know what else to do so it looks like I won't be able to load the textures into Spine at this time.

I may have to consider a refund if I don't get those textures working soon. But still, thanks Nate for your help. I greatly appreciate it.
I hope someday the Esoteric Software team can make etc2, etc1, and pvr files compatible with Spine in later releases.
Gameboy121
  • Messaggi: 4

Nate

ETC1/2 and PVR formats are compressed formats that are normally decoded by graphics hardware. Normally you take your high quality, lossless images, eg PNG, and convert them to these other formats for use in an application. If you could find a way to convert them back to PNG there will be a loss in quality. How bad or if that is unacceptable, I can't say. Because of that, it's unusual to want to read images in those compressed formats.

I did a quick search and also wasn't able to find a tool that converts ETC2 to PNG, which is surprising. I did find PVR to PNG though:
https://github.com/sizious/pvrx2png
A Windows binary is provided on the releases page:
https://github.com/sizious/pvrx2png/releases/tag/v0.1
Avatar utente
Nate

Nate
  • Messaggi: 10070

Gameboy121

Thanks for the explanation on those type of formats. I am truly learning more everyday.

I tried using that pvrx2png tool and...it didn't work. However, it gave me a reason: an invalid signature.

Error: Sorry, invalid signature (found: "?" instead of "DDS ")

I'm guessing I have an encrypted file which would explain why Spine couldn't recognize the pvrtc or etc1/2 files from their respective atlas files.
I'll have to decrypt it somehow before I can use the converter. Thanks again, Nate. I am getting closer to having a model with textures.
Gameboy121
  • Messaggi: 4

Mario

Just a quick note: Spine doesn't support loading/unpacking ETC1/2 or PVCRTC image formats.
Avatar utente
Mario

Mario
  • Messaggi: 2392


Torna a Editor