3DS2BR interprets the information in the .3ds
file and converts it to its nearest BRender equivalent. Depending on which command line options are specified, it will generate one or more of the following files:
3DS2BR 3ds_file.3ds {options}
where:3ds_file.3ds
is the 3D Studio Binary file you wish to convert.
3DS2BR command line options are listed below:
The -mod
option extracts mesh information describing 3DS model geometry, and stores it in the specified binary file. The -mat
option extracts material description information, and stores it as a binary file. The -act
option extracts the 3DS actor hierarchy. The -log
option stores conversion information in a text file. The -scr
option extracts material description information and stores it in a BRender material script file (a text file).
You can specify any, or a combination, of the above options. For example, if you are only interested in importing the mesh data describing model geometry, use the -mod
option:
3DS2BR 3ds_file.3ds -mod model_file.datThis command line saves the converted mesh data in
model_file.dat
. Models stored as .dat
files can be loaded into BRender programs using BrModeLoad/Many
.Command line options can also be read from a file. The following command line performs a full conversion, generating and saving all five BRender format files, while displaying warning and information messages:
3DS2BR 3ds_file.3ds @options -vwhere the
options
file contains the following lines:
-mod model_file.dat -mat material_file.mat -act actor_file.act -log log_file.log -scr mat_script_file.matNote that the above extensions are adopted by convention, and are not obligatory.
If you want to convert a hierarchical 3DS model and use it directly in BRender, use the -act
and -mod
options. For example, suppose a hierarchical model of a human body was contained in the file person.3ds
:
3DS2BR person.3ds -act person.act -mod person.datwould create a file
person.dat
containing the models defined in person.3ds
, and a file person.act
defining the hierarchical relationships between these models. The 3DS hierarchy could be reproduced in BRender by loading and registering the converted models,
no_of_models = BrModelLoadMany("person.dat", * model_array, max_no); BrModelAddMany(* model_array,no_of_models); root_actor = BrActorLoad("person.act");If you don't wish to retain an actor hierarchy, you can collapse the contents of a
.dat
file containing multiple models into a single model (using GEOCONV's -m
option). In this case you should specify the -nomatrix
option when converting model data using 3DS2BR. This model can then be loaded using BrModelLoad
.Options in this file can be separated by any whitespace characters. Lines in this file are limited to 255 characters.
Examples illustrating the use of 3DS2BR are given later in this chapter.