Frames: A nomenclature discussion

You can talk about almost anything that you want to on this board.

Moderator: Moderators

User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2064
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Frames: A nomenclature discussion

Post by FrankenGraphics »

Preamble:
We've had discussions on what to call entities, instances and objects which i found very informative and productive. There was also the discussion on what to call colours which might've helped some artist-dev coops? I'd like to talk and have a discussion about a time-domain nomenclature, and especially frames.

Body of topic:
In animation circles, we (ideally) distinguish keyframes from frames.

-A frame is the atom of animation in the time domain; as in for example 60fps or 50fps: You can't put a picture between two frames when frames have a fixed rate (even though analogue slew effects may smooth the transition by some amount, percievable or not)

-A keyframe is a special frame somewhere in the span of time that holds all the relevant data that causes the animation to happen: What picture to show, the duration of it, its opacity, colour scheme, or what have you. It may also contain information on automated interpolation sequences and what not. It got more advanced when software like AfterEffects matured, with a 'layer' for each property of each object holding its own set of keyframes, but the distinction heralds back to pen and paper animation and video fx development. My guess is video editing in general used this term too.

I wrote ideally, because in informal everyday talk, we might just as well say 'frame' offhandedly when meaning 'keyframe', because the distinction is assumed to be encoded in the topic.

This has caused me a bit of confusion from time to time in software dev environments. More specifically things NesDev-related; there's a few causes for that confusion on my part.

1)Famitrackers' (and possibly other trackers') use of the word frame. It ought to mean: one tick/update. But it also means a cell in the sequence of patterns.

I can't change the way tracker culture or software uses these terms, but in my mind a "frame" in the cell in the sequence of patterns-sense of is really just a keyframe. I've been confused more than once when there's talk of frames in nes music, so i've decided for myself to become more actively clear on calling this a keyframe. Or if i suspect there's risk of misunderstanding, a famitracker frame to denote the difference and still reference it to something immediately recognizable, if animation lingo isn't an option.

2)When animating a metatile or metasprite.
In previous conversations, i think i've made myself very much guilty of just causually saying 'frame' for keyframe, even though i think it's bad practice in communication. It leads to slightly confusing sentences like "that frame should be one frame longer". This would be the perfect application for the distinction between keyframes and (video) frames, imo.

<digression>Maybe an offhand short for keyframe could be key, rather than frame...? But that assumes all participants understand where key is coming from.
</digression>

What do you think?
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Frames: A nomenclature discussion

Post by rainwarrior »

"keyframe" isn't very meaningful in the NES sprites; there is generally not enough memory to spend on frames for some to have "key" importance and others to be drawn interpolations between them. Even if that weren't the case, you might think of such things when animating but there's no context beyond that once the sprites are rendered; a sprite engine doesn't have "frames" vs "keyframes". (It's an extensively used term in games with 3D animation though, where the engine is doing the interpolation.)

I don't think applying the term "keyframe" to mean a sprite held for several frames is common or particularly intuitive, but sure I guess it's a word you could co-opt. I generally just call this a "hold" or a "wait" instead, though, which I think more directly states what it is?

"Hold this sprite for 3 frames." <- I think this is about as clear as I could say this, and the three terms "hold", "sprite", and "frame" should be unambiguous with this usage.

If you're using an engine that is tracing (interpolating) paths between points to move along, those definitely can and do get called keyframes. These kind of paths are less common in NES games though. Enemies in a scrolling shmup could use animated paths like this, for example.


Famitracker's term "frame" is inherited from other trackers. It's an unrelated word. If I'm going to use that word I try to be clear about the context, but I think mostly I try to tiptoe around it because it's awkward terminology.
User avatar
nesrocks
Posts: 563
Joined: Thu Aug 13, 2015 4:40 pm
Location: Rio de Janeiro - Brazil
Contact:

Re: Frames: A nomenclature discussion

Post by nesrocks »

In the case of nes graphics, I'd prefer just the term metasprite instead of keyframe, because in animation software keyframe usually means that the other frames will be interpolated. If you mean the background you can say "palette update" or "scroll" or "nam update", depending on the case. I'm curious which case specifically led to the weird sentence in your example.
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!
https://www.patreon.com/bitinkstudios <- Support me on Patreon!
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Frames: A nomenclature discussion

Post by tepples »

I have used "cel" for a particular set of pixels that are displayed for one or more frames. For example: "Many enemies in The Curse of Possum Hollow advance to the next cel every 8 frames based on the low bits of NMI count because their animation time variable is used for another purpose." Or "For each of Donny's cels, it stores a hitbox position, physics flags, and duration in frames."

The 64-row "frame" in a tracker is a hypermeasure.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Frames: A nomenclature discussion

Post by Oziphantom »

Frame - as generated by the PPU ie update every 4 frames
Sprite/obj/bob/blob - image that is displayed as sprites ie display this sprite for 4 frames
Software Sprite - tiles or chars that are uses to replace sprites ie uses these tiles and display for 4 frames
Animation Frame - a sprite/char/tile or set of sprites/chars/tiles that is displayed for 1 or more frames to represent part of an animation. ie where in memory are the jump animation frames. There are 6 animation frames for jump which plays over 24 frames

A tracker will use Frame because that is the core time base at which everything will and can be updated upon. It will be able to update the music registers on frame intervals, where a frame may be 1/50, 1/60, 1/30 or 1/25 depending on how your code works and what system you are running on.
User avatar
gauauu
Posts: 779
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: Frames: A nomenclature discussion

Post by gauauu »

Oziphantom wrote:Frame - as generated by the PPU ie update every 4 frames

Animation Frame - a sprite/char/tile or set of sprites/chars/tiles that is displayed for 1 or more frames to represent part of an animation. ie where in memory are the jump animation frames. There are 6 animation frames for jump which plays over 24 frames

A tracker will use Frame because that is the core time base at which everything will and can be updated upon. It will be able to update the music registers on frame intervals, where a frame may be 1/50, 1/60, 1/30 or 1/25 depending on how your code works and what system you are running on.
This is the terminology I use as well.
Sprite/obj/bob/blob - image that is displayed as sprites ie display this sprite for 4 frames
Software Sprite - tiles or chars that are uses to replace sprites ie uses these tiles and display for 4 frames
I'm not sure I understand your definition, maybe I'm saying the same thing, but I'd use:
Sprite - a hardware sprite
Meta-sprite or logical sprite or software sprite - in-game entity that gets rendered as one or more sprites
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Frames: A nomenclature discussion

Post by Oziphantom »

Sprites use hardware and are sprites. Although the NES has 8x8 I would still call a 2x3 grid of Sprites "a" Sprite, as the sprites are "bolted", which gets the odd case where the Mario Sprite uses 6 sprites. If I wanted to refer to an individual piece I would call them "Sub Sprites". So the Mario Sprite is made up of 6 "Sub Sprites". This Animation frame only needs to update 2 Sub Sprites on the Mario Sprite.

Software sprites do not use Sprite hardware and are made up of chars/tiles and may or may not be blitter accelerated. On an A500 you have B(L)OBs and Sprites, they are not the same. While all sprites on a Spectrum are software so in that context one might drop the 'Software' due to its implied nature and lack of hardware acceleration to make any distinction. While on a C64 in IK+ 2 fighters are Sprites but the 3rd fighter is built using Chars and is hence a Software Sprite. On the SNES large bosses in RPGs like Illusion of Time/Gaia tend to have most of the bosses body on a layer and only have some parts as sprites. This makes the boss both Sprites and Software Sprites.
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Frames: A nomenclature discussion

Post by rainwarrior »

tepples wrote:The 64-row "frame" in a tracker is a hypermeasure.
The tracker terminology is "pattern".

I've never seen "hypermeasure" before, but there are common musical terms for this: "phrase", and slightly less frequently: "period".
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Frames: A nomenclature discussion

Post by tepples »

I thought the "pattern" was a 64-row piece of music data, and a "frame" was one of the slots of the order table in which a 64-row piece of music data can be played. The idea is that if you reuse a "pattern" in multiple "frames", you save on music data size, which can prove important when trying to fit your soundtrack in 16K or 31K or whatever.
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2064
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Frames: A nomenclature discussion

Post by FrankenGraphics »

Yeah, in a pattern sequencer (which any standard tracker is more or less a computer software implementation of), typically any such part is a pattern, and any string of patterns is a sequence. Frame here is the time-domain order of patterns. Frames are fixed; patterns programmable. For example a pretty common figure in an 80s pop song could be

Frame 1 may contain pattern 1,
frame 2 pattern two,
f3 p1 again and
f 4: p3
then
f5: p1
f6: p2
f7: p1
f8: p4 (a variation)

<story>
The same goes for pattern sequencers used in wheft machines; except i've never seen or heard the usage of the term "frame" here, but rather "step", which makes sense. Steps in musical sequencing, on the other hand, is what trackers call rows. The longest measure in weaving or textile printing is a "report" (if direct translation would work for once, but many local terms are directly imported from the english textile industry, so i'll try my luck), which is the length before the macropattern repeats itself.
</story>

I'll get back to the rest when i have more time, so i don't rush it.
Last edited by FrankenGraphics on Thu Sep 21, 2017 1:33 pm, edited 1 time in total.
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Frames: A nomenclature discussion

Post by rainwarrior »

tepples wrote:I thought the "pattern" was a 64-row piece of music data, and a "frame" was one of the slots of the order table in which a 64-row piece of music data can be played. The idea is that if you reuse a "pattern" in multiple "frames", you save on music data size, which can prove important when trying to fit your soundtrack in 16K or 31K or whatever.
Famitracker and tracker terminology:

Yes, the "order" contains a sequence of "frames" and each frame designates a collection of "patterns" to play.

The frame doesn't have any explicit length, it inherits it from the pattern(s) it references. This is why I think "64-rows" applies to the pattern, not the frame-- the pattern contains rows, the frame contains patterns-- but this is an academic point.

Patterns are variable length, but the default is 64. There's different ways of customizing pattern lengths depending on the tracker, e.g. a global length, a per-pattern length, or a shortening effect like Dxx/Bxx in Famitracker.

In many trackers the "frame" contains only one multi-channel pattern, rather than several one-channel patterns like Famitracker.


As far as reusing patterns to save space, it works on a coarse level, but I think it's more useful just for organization of the composition. There are a lot of ways for an exporter to automate better reuse (e.g. combine matching pattern data and not just explicit reuse, try subdividing patterns to see if this allows additional reuse, alternative loop/reference methods). For example: 4klang, which has its primary goal of creating very tiny music programs, works directly from a MIDI stream and does not require manual indication of reuse.


I don't recommend using "hypermeasure" if you want musicians to understand you without looking it up. I think it's an obscure term, which is why I suggested "phrase", which means approximately the same thing in most practical circumstances. If you really want to split that hair, it probably requires more work to express than you can with already-known terms.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Re: Frames: A nomenclature discussion

Post by TmEE »

This is the terminology I use in my music programs :

Code: Select all

Frame     - Smallest unit of time, 50Hz default speed (20ms) but can be 
            adjusted with YM Timer B change effect. 
            All effects and envelopes operate on Frames.
Speed     - Number of Frames until next Row.
Row       - Smallest unit of granularity on note/effect data. 
            Row lasts as many Frames as Speed says.
Bar       - Number of Rows between long Row Highlight. Usually 16 Rows.
Beat      - Number of Rows between short Row Highlight. Usually 4 Rows.
Pattern   - Usually 64 Rows high (but can be up to 256 rows) structure where 
            notes and effects are entered to be played back. 
            Each Pattern has a number associated from 00 to FF.
Order     - List which arranges Patterns by their number. There can be up to 
            256 order positions. Each channel has its own Order list.
nitro2k01
Posts: 252
Joined: Sat Aug 28, 2010 9:01 am

Re: Frames: A nomenclature discussion

Post by nitro2k01 »

Famitracker's double use of the word is interesting and seems to be mostly accidental. And in my opinion poorly chosen.

Frame as meaning one call to the player routine makes sense as in the context of a typical NES music routine where it is in fact called once every VBlank. But the mistake is in extrapolating that to cover playback at a different rate and for example saying "240 frames/second". Imo, the correct term when not called at frame intervals would be tick.

Frame as meaning one screen in the pattern editor is an odd one. Especially since the word pattern is used a lot throughout the manual. I guess the word pattern is used to mean one column, whereas frame is used to mean the combination of phrases for all channels. I think I would have used different terms, for example FT2's pattern/channel duality. Another choice might have been pattern/phrase.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Frames: A nomenclature discussion

Post by tepples »

To put it another way, the distinction between "pattern" and one of the meanings of "frame" (order table entry) parallels the distinction between a "tile" and an "OAM entry". Just as one tile may be used in multiple OAM entries, one pattern may be reused in multiple "frames".
nitro2k01
Posts: 252
Joined: Sat Aug 28, 2010 9:01 am

Re: Frames: A nomenclature discussion

Post by nitro2k01 »

tepples wrote:To put it another way, the distinction between "pattern" and one of the meanings of "frame" (order table entry) parallels the distinction between a "tile" and an "OAM entry". Just as one tile may be used in multiple OAM entries, one pattern may be reused in multiple "frames".
I understand and agree with the need for different terminology for the two, but I still think "frame" was a poor choice.
Post Reply