Site Tools


documentation:development:opera:pf25:ppgfldr:smmfldr:gspfldr:03pgs003

Tips, Tricks, and Troubleshooting


This section provides some additional advice on working with animations:

Using an Animation Unified for Efficiency

UnifyAnimation() goes through the ANIM structure and sets it so that each frame uses the same CCB but has its own cel data and PLUT (Pixel Lookup Table).

Example 1: The UnifyAnimation function.

void UnifyAnimation(ANIM* pAnim)
    {
    int i;
    CCB* theCCB;
    
    theCCB = pAnim->pentries[0].af_CCB;
    for (i = 0; i < pAnim->num_Frames; i++)
        {
        pAnim->pentries[i].af_CCB = theCCB;
        }
    }

GetAnimCel() sets the cel data pointer and the PLUT pointer in a single CCB to point to the next frame. As a result, the animation can change its cel data and its PLUT, but not its size or other data. Although this is not as flexible as it was before, it is useful for many situations. When you change the location or the scale factor of one frame of the unified animation, that change is maintained in all the frames. Furthermore, you can insert the animation's one CCB into a cel list; this isn't done in UFO, but it's a useful technique.

Creating an Anti-Aliased Animation

Title developers often find that animations show bad aliasing when displayed against a background. This can be remedied by going through the following steps:

  • First the artist prepares the components of the ANIM file using the Anti-Alias CelWriter plug-in. This is most efficiently done using a batch process from DeBabelizer. The Anti-Alias CelWriter creates for each frame a 3DO cel and a mask that provides 16 levels of translucency.
  • The program then has to display the cel and the mask for each frame. An example, aaPlayer, is on the Portfolio 2.5 CD-ROM in Examples:Graphics.
documentation/development/opera/pf25/ppgfldr/smmfldr/gspfldr/03pgs003.txt · Last modified: 2022/10/10 16:53 by 127.0.0.1