[WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Apprentice theonly112 is offline
    MemberRank
    Jan 2012 Join Date
    5Posts

    [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    I'm currently trying to work out some of the different structures of the files within the pk2's


    .bsr Resource file. References meshes, materials, animations, skeletons etc.
    .bms Meshes
    .bmt Material file that references different .ddj textures
    .ban Animation
    .bsk Skeleton


    .bsr Structure
    Code:
    12 byte Header
    52 byte unknown. Havn't look into those
    int bsrType; rages from 0x20000 to 0x20006 (could be more)
    string bsrTitle;
    From here on out they seem to differ depending on their bsrType
    28 byte unknown
    string meshReference Not in every .bsr. References a .bms file. Although the .bms file referenfces come later.
    float[2,6] boundingBox; outlines the mesh
    int unknown;
    
    int bmtFileCount;
    int unknown;
    string[btmFileCount] paths to the different materials used on the model
    
    int bmsFileCount;
    string[bmsFileCount] paths to the different meshes used 
    
    int unknown
    int unknown
    
    int banFileCount;
    string[banFileCount] paths to the different animation files 
    
    int bskFileCount; should be 1 for most models
    string[bskFileCount] path to the skeleton files.
    
    this is how far im parsing these files right now

    Code:
    .bms Structure
    12 Bytes header
    int index; position in the stream where the vertex information start
    48 bytes uknown
    int lightmapResolution; as far as i can tell. didnt check yet
    int uknown
    string meshname;
    string materialname; 
    int unknown;
    int vertexCount;
    
    for(int i = 0; i < vertexCount;i++)
    {
        float[3] vertices
        float[3] normals
        float[2] textureUV
        if(lightmapResolution != 0)
        {
            float[2] lightmapUV
        }
       12 bytes uknown //didnt look into this yet
    }
    
    if(lightmapResolution != 0)
    {
       string lightmapPath;
    }
    int boneCount; 
    string[boneCount] bones
    
    if(boneCount != 0)
    {
       vertCount * 6 of unkown data. Have not looked into this yet
    }
    
    int faceCount
    
    for(int i = 0; i < faceCount;i++)
    {
        int16[i,3] faces;
    }
    Code:
    .bmt structure
    12 byte header
    int textureCount
    for(int i = 0; i < textureCount;i++)
    {
       string name; // will be used in the mesh to identify which texture to use
       48 bytes of unknown data 
       string texturefilename;
       7bytes of unkown data
    }
    Code:
    .ban structure 
    I havn't looked into these very much yet. Basicly everything is guessed right now.
    12 byte header
    int unk
    int unk 
    string name; of the animation
    int timeInMs; I assume this is the duration of the animation
    int framesPerSecond? just a guess (seems to always be 30)
    int unk
    int keyframeCount; pure guess. but would make sense
    int[keyframeCount] keyframes;
    int boneCount
    for(int i = 0; i < boneCount;i++)
    {
       string boneName;
       int count; same as keyframeCount
       for(int p = 0; p < count;p++)
       {
           Vec4 rotation;
           Vec3 transform;
       }
    }
    //End of file

    .bsk structure
    So thanks to this post
    Code:
    12 byte header
    int boneCount;
    for(int i = 0; i < boneCount;i++)
    {
          if(not first bone)
          {
                int count; // Number of bones with same parent bone. Bone itself included
                for(int x = 0; x < count; x++)
                {
                      string boneName;
                }
          }
          byte unk;
          string boneName;
          string parentBoneName;
          //This next part is taken from Cruor's post.
          Vec4 rotationToParent;
          Vec3 translationToParent;
          Vec4 rotationToOrigin;
          Vec3 translationToOrigin
          Vec4 rotationUnkown;
          Vec3 translationUnkown;     
    }
    int unk;
    int unk;
    int unk;
    
    //End of file
    I will edit my post as i learn more about the structures.

    Please excuse the poor structure of my post and also my bad english.
    Last edited by theonly112; 11-07-12 at 11:54 PM. Reason: edited .ban


  2. #2
    Proficient Member antoha is offline
    MemberRank
    Oct 2007 Join Date
    Ukrain, KievLocation
    153Posts

    Re: [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    Ty this is a rather usefull post, now I got some ideas on why the blue soul avatar might not be working, I will test my new theory and post results here ^_^

    P.s only I have noticed this or this is a VERY inaffitient way to use models? I sepose u can make all of this in two files. . . Unless u want to reuae some files (skelet structure) for example. But that would be kinda. . . Lazy xD

  3. #3
    Laravel Core Programmer Jangan is offline
    DeveloperRank
    Jul 2007 Join Date
    Dubai, UAELocation
    2,113Posts

    Re: [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    what is .ban used for? monster structure?

  4. #4
    Apprentice theonly112 is offline
    MemberRank
    Jan 2012 Join Date
    5Posts

    Re: [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    Quote Originally Posted by Jangan View Post
    what is .ban used for? monster structure?
    It's under the image

    .bsr Resource file. References meshes, materials, animations, skeletons etc.
    .bms Meshes
    .bmt Material file that references different .ddj textures
    .ban Animation
    .bsk Skeleton

  5. #5
    Banned nemo07 is offline
    BannedRank
    Sep 2011 Join Date
    HomeLocation
    284Posts

    Re: [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    Quote Originally Posted by theonly112 View Post
    It's under the image

    .bsr Resource file. References meshes, materials, animations, skeletons etc.
    .bms Meshes
    .bmt Material file that references different .ddj textures
    .ban Animation
    .bsk Skeleton
    that's good info. for me, Im already working on it too So when I finished anything I will release it . isA

  6. #6
    Apprentice adrianrele is offline
    MemberRank
    Jun 2012 Join Date
    Puerto Cabello,Location
    23Posts

    Re: [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    for edit ?

  7. #7
    Apprentice theonly112 is offline
    MemberRank
    Jan 2012 Join Date
    5Posts

    Re: [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    Added the .bsk stuff.
    .bsk structure
    So thanks to this post
    Code:
    12 byte header
    int boneCount;
    for(int i = 0; i < boneCount;i++)
    {
          if(not first bone)
          {
                int count; // Number of bones with same parent bone. Bone itself included
                for(int x = 0; x < count; x++)
                {
                      string boneName;
                }
          }
          byte unk;
          string boneName;
          string parentBoneName;
          //This next part is taken from Cruor's post.
          Vec4 rotationToParent;
          Vec3 translationToParent;
          Vec4 rotationToOrigin;
          Vec3 translationToOrigin
          Vec4 rotationUnkown;
          Vec3 translationUnkown;     
    }
    int unk;
    int unk;
    int unk;
    
    //End of file
    Now i'm gonna look into this part of the .bms.
    Code:
    if(boneCount != 0)
    {
       vertCount * 6 of unkown data. Have not looked into this yet
    }
    I hope this contains info that links vertices to bone's. But i can't make sense out of that yet.

    Pastebin to expample data

    any help is obviously greatly appreciated.
    Last edited by theonly112; 11-07-12 at 07:10 PM.

  8. #8
    Banned nemo07 is offline
    BannedRank
    Sep 2011 Join Date
    HomeLocation
    284Posts

    Re: [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    Quote Originally Posted by theonly112 View Post
    Added the .bsk stuff.
    .bsk structure
    So thanks to this post
    Code:
    12 byte header
    int boneCount;
    for(int i = 0; i < boneCount;i++)
    {
          if(not first bone)
          {
                int count; // Number of bones with same parent bone. Bone itself included
                for(int x = 0; x < count; x++)
                {
                      string boneName;
                }
          }
          byte unk;
          string boneName;
          string parentBoneName;
          //This next part is taken from Cruor's post.
          Vec4 rotationToParent;
          Vec3 translationToParent;
          Vec4 rotationToOrigin;
          Vec3 translationToOrigin
          Vec4 rotationUnkown;
          Vec3 translationUnkown;     
    }
    int unk;
    int unk;
    int unk;
    
    //End of file
    Now i'm gonna look into this part of the .bms.
    Code:
    if(boneCount != 0)
    {
       vertCount * 6 of unkown data. Have not looked into this yet
    }
    I hope this contains info that links vertices to bone's. But i can't make sense out of that yet.

    Pastebin to expample data

    any help is obviously greatly appreciated.
    But the main files that are Important (.bms , .bsr ) , and I have the .bms But I'm working to connect them with each other .

  9. #9
    Apprentice theonly112 is offline
    MemberRank
    Jan 2012 Join Date
    5Posts

    Re: [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    Skeleton stuff seems to be correct:

  10. #10
    Banned nemo07 is offline
    BannedRank
    Sep 2011 Join Date
    HomeLocation
    284Posts

    Re: [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    That's Great for the information that we reached . I finished the models and textures and what I need is to connect the .bms with the .bsr to appear in Game I wanna know how :)

  11. #11
    Apprentice Anthony1 is offline
    MemberRank
    Dec 2011 Join Date
    8Posts

    Re: [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    Quote Originally Posted by nemo07 View Post
    That's Great for the information that we reached . I finished the models and textures and what I need is to connect the .bms with the .bsr to appear in Game I wanna know how :)
    after you convert the obj to bms edit it with a hex editor. Its in like the very beginning.

  12. #12
    Banned nemo07 is offline
    BannedRank
    Sep 2011 Join Date
    HomeLocation
    284Posts

    Re: [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    Quote Originally Posted by Anthony1 View Post
    after you convert the obj to bms edit it with a hex editor. Its in like the very beginning.
    Thx bro , But I did what you said and nothing appear in the game IDK why. I finished all CH weapons as a models + texture and I cant connect them into the client BTW I hope GOD will help me :)

    Quote Originally Posted by theonly112 View Post
    Skeleton stuff seems to be correct:
    Can we change his underwear ? :D

  13. #13
    Member Airdraw is offline
    MemberRank
    Mar 2012 Join Date
    89Posts

    Re: [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    If you work hard, you can achieve the hardest.

  14. #14
    Member Airdraw is offline
    MemberRank
    Mar 2012 Join Date
    89Posts

    Re: [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    Where are .bsr files allocated?
    I can't find any, for example eu_tsword_11_set_b.bsr

    // Solved, they're not hidden just you may use your brain :)
    Data.pk2 / Res / ---
    Last edited by Airdraw; 26-07-12 at 10:43 PM.

  15. #15
    I'm Archimedes InsaneDev is offline
    MemberRank
    Jun 2012 Join Date
    EgyptLocation
    454Posts

    Re: [WIP] Silkroad File Formats (.bsr .bms .bmt .bsk .ban )

    can you creat or just view for now??



Page 1 of 2 12 LastLast

Advertisement