Q - How are cyberthug.mesh.iff (MODL), cyberthug.idle.iff (ANIM), and cyberthug.run.iff (ANIM) all compiled into the single binary IFF file cyber.iff?

A - Look at cyber.ali, which I think is currently hand maintained which bind it all toghether. The CYMP chunk is a Cycle map (we call each unique animation a 'cycle'), the # is the index in this file of the cycle to play for each engine animation type, in the case of cyberthug there are only 2 cycles, so there are only 0s and 1s.

KevinSeghetti - This is an area of the engine I am not very happy with, the movement engine has these hard coded animation types, but I haven't been able to come up with anything better (we did have something called the contextual animations where a mailbox could override which animation played, I don't remember if that was lost when BRender was dumped or not).

(Note: the hard coded animation types are in file anim.inc. The engine decides when each of these animations is to be played, and the *.ali file maps each of these hard-coded animation types to an actual animation, for instance cyberthug.idle.iff or cyberthug.run.iff)

Here's how it works for the Superhero example (files in wflevels/superhero):

  • edit cyber.ali, make sure carriage-return/linefeed conventions are correct (e.g. under linux eliminate ^M)
  • prep cyber.ali cyber.txt.iff
  • edit cyber.txt.iff, make sure cr/lf conventions are ok (it includes other files which might be incorrectly formatted)
  • iffcomp -o=cyber.iff cyber.txt.iff
  • in levels directory: make clean, then make

This generates the binary cyber.iff, which contains the mesh and all animations in the proper order using the mapping in cyber.ali. You can look at cyber.txt.iff to see the results in human-readable format.

This should be part of the normal level make process but currently is not, see ToDo list.


Also see ModelIFFFormat
Topic revision: r1 - 09 Oct 2002, MrLin;
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback