About b3d file structure

Miscellaneous Forums/Content Creation Tools/About b3d file structure

Im having troubles with getting the b3d files i produce to work, so i have some questions :o

First off, is the content at this link still correct?

http://www.blitzbasic.com/sdkspecs/sdkspecs/b3dfile_specs.txt

If so, i was wondering mainly about defining chunk length, should i count number of bytes im writing to file, or count 'items' that i am writing, as in, if i write XYZ values for a vertex, should i count that as 12 or 3 in length? Everything seems to be 4 bytes in length.

Im trying to whip together a b3d exporter for blender, but as of 1 hour ago i knew nothing about python, so it will be interesting to see how it turns out :o

Not sure if this is the correct place to put it, but oh well.

been a while since I've messed with the B3D format, but if I remember correctly, chunk length was in bytes.

Yeah it was, got some of it working, playing around with bone influences now.

When getting face uv data, should i just store it per-vertex as it comes and write it that way, or do i need to consider some special order/whatever?

Anyone have any suggestions about above question?

I guess i could create individual verts for each face, but that would complicate things a lot when getting influences from the armature later :$

I released some code some time ago that saves a static B3D with UVs, this might help. Seek for "SaveB3D" in Codearchives > Manipulate Meshes >

This is going slowly lol, working now so i dont have any time really to work on this.

That should help some jfk :o

Managed to get animations out of blender now, need to do math stuff, then it should work, hopefully.

I managed to run into another problem now, blitz will only load 1 bone from the exported files, and the model get messed up really bad ( model were fine until i added armatures ).

At the moment i am writing default values to both bone nodes and keys, would that have something to do with it? ( Figured it would not mess things up )


File structure ( accordingly to my script ):
BB3D:root
  NODE:n.Cube
    MESH:Cube
      VRTS:Cube.v
      TRIS:Cube.f
    ANIM:Armature
    NODE:n.Bone
      BONE:Bone
      KEYS:Bone.k
      NODE:n.Bone.013
        BONE:Bone.013
        KEYS:Bone.013.k
        NODE:n.Bone.015
          BONE:Bone.015
          KEYS:Bone.015.k
          NODE:n.Bone.017
            BONE:Bone.017
            KEYS:Bone.017.k
            NODE:n.Bone.019
              BONE:Bone.019
              KEYS:Bone.019.k
            NODE:n.Bone.021
              BONE:Bone.021
              KEYS:Bone.021.k
      NODE:n.Bone.014
        BONE:Bone.014
        KEYS:Bone.014.k
        NODE:n.Bone.016
          BONE:Bone.016
          KEYS:Bone.016.k
          NODE:n.Bone.018
            BONE:Bone.018
            KEYS:Bone.018.k
            NODE:n.Bone.022
              BONE:Bone.022
              KEYS:Bone.022.k
            NODE:n.Bone.020
              BONE:Bone.020
              KEYS:Bone.020.k
      NODE:n.Bone.001
        BONE:Bone.001
        KEYS:Bone.001.k
        NODE:n.Bone.010
          BONE:Bone.010
          KEYS:Bone.010.k
      NODE:n.Bone.002
        BONE:Bone.002
        KEYS:Bone.002.k
        NODE:n.Bone.003
          BONE:Bone.003
          KEYS:Bone.003.k
      NODE:n.Bone.004
        BONE:Bone.004
        KEYS:Bone.004.k
        NODE:n.Bone.006
          BONE:Bone.006
          KEYS:Bone.006.k
          NODE:n.Bone.008
            BONE:Bone.008
            KEYS:Bone.008.k
            NODE:n.Bone.011
              BONE:Bone.011
              KEYS:Bone.011.k
      NODE:n.Bone.005
        BONE:Bone.005
        KEYS:Bone.005.k
        NODE:n.Bone.007
          BONE:Bone.007
          KEYS:Bone.007.k
          NODE:n.Bone.009
            BONE:Bone.009
            KEYS:Bone.009.k
            NODE:n.Bone.012
              BONE:Bone.012
              KEYS:Bone.012.k



Going to see if i can put the b3d somewhere for download also.

EDIT:Some bells started ringing will reading this post again, the mesh makeover problem is no more, lol.