Talk:M2: Difference between revisions

From wowdev
Jump to navigation Jump to search
(Reverted edits by 5.167.179.83 (talk) to last revision by Schlumpf)
Line 83: Line 83:


The three subrecords specify texture transforms. Translation seems to work, producing nice flowing lava and waterfalls.
The three subrecords specify texture transforms. Translation seems to work, producing nice flowing lava and waterfalls.
== comprar viagra madrid ==
http://achat-viagra-generique.net/ acheter viagra
http://comprar-viagra-generico.net/ venta viagra
http://acquistareviagragenerico.net/ acquisto viagra
http://comprarviagragenericoespana.com/ precio viagra
http://acquistare-viagra-generico.net/ acquistare viagra

Revision as of 14:14, 1 July 2015

Finished for Build 8820 now. Post changes here first! And please pay attention to the style when you add something.. --schlumpf_ 00:53, 23 August 2008 (CEST)

Animation blocks in WotLK

  • Previously M2s used a single-timeline approach, chaining all animations into one long piece and separating them via begin and end given in animation data. Now, each animation has an own timeline.
  • Animation blocks contain a list of lists of timestamps and a list of lists of values, where the first list is by animation and the second one by timestamp-entry.
 template<typename T>
 struct array_ref
 {
   uint32_t number;
   T* elements;  // in file obviously an offset only
 };
 
 template<typename T>
 struct animation_block
 {
   uint16_t interpolation_type;
   uint16_t global_sequence;
   array_ref<array_ref<uint32_t>> timestamps;
   array_ref<array_ref<T>> values;
 };
  • Thus, as example, with
 struct bone
 {
   int32_t bone_id;
   uint32_t flags;
   int16_t parent_bone;
   uint16_t _1[3];
   animation_block<vec3_float> translation;
   animation_block<quat_short> rotation;
   animation_block<vec3_float> scale;
   vec3_float pivot;
 } b;

one may get the number of animations having translation information with

 b.translation.timestamps.number

and the number of timestamps in the first animation using

 b.translation.timestamps.elements[0].number

and the first timestamp value of the first animation via

 b.translation.timestamps.elements[0].elements[0]

The actual translation vector for animation 0 at timestamp 0 is at

 b.translation.values.elements[0].elements[0]
  • Some timestamps/values.elements entries may have number/elements = 0, if for that animation id no animation is given.
  • .anim files are just a blob of data which may as well be in the main model file, that is pointed to by the first array_ref layer.
  • [model file name][animation id]-[animation sub-id].anim
  • it seems like it is possible to detect if animation data is stored in-m2 or externally via
    • All animations which have flags & 0x20 are stored internally.
    • Animations which do not have flags & 0x20 are not stored internally.
    • Animations which do not have flags & 0x20 AND do not have flags & 0x40 are in .anim files
    • Animations which do not have flags & 0x20 AND DO have flags 0x40 are stored... somewhere. I have no clue.

Deleted Blocks

Block D

  • nD records of (int16, int16) starting at ofsD

Maybe a lookup table for animations? Since the numbers happen to be in fixed positions. The first short seems to increase with the position for models with all animations (like characters), the second seems to be flags or a modifier? Or something.


Contain indices into the texture animations list, or -1 meaning a static texture.

Texture animations

  • This block contains definitions for texture animations, for example, flowing water or lava in some models. The keyframe values are used in the texture transform matrix.

nTexAnims records of 0x54 bytes starting at ofsTexAnims, followed by data referenced in these records.

Offset 	Type 						Description
0x00 	AnimationBlock (float, float, float) 		Translation
0x1C 	AnimationBlock (float, float, float ???) 	Rotation?
0x38 	AnimationBlock (float, float, float) 		Scaling?

The three subrecords specify texture transforms. Translation seems to work, producing nice flowing lava and waterfalls.

comprar viagra madrid

http://achat-viagra-generique.net/ acheter viagra http://comprar-viagra-generico.net/ venta viagra http://acquistareviagragenerico.net/ acquisto viagra http://comprarviagragenericoespana.com/ precio viagra http://acquistare-viagra-generico.net/ acquistare viagra