Why is the first spritesheet laid out like this? Seems harder to read the sprite by a sprite reader system

Started by
20 comments, last by Nicholas Kong 10 years ago

As Strewya mentioned the bottom one has no purpose since almost all the images overlap. Whoever made that seems to enjoy wasting time making things no one can use.

As ApochPiQ mentioned it makes no difference since they are just texture coordinates. Why does a computer care if they are laid out horizontally? Humans care about that, not computers.
However the second one (if it was valid) is laid out randomly (as apposed to systematically as in the first one). A computer does actually care about numbers, and numbers that round off to powers of 2 are healthy for a computer, so the first one would be better. All the coordinates are divisible by 8, 16, 32, etc. Floating-point numbers are not always precise in computing so you have to care about the UV coordinates in any texture atlas.

DiegoSLTS is incorrect in saying that texture atlases did not exist in old days. Since the dawn of time texture swaps were expensive so texture-atlasing was one of the earliest and most primitive optimizations there was. Yes, they only read 8×8 blocks from them, so drawing Mario took 2 calls, but the calls read from the same texture. Mario’s head would only be in 1 8×8 block, then a bunch of different lower 8×8 body parts. It would all still be part of the same texture atlas.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Advertisement

DiegoSLTS is incorrect in saying that texture atlases (did I mention that “sprite-sheet” is a term reserved for the uninformed?) did not exist in old days. Since the dawn of time texture swaps were expensive so texture-atlasing was one of the earliest and most primitive optimizations there was. Yes, they only read 8×8 blocks from them, so drawing Mario took 2 calls, but the calls read from the same texture. When newbies take screenshots and put together texture atlases (or as monkeys call them, “sprite sheets”) they may use whole characters in each sprite (that is why they are monkeys amateurs)

I must be a monkey then because I much prefer the term sprite sheet to texture atlas, not to mention texture wasn't(as far as I know) a term even used until about the time they invented the first primitive texture mapping to 3D geometry.

but professionals are much more efficient. Mario’s head would only be in 1 8×8 block, then a bunch of different lower 8×8 body parts. It would all still be part of the same texture atlas.

I'd have to call you insane here, there was nothing "professional" about the folks who developed mario, in fact mario was developed at a time where software(games in particular) was in such infancy that a lot of basement hackers had the same or better knowledge and skills than people working in offices with others. Really, Mario Bros came out, what, 9 years after Nintendo even got into video games at all? Heck it was Miyamato's like, 7th game he even worked on.

Not to mention the need to take such minimalistic approach to blitting had nothing to do with them wanting to be efficient it was because space was such a commodity that it made way more sense to split up characters into fragments instead of copying entire sprites for each pose.

These days there isn't much practical reason to not having entire character poses as a single sprite on a sheet. A lot of things done in early games were either to save work or for practical efficiency. There's a reason that almost every 2d game has side views of characters being mirrored(amazing how Link always holds his sword facing you!)

Did I mention that “sprite sheet” is a term that apes use to refer to inefficient texture atlases?
We are not apes on this site. We range from enthusiastic to authoritative, and we know better than to use child terminology.

My what amazingly aggressive and insulting wording for no real reason. You're also completely wrong there are a large number of people here that are either complete amateurs, indies, develop rarely or even are just people that stumbled in here from Google. I wouldn't even hold all the moderators to the standards of an AAA developer or something, because it just isn't true.

That said there are a lot of talented people on here and at the least quite a number that have decent knowledge on coding/general game development subjects.

It should be mentioned that "sprite" nowadays does not necessarily mean the old school image rectangle. Advanced sprite techniques exist that allow for lighting effects, for example. There is also a technique that allows for animation by mesh morphing. The game made by using this is one about zoo animals; I currently do not remember its name. This technique is actually based on irregular meshes and hence would principally allow for an "overlapping" packing like in the 2nd atlas. However, that technique also requires a higher texel resolution than those shown in the OP to look good. (In other words, the 2nd atlas is probably not an example of this technique.)

Using irregular bounding boxes is also not exotic these days. Texture packers usually export a file besides the texture, wherein the clips are stored by name/index and texel co-ordinates. However, the usual texture packers still deal with AABB only, even if they support bin packing.


Please stop calling them “sprite sheets”. It’s an insult to the industry.

Well, this is interesting. In the world of perhaps not exactly professional 2D game makers there are many examples of tools and libraries that actually use the term "sprite sheet". There are for example Texture Packer, Zwoptex, cocos2d, and perhaps most noticeable Flash (at least in CS6). So the term is effectively introduced in the pre-industrial phase.


By the way, it’s a texture atlas, not a sprite-sheet.

[...] (did I mention that “sprite-sheet” is a term reserved for the uninformed?) [...]

Did I mention that “sprite sheet” is a term that apes use to refer to inefficient texture atlases?
We are not apes on this site. We range from enthusiastic to authoritative, and we know better than to use child terminology.

Please stop calling them “sprite sheets”. It’s an insult to the industry.

Don't you think that's a bit of an extreme reaction? Not everyone here is an industry professional, and the term "sprite sheet" is common and well understood. The use of a common (if perhaps less technically correct) term is hardly "insulting" enough to warrant four separate mentions in your post.

- Jason Astle-Adams

I must work with a bunch of monkeys as I've heard sprite sheet and texture atlas used interchangeably for my entire career.

The Samus sheet might be an TexturePacker output image. As I recall it can trim transparency from source images and give you an offset to place the trimmed image inside the full sized frame.

I've actually heard the terms "sprite sheet" and "texture atlas" used to refer to different things. A "texture atlas" is simply a collection of textures packaged into a single image. A "sprite sheet" is a texture atlas which is specifically used to store sprite assets for a game object (like a character) and has the additional restrictions that each of the sub-images are the same size and are laid out in some regular fashion to improve the efficiency of animation frame lookup. For what it's worth, I didn't hear the term "texture atlas" until my first industry job, where they were used for packaging custom GUI element textures together. I've never heard "texture atlas" used in the context of sprite animation.

Don't you think that's a bit of an extreme reaction?

Yes.
I’m not even sure why I got so up-tight about it.
A bit of a bad mood at the time yes but I don’t tend to fly off my rocker just for that. “Sprite sheet” is a term I also tend to use sometimes, so I am not sure how calling people apes ever came out of me. My day was bad but not that bad.


My apologies.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

can i call it sprite atlas

[attachment=20974:blocker.gif]

Alright, I think the mostly off-topic "Sprite Sheet" vs. "Texture Atlas" discussion has gone on long enough, all further replies back to the original topic (sprite sheet/texture atlas layout) please! smile.png

- Jason Astle-Adams

The second image is impossible to use. Ok, maybe not impossible, but a pain to do so. All the frames overlap each other, and it is not just a matter of copying a rectangle.

If you tried to copy the rectangle for the second frame of the "running animation" it would also render the foot from the first frame and the gun from the third one. So you'd need to create a mechanism that ignored these parts at runtime or erased them by actually removing the overlaps when loaded or something like that.

About the first image, it does have arbitrary positioning, but that can be easy to solve simply by storing the information you'll need, in this case the offset and size of each frame, for example:


PlayerRunning		#The Animation Name
3			#The total number of frames
(306, 234)(350, 278)	#The first frame, start and end coords of the rectangle
(394, 234)(430, 290)	#Second Frame
(354, 233)(385, 291)	#Third Frame

This topic is closed to new replies.

Advertisement