About this web Banners and partners Jet engines Engines Teorie a další články Glossary Military shows Srovnání motorů Převaděč jednotek Interesting links Literatura Expozice For English readers Russion air weapons List of weapons Články Sukhoi pilot Technik u dopravky Jindřichův Hradec Letecké simulátory Jesenicko 2.0 ZK VFR Objects FSbox - crashboxes Czech rep. sceneries Developement notes FS FAQ Lock On - tutorial Ka-50 Black Shark Ostatní Cyklo Photos & reports Calendar Aviation museums on map Letecké dny v ČR/SR Airshows Aviatická pouť 2010 Aviatická pouť 2012 CIAF 2000 CIAF 2002 CIAF 2003 CIAF 2004 CIAF 2005 CIAF 2006 CIAF 2007 IFD 2008 Přerov 2005 Přerov 2006 Flying Rhino 2005 Flying Rhino 2007 Flying Rhino 2008 Flying Rhino 2009 Ramstein Rover 2012 Náměšť, Hradec 95/6 Náměšť 1995 a 1996 Náměšť 2006 Mošnov 1989 Den NATO 2006 Den NATO 2007 Dny NATO 2008 Dny NATO 2012 Čáslav 2007 Sliač 1964 Sliač 2003 Sliač 2005 Národné let. dni 2007 Malacky 2009 CSIAF 1992 Le Bourget 2007 RIAT 2009 TLP 2008 Duxford 2008 Kecskemét 2008 Kecskemét 2010 Airpower 2009 NTM 2009 Radom 2013 Cihelna 2006 Cihelna 2007 Cihelna 2010 Cihelna 2012 Den Pásovce 2009 Den Pásovec 2010 Kbely Bílý Potok Olomouc Neředín Králíky, Bouda Lešany Vyškov AirPark Zruč TM Brno Krakow 2013 Muz. Orla Bialego Świdnica Košice SPSL 2008 Messerschmitt Stif. Schleißheim Cottbus Gatow Peenemünde Sinsheim Gatchina NASM Castle Air Museum Hill Aerospace Museum Pacific Air Museum USS Hornet Planes of Fame Cradle of Aviation Kennedy Space Center Midland Museum of Flight USS Interpid Hendon De Havilland Museum Le Bourget Museum Linköping Aeroseum Ängelholm Moskva Siem Reap Bukurešť War Remnants Museum Rimini Caproni Automoto Autosalon 2005 AUTOTEC 2008 Ecce Homo 2005 Ecce Homo 2006 Ecce Homo 2007 Ecce Homo 2008 Ecce Homo 2009 FMX Brno 2010 Flights Flight over Jeseniky 1 Flight over Jeseniky 2 Piper L4J flight Praha - Chania 2007 Others Priessnitzův pohár 07 Delfín OK-ATS JAS-39 Gripen Panorama Medlánky 24.2.2008 Depozit TM Brno Dargen Ignis Brunensis 2008 aukce Mariánské Láz. California agric. mus. Petroleum museum Some options

Přepnout na češtinu Přidat k oblíbeným Verze pro tisk
Links
L-39 Výcvikový systém ATM Online www.airbase.cz www.militarybox.cz Československá PVO other links

česky english

FSBox

Crashbox viewer and creator for GMAX sceneries exported using MakeMDL.


version 1.3 (10.12.2005) - fsbox_1v3.zip (3070kB) or fsbox_1v3nomanual.zip (160kB, without HTML manualu)
  • unified data format for importu/export in MAXScript
  • crashboxes export by name or by selection
  • lowered memory usage
  • arguments parsing corrected
  • added function for scenery shadows removal
version 1.2 (10.9.2005) - fsbox_1v2.zip - your own crashboxes definition in 3dsmax/gmax, betaversion
version 1.1 (21.7.2005) - fsbox_1v1.zip - added cooperation with 3dsmax/gmax, betaversion
version 1.0 (20.7.2005) - fsbox_1v0.zip

Content:

  1. Reason of creation
  2. Basic informations about FSBox
  3. FSBox possibilities
  4. What is necessary
  5. Arguments
  6. FSBox.ms (MAXScript)
  7. Graphic representation of FSBox functions
  8. Crashboxes visualization in FS
  9. Crashboxes visualization in 3dsmax/gmax
  10. Your own crashboxes definition in 3dsmax/gmax
  11. DAT file conversion from old to new version
  12. Known issues
  13. Further developement
  14. Copyright

Reason of creation:

Objects exported from GMAX, expecially those more complex, have inaccurate crashboxes. Therefore you can experience building crash in FS when you are e.g. 15 meters away from your building. It's extremely annoying when trying to move on airfield with crash detection on. The reason is technology used by MS so called octtree, explained here (in Czech), as well as imperfection of export application MakeMDL.

Basic informations about FSBox:

FSBox tries to solve this bad situation by showing current crashboxes and possibility to edit them. Everything is based on BGLC code reading and editing. There's no GUI. Intent was to make simple, purely console application, which can be easily run from batch files. Except of console there's also script for 3dsmax/gmax, which allows cooperation with these two 3D programs.

FSBox possibilities:

  1. Crashboxes visualization in FS. On the basis of input ASM file new ASM file with visualized crashboxes is created. After compilation to BGL and installation into FS crashboxes are visible.
  2. Crashboxes visualization in 3dsmax/gmax. On the basis of input ASM file new DAT file is created. Crashboxes are visible in 3dsmax/gmax after import via MAXScript.
  3. Own crashboxes definition in 3dsmax/gmax. After their export via MAXScript and few other steps crashboxes in FS will be working as you wish.
  4. XML file with positional parameters of you crashboxes scenery can be created. New XML file is created on the base of existing XML of you scenery.
  5. FSBox helps with batch BAT file creation. Batch files are used for faster compilation of your ASM files.
  6. Except of crashboxes processing you can also edit existing ASM file (scenery) not to cast shadows in FS.
    Conditional display of scenery is planned for next FSBox version.

What is necessary:

  • fsbox.exe - this program
  • fsbox.dat - necessary template for ASM creation
  • fsbox.ms - MAXScript for 3dsmax/gmax (all these three files are in installation package)
  • bglc_9.exe (bglc.exe) - program for compilation ASM > MDL. Usage is e.g. "bglc_9.exe /mdl crashboxes.asm". Download it with this SDK. Or even better download bglc_9.exe which is more compatible with FS2004. I strongly recommend using bglc_9.exe !!
  • bglcomp.exe - program for compilation MDL > BGL with the help of XML file. Usage is e.g. "bglcomp crashboxes.xml". Download here
  • bglcomp.xsd - necessary scheme for XML files, included in previous SDK.
It's good to have all files (also ASM files) in one directory. It's also good to move fsbox.ms to the place, where you have scripts - e.g. C:\3dsmax\scripts or c:\gmax\gamepacks\fs2004\scripts.

Arguments:

FSBox.exe is console application, all possible arguments are described here.

fsbox.exe [/i] input [/o output] [/help] [/helpcs ] [/xml [xmlfile]] [/bat [batfile]] [/noshadow] [/maxbox [datfile]] [/noasm]

fsbox.exe [/i] input /patch datfile

fsbox.exe /convert datfile


/i input

Input ASM file with objects you want to process their crashboxes. Note that input file must be e.g. tower.asm, not tower_0.asm. Argument /i is not necessary.

/o output

Output ASM file, which will have visualized crashboxes inside. If you decide to set output file name, argument /o before name is necessary, otherwise implicit crashboxes.asm will be used.

/help

English help.

/helpcs

Czech help.

/xml xmlfile

Creates XML file with crashboxes position same as original scenery position. If no name set, filename corresponding to output ASM filename will be selected.

/bat batfile

Creates BAT file for easy compilation. If no name set, filename corresponding to output ASM filename will be selected.

/maxbox datfile

Creates DAT file with crashboxes description for 3dsmax/gmax MAXScript. If no name set, filename corresponding to output ASM filename will be selected.

/noasm

ASM file won't be created

/patch datfile

Selected input ASM file will be modified to have crashboxes of your definition. You need DAT file, exported from 3dsmax/gmax MAXScript.

/convert datfile

Converts selected DAT file created by older FSBox version to format compatible with FSBox 1.3

/noshadow

Output ASM file will be edited to cast no shadows in FS.


FSBox.ms (MAXScript):

This is script for 3dsmax and gmax, which gives you posibility to import or export crashboxes.


  1. Which objects to export.
    by selection - selected objects will be exported
    by name - all objects with name starting with "crashbox" will be exported
  2. Select program you are using - it is important, because together with program you also select whether the result of export will be displayed or saved to file. Gmax's MAXScript is not able to create file.
  3. Set correct scale.
    Please pay attention to the scale setting. Value 1.0 is valid if your scale in program is set 1 unit = 1 metr.
    If you are using 1 unit = 1 inch, set spinner's value to 0.0254.
    I strongly recommend to check whether generated DAT file (or data showed in window od FSBox MAXScript) is right - you will see there some floating point values. Those are position and dimension of crashbox. If there are values such as -1244, 0, 6542 and you know that your scene is only few beters big, then there is a problem with scale. Set scale to 0.0254 and ty again.
  4. import - imports DAT file with crashboxes and shows them as boxes.
    export - exports created crashboxes from program (3dsmax/gmax). Your crashboxes will work in FS after few other steps.
    help - shows basic help
  5. Message with result of import/export.
    FSBox v1.3 compatible data imported
    FSBox v1.2 or older data imported !!! - data were imported right if file structure was correct. But despite it I suggest to convert this file to FSBox 1.3 version (see argument /convert).
    Data exported via clipboard (?) - export from gmax shows this message
    Created C:\gmax\airport_crashes.dat - export from 3dsmax shows this message

Graphic representation of FSBox functions

For better understanding of how FSBox works I recommend to familiarize with steps between scenery modelling and display in FS.

File types:
  • ASM - scenery source code in BGLC language (a bit like well known assembler). These files are created by export of your scenery from gmax using MakeMDL. Note that you have to have active option Keep Files in MakeMDL (otherwise only MDL will be created).
  • MDL - comes up after ASM files compilation using bglc application. Also export from gmax using MakeMDL creates these files.
  • XML - positional data of scenery, created by MakeMDL while exporting from gmax
  • BGL - comes up after XML and MDL compilation by bglcomp. This format is used in FS.
  • DAT - files for data exchange between fsbox.exe and fsbox.ms.
  • X - DirectX files, it's possible to put them on input of MakeMDL instead of direct export from gmax.
Rectangles are programs, ellipses are filename extensions, arrows are conversions between file formats (especially compilations).



Crashboxes visualization in FS:

  1. Create scenery in GMAX and export it using MakeMDL to MDL.
  2. Do not forget to set "Keep Files" in Options of MakeMDL and click Start.
  3. You'll get two ASM files - e.g. scenery.asm and scenery_0.asm.
  4. Now using FSBox create one ASM file, few examples:
    fsbox.exe scenery.asm /o output.asm /xml /bat
    reads scenery.asm, result with visualized crashboxes is saved to output.asm, output.xml is created on base of scenery.xml, also output.bat is created
    fsbox.exe scenery.asm
    reads scenery.asm, result is saved to implicitly named file crashboxes.asm
    fsbox.exe scenery.asm /o output.asm /maxbox boxes.dat
    reads scenery.asm, creates output.asm and also boxes.dat for 3dsmax/gmax import is created.
  5. Result is one new ASM file. Compile it to MDL this way:
    bglc.exe /mdl scenery.asm
  6. Compile MDL to BGL. First you need to have XML file created (by FSBox of by your self)
    bglcomp.exe scenery.xml
    Of instead of last two steps use batch BAT file.
  7. Now you have BGL file, install in FS and test it.

Crashboxes visualization in 3dsmax/gmax:

  1. Create scenery in GMAX and export it using MakeMDL to MDL.
  2. Do not forget to set "Keep Files" in Options of MakeMDL and click Start.
  3. You'll get two ASM files - e.g. scenery.asm and scenery_0.asm.
  4. Let FSBox create DAT file, where crashboxes are described.
  5. fsbox.exe scenery.asm /maxbox
    reads scenery.asm, creates crashboxes.dat. Also crashboxes.asm is created
    fsbox.exe scenery.asm /maxbox /noasm
    does not create ASM file
    fsbox.exe scenery.asm /maxbox boxes.dat
    reads scenery.asm and creates boxes.dat.
  6. In 3dsmax/gmax go to menu > MAXScript > Run Script. Search for and run script fsbox.ms
  7. You'll see script's window. Click import, search for your DAT file and open it.
  8. Now you should see crashboxes in 3dsmax/gmax. There could be scale problem with boxes - in that case delete these boxes and import them once again with scale set to another value

You should see something like this now.


Your own crashboxes definition in 3dsmax/gmax:

  1. Firstly you create common boxes. For easier manipulation it's recommended to put them all together by Edit Mesh > Attach.



  2. Run script fsbox.ms (menu > MAXScript > Run Script)
  3. Set few export parameters.
    export by selection or by name
    program 3dsmax or gmax
    scale value
  4. Now click on export in fsbox.ms window.
    When exporting in 3dsmax, one DAT file is saved. Default filename is crash_export.dat.
    When exporting in gmax, result is not saved but showed (gmax's MAXScript prohibites files saving). It is good to save showed text to text file and name it again e.g. crash_export.dat
    It can happen, that instead of line delimiters in "export window" there'll be only bold vertical lines or boxes. For next steps it won't have bad effect.



    Fsbox.ms takes all selected or well named objects and divides them into single elements (subobjects) for himself. From box-like envelope of each element one crashbox will be created Two elements of editable mesh must not share vertex or face, otherwise it will be evaluated as one crashbox, not two or more.

    Crashboxes have their walls (faces) aligned with coordinates system of your scene, so rotation of box will affect only size of crashbox, not its orientation !!!



  5. Now you need to put together new crashboxes and your original ASM file. You'll do it this way:
    fsbox.exe scenery.asm /patch crash_export.dat
    crashboxes from crash_export.dat will be written to scenery.asm on corresponding lines.



  6. Compile edited scenery.asm to BGL and test it in FS.

DAT files conversion from old to new version:

  1. You recognize old version DAT files by their content, which is alike one of these two.
  2. 15.9243,8.57656,26.3459,27.1573,-8.57656,-30.6221 2.63285,2.26066,2.59684,-9.15751,0.0,-5.66402 16.6287,18.2878,19.3323,-47.317,0.0,16.0739
    BGL_CRASH_OCTTREE crash_end_1 dw CRASH_FLAG_BUILDING_PLANE dw 1 real4 -77.6461,0.0,11.8585 real4 23.3186,5.17386,6.64294 dw 1, 1, 1, 1, 1, 1, 1, 1 OCTTREE_NODE 255, 255, 255, 255, 255, 255, 255, 255 crash_end_1 label word
  3. Conversion can be done this way:
    fsbox.exe /convert crashdata.dat
  4. New DAT file content will look like this one:
    ; exported from 3dsmax/gmax ; compatible with fsbox version 1.3 32.709499,3.004010,30.690399,-26.942801,0.000000,14.750400 32.574902,1.582980,22.836100,-26.954901,3.011230,18.796801 4.845850,4.215890,12.270100,-13.152900,7.720600,1.213870 0.807644,2.980200,1.043210,-12.136400,11.242300,4.872620 2.860400,2.271490,2.086410,-38.903599,0.000000,4.103980

Known issues:

  1. Export from gmax shows "Maximum string length exceeded".
    You have too much crashboxes defines, their description can't be shown in script's window. Nevertheless you can copy their description via clipboard from Listener window (key F11 starts Listener in gmax)

Further developement:

Version 1.3 debug. Conditional scenery display.

Copyright:

Usage and distribution of this utility is for free. Commercial distribution in any form is possible only with written author's acceptance.
If you use FSBox in you scenery, please write me an e-mail (to have at least some feedback).





Přístupů od 24. 4. 2002