Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Milkshape3D MS3D help needed

  1. #11

    Re: Milkshape3D MS3D help needed

    Quote Originally Posted by tpascal
    Hi,

    I did a ms3d binary file format reader/writer long time ago.

    - Refcount should have to be 0, it is used internally by milkshape and it start with that value.
    - You need to have at least one group and assign your data to that group;
    - smoothgroup should have to be value 1.
    - Note that if you want to include MS3D_VertexEX data you have to put propely the subversion value.

    This is a copy of my ms3d reader/writer wich include bones and animations with weight vertex; but it discard comments data; I hope it can be usefull for someone.

    http://www.dxtre3d.com/temp/ms3dunit.pas

    Note that i dont have idea which is today current ms3d filformat version, but Mete was always carefull not to break backward compatibilty so this reader/writer should work with today ms3d files.

    good luck with the bones and animations part of your plugins, it is a realy headache to interpret correct that data if you have not experience with skelatal animations.


    Good luck
    Tp.
    Thanks tpascal!

    It should be quite helpful

    I'm pretty sure I won't be doing MS3D_VertexEX at all...

    cheers,
    Paul

  2. #12

    Re: Milkshape3D MS3D help needed

    Hi again guys/gals

    I have now gotten my ms3d importer working (including textures, but no joints yet), and my ms3d exporter working (including textures and joints), but I still have a problem...

    The exporter only SEEMS to export ok to ms3d animated DeleD objects that only contain joint rotations, but as soon as an animation contains joint translations too, then the output animation is screwed up

    Looking at the ms3d joint structures:

    Code:
    typedef struct // 16 bytes
    {
      float      time;                // time in seconds
      float      rotation[3];            // x, y, z angles
    } ms3d_keyframe_rot_t;
    
    typedef struct // 16 bytes
    {
      float      time;                // time in seconds
      float      position[3];            // local position
    } ms3d_keyframe_pos_t;
    
    typedef struct
    {
      byte      flags;               // SELECTED | DIRTY
      char      name[32];              //
      char      parentName[32];           //
      float      rotation[3];            // local reference matrix
      float      position[3];
    
      word      numKeyFramesRot;          //
      word      numKeyFramesTrans;         //
    
      ms3d_keyframe_rot_t keyFramesRot[numKeyFramesRot];   // local animation matrices
      ms3d_keyframe_pos_t keyFramesTrans[numKeyFramesTrans]; // local animation matrices
    } ms3d_joint_t;
    Does anyone know what sort of positional values go in the position field of the ms3d_keyframe_pos_t structure? Are they absolute values, or are they relative to something else...a joint perhaps?

    For example, I discovered that the ms3d_joint_t position field is relative to the parent joint.

    So this means that this position is absolute if the joint has no parent, but is an offset from the parent joint position if it exists...

    Here are two videos I did of two DeleD animated models exported to ms3d:

    Jeroen's Lamp (seems to work ok, and includes BOTH animations back-to-back!)
    http://fpc4gp2x.eonclash.com/downloa...animation.html

    Chronozphere's mech (still not working properly due to joint translations)
    http://fpc4gp2x.eonclash.com/downloa...animation.html

    Any ideas?

    cheers,
    Paul

  3. #13

    Re: Milkshape3D MS3D help needed

    Make a DeleD animation of a cube that translates. This would be a good experiment to find out how you should enter the translation in your datastructures. Just tweak your code until that example works.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  4. #14

    Re: Milkshape3D MS3D help needed

    Sounds like a good idea, I will try it

    cheers,
    Paul

  5. #15

    Chess Game need ms3d art

    Hey! I am writing a chess game program simulation and am in need of chess pieces that I can open with milkshape 3d file (.ms3d). Any idea where I can get it or import it, download it, etc? Thanks McKinnley

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •