It is currently Fri Oct 20, 2017 3:54 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Sep 21, 2017 2:22 am 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 904
Location: Gothenburg, Sweden
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?

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Thu Sep 21, 2017 2:58 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5718
Location: Canada
"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.


Top
 Profile  
 
PostPosted: Thu Sep 21, 2017 4:10 am 
Offline
User avatar

Joined: Thu Aug 13, 2015 4:40 pm
Posts: 111
Location: Rio de Janeiro - Brazil
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.

_________________
http://nesrocks.com/blog/superpitfall30th/


Top
 Profile  
 
PostPosted: Thu Sep 21, 2017 5:48 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19104
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
PostPosted: Thu Sep 21, 2017 8:06 am 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 248
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.


Top
 Profile  
 
PostPosted: Thu Sep 21, 2017 9:01 am 
Offline
User avatar

Joined: Sat Jan 09, 2016 9:21 pm
Posts: 213
Location: Central Illinois, USA
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.

Quote:
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

_________________
My games: http://www.bitethechili.com


Top
 Profile  
 
PostPosted: Thu Sep 21, 2017 9:17 am 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 248
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.


Top
 Profile  
 
PostPosted: Thu Sep 21, 2017 11:26 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5718
Location: Canada
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".


Top
 Profile  
 
PostPosted: Thu Sep 21, 2017 12:43 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19104
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
PostPosted: Thu Sep 21, 2017 1:25 pm 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 904
Location: Gothenburg, Sweden
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.

_________________
http://www.frankengraphics.com - personal NES blog


Last edited by FrankenGraphics on Thu Sep 21, 2017 1:33 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Sep 21, 2017 1:31 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5718
Location: Canada
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.


Top
 Profile  
 
PostPosted: Fri Sep 22, 2017 1:33 am 
Offline
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 577
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
This is the terminology I use in my music programs :

Code:
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.

_________________
http://www.tmeeco.eu


Top
 Profile  
 
PostPosted: Fri Sep 22, 2017 6:01 am 
Offline

Joined: Sat Aug 28, 2010 9:01 am
Posts: 190
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.

_________________
Gameboy Genius (Blog) - Gameboy development forum (+wiki and file area)


Top
 Profile  
 
PostPosted: Fri Sep 22, 2017 6:39 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19104
Location: NE Indiana, USA (NTSC)
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".


Top
 Profile  
 
PostPosted: Fri Sep 22, 2017 9:50 am 
Offline

Joined: Sat Aug 28, 2010 9:01 am
Posts: 190
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.

_________________
Gameboy Genius (Blog) - Gameboy development forum (+wiki and file area)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: 93143, Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group