BFF - Format Specs
GENERAL INFORMATION
  • The BFF Export format is self-contained and requires no importer. It is currently under development and will change constantly from version to version as new features are implemented. 
     
  • BFF writes a MAXScript (.ms) file with user-specified name to the desired location.
     
  • The file contains the basic scene information, material definition and calls to load every single scene object (new in 0.4.0). Now you can remark single lines to disable specific objects manually!
     
  • The file will start with remarks about the source scene and max version, date and time of export etc. The file will contain further remarks to make reading and editing the scene by hand easier. 
      
  • Materials are exported first. Instanced materials are exported just once and referenced by all objects that use them. A material contains the whole tree including sub-materials and maps. New in 0.4.0 - all 24 Material Editor materials can be included in the export.
     
  • Objects and their properties, their modifiers with their properties and general object properties are written out next to single .ms files in the sub-folder /Objects. These .ms files are referenced by the main .ms file.
     
  • At the end of the main file, hierarchy linking information will be stored if available.
     
  • When an Editable Mesh has to be exported, a new sub-folder "Meshes" will be created. An external .BFF file will be written to that directory. It will have the name of the exported object. This file will be referenced by the respective .ms object file. The .BFF file is an ASCII data file with detailed remarks. It can be edited by hand when needed. See below for an actual file example.
     
  • When a SplineShape has to be expored, a new sub-folder "Splines" will be created. An external .BFF file will be written to that directory. Name and content are similar to the mesh file but describe a Spline Shape. See below for an actual file example.
     
  • When a Mesh or SplineShape object is exported for the first time, a set of importer functions will be written out. These functions will be used to read back the external data. These functions are basically a built-in importer module.
     
  • When any of the external files is missing during import, the object will not be imported.
     
  • Every exported code line will be enclosed in error trapping code. When the line cannot be evaluated by the importing platform (because it is not supported by MAXScript on the respective 3ds max version, or because a plug-in is missing), the respective information will be skipped and not imported.
SAMPLE MESH DEFINITION .BFF FILE
-------------------------------------------------------------------
-- BFF Mesh Definition For [Box01]
-- Version 0.4.0 - 09/20/2003
-- Exporter by Borislav 'Bobo' Petrov
-- http://www.scriptspot.com/bobo/
-------------------------------------------------------------------
-- SOURCE SCENE NAME: [Untitled]
-- EXPORT DATE: [21.09.2003 13:15:37]
-- SOURCE VERSION: [5.1]
-------------------------------------------------------------------
8 --Vertex Count
12 --Face Count
1 --Supported Texture Channels Count
1 --Texture Channel Number
12 --Texture Vertex Count
12 --Texture Faces Count
2 --Available Texture Channels
--VERTEX LIST:
1, [-12.7147,-11.5897,0]
2, [12.7147,-11.5897,0]
3, [-12.7147,11.5897,0]
4, [12.7147,11.5897,0]
5, [-12.7147,-11.5897,32.9405]
6, [12.7147,-11.5897,32.9405]
7, [-12.7147,11.5897,32.9405]
8, [12.7147,11.5897,32.9405]

--FACE LIST IN FORMAT
--Index FaceDef MatID SmoothingGroup Edge1 Edge2 Egde3
1, [1,3,4], 2, 2, true, true, false
2, [4,2,1], 2, 2, true, true, false
3, [5,6,8], 1, 4, true, true, false
4, [8,7,5], 1, 4, true, true, false
5, [1,2,6], 5, 8, true, true, false
6, [6,5,1], 5, 8, true, true, false
7, [2,4,8], 4, 16, true, true, false
8, [8,6,2], 4, 16, true, true, false
9, [4,3,7], 6, 32, true, true, false
10, [7,8,4], 6, 32, true, true, false
11, [3,1,5], 3, 64, true, true, false
12, [5,7,3], 3, 64, true, true, false

--TEXTURE VERTEX LIST FOR CHANNEL 0
1, [0,0,0]
2, [1,0,0]
3, [0,1,0]
4, [1,1,0]
5, [0,0,0]
6, [1,0,0]
7, [0,1,0]
8, [1,1,0]
9, [0,0,0]
10, [1,0,0]
11, [0,1,0]
12, [1,1,0]

--TEXTURE FACES LIST FOR CHANNEL 0
1, [10,12,11]
2, [11,9,10]
3, [9,10,12]
4, [12,11,9]
5, [5,6,8]
6, [8,7,5]
7, [1,2,4]
8, [4,3,1]
9, [5,6,8]
10, [8,7,5]
11, [1,2,4]
12, [4,3,1]

-----------------
-- End Of File --
-----------------

-----------------
SAMPLE SPLINE DEFINITION .BFF FILE
-------------------------------------------------------------------
-- BFF Spline Definition For [Line01]
-- Version 0.4.1 - 09/22/2003
-- Exporter by Borislav 'Bobo' Petrov
-- http://www.scriptspot.com/bobo/
-------------------------------------------------------------------
-- SOURCE SCENE NAME: [Untitled]
-- EXPORT DATE: [22.09.2003 04:03:24]
-- SOURCE VERSION: [5.1]
-------------------------------------------------------------------

1 --Spline Count
4
--Spline Knot Count
false
--Spline Closed?
--KNOT LIST FOR SPLINE 1
1, #corner, [-73.2207,-8.17267,0], [-73.2207,-8.17267,0], [-57.064,23.1459,0]
2, #bezier, [-22.1398,25.3922,0], [-40.9072,54.4644,0], [-3.37238,-3.68002,0]
3, #bezier, [48.3506,-22.7013,0], [37.9584,-45.9921,0], [58.7428,0.589452,0]
4, #corner, [47.0099,5.4818,0], [52.8763,3.03563,0], [47.0099,5.4818,0]
-----------------
-- End Of File --
-----------------
-----------------