ixdHenry Posted August 8, 2017 Share Posted August 8, 2017 I am trying to learn how to make a sprite from a spritesheet and I'm following Kitty's tutorial as a reference on how to work with spritesheets. https://github.com/kittykatattack/learningPixi#sprites I am using Texture Packer to create my spritesheet. I was successful in exporting all my images the only thing that has me confused is why do I have a .json file for each of my images? I suspect this is because I had to enable multipacking because all my images wouldnt fit on one sheet. In a lot of the examples I've seen online most devs just import one tile-sheet and one .json file. I was expecting Texture Packer to do the same, now I am unclear how I would import all of this...just for one sprite. Is there a better method of doing this? Quick info about the images I am using, I made a 3d render in Blender and exported the final render into .png frames, the size on each frame is roughly 2000x1000. Perhaps there's another way I could export my render and have it ready for PIXI? Quote Link to comment Share on other sites More sharing options...
themoonrat Posted August 9, 2017 Share Posted August 9, 2017 In texture packer, you can set the max texture atlas size. If it's creating an atlas for each image, then you probably have that setting at 2048x2048. Raise it to 4096x4096 and you'll get 4 images in per atlas. Ultimately, though, atlases are for putting lots of small individual images into one texture. You have _huge_ individual images, so not surprising atlassing isn't working out so well! With images that large, you don't have many alternate options. Raise the texture atlas size, or lower the size of the Blender output ixdHenry 1 Quote Link to comment Share on other sites More sharing options...
xerver Posted August 9, 2017 Share Posted August 9, 2017 To answer your question directly, each atlas has a json file describing the layout of the atlas. If you put 5 images into an image atlas, you need to know where each of those 5 images are within the larger image, and how to use them. The json file gives you that information. ixdHenry 1 Quote Link to comment Share on other sites More sharing options...
ixdHenry Posted August 10, 2017 Author Share Posted August 10, 2017 Thanks guys, I'm going to re-think the logo design or simply lower the output on Blender. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.