FreeWorld Tutorial
By Alan Baylis 21/07/2003
Saving & Exporting the World Data
As I mentioned above, the only way to save the world at the moment is to
select all brushes and save them to a brush file. When exporting the world using
the main menu you will be given the option to save the static lights, sometimes this
may fail to occur, if so you can save these yourself using the save option in the static light properties.
Splines are not saved automatically so you need to save
them yourself using the spline properties dialog. The world is currently
exported as triangles to make the data compatible with my world loader/viewer, but the next version will allow the saving of the n-sided polygons and I
plan to add options to save the data in an indexed form or as precompiled
sectors (leaves of a BSP tree) so that the loader/viewer does not have to BSP
the polygon data before using it. The data that the editor exports is intended
to be easy to read into your own programs, the data file begins with an integer
value for the number of polygons (triangles in this case) in the data file which
is then followed by the data for each polygon:
unsigned integer value
texture index
float
horizontal texture scale
float
vertical texture scale
float
horizontal texture shift
float
vertical texture shift
float
texture rotation value
integer
number of polygon vertices (three in this case)
which is then followed by the data for each vertex of the polygon:
float
x coordinate
float
y coordinate
float
z coordinate
float
u texture coordinate
float
v texture coordinate