------------------------------------------------------------------ File translated by Tim from Flyback Labs - https://flybacklabs.com ------------------------------------------------------------------ From DXF File to GAME BASIC for SEGASATURN Data Converter ------------------------------------------------ Win95 Version ------------------------------------------------ [Overview] DXFCONV.exe A tool that extracts "3Dface" information from a DXF file and creates a text file in GAME BASIC for SEGA SATURN format. In addition, it is possible to optionally add a standard display program to the beginning. [How to Run] Click [DXFCONV] from [Dxfconv] in the [Start] menu Specify the conversion source file name. Specify the conversion destination file name. If not specified, the extension of the conversion source file name is output as ".B". (*See translation note at end*) Click "Convert" (変換実行) to start the conversion. The conversion is complete when the "File converted" dialog is displayed. Click "Finish" to exit DXFCONV.EXE. (終了) Also, if the "Add display program" (表示プログラムを付加する) check box is selected, the standard display program "HEADBAS.B" can be added to the beginning and transferred to GAME BASIC for SEGA SATURN as it is for execution. Furthermore, the program to be added can be rewritten by the user. (Fixed file name) If you are using multiple group information (dividing polygons), execute "Conversion execution (group information support)." (変換実行(グループ情報対応)) Caution) A display program cannot be added to conversions with group information support. If you want to display the results, please create a display program yourself. However, normal "conversion execution" is possible even if multiple group information is used. In that case, a display program can be added. [Caution] Please note the line delimiter of the DXF file. The line end condition is [CR] + [LF], so when converting a DXF file created by Mac etc., the line end condition should be changed from [CR] to [CR] + [LF]. Please execute DXFCONV after converting lines to the correct format. ------------------------------------------------ DOS Version ------------------------------------------------ [Overview] DXF2pol.exe Extract "3Dface" information from DXF file and text file A converter that creates (* .POL). [How to Run] From the Command Prompt... DXF2POL [ [. ]] If all are omitted, "DAT.DXF" will be converted. If the extension is omitted, ".DXF" will be added. [Output File] Outputs vertex text data. .POL If the file name is omitted, DAT.POL is output. POL2bas.exe A converter that creates a BASIC file (* .VTX, * .PTN) from vertex information (text file: * .POL). POL2bas2.exe Same as above, but a converter that creates data by dividing objects based on group information. [How to Run] From the Command Prompt... POL2bas [ [. ]] POL2bas2 [ [. ]] If all are omitted, "DAT.POL" will be converted. If the extension is omitted, ".POL" will be added. [Output File] Outputs BASIC text data. .VTX .PNT If the file name is omitted, DAT.VTX DAT.PNT is output. [Details] It is a tool for DOS that converts DXF files created by 3D modeling software etc. into VERTEX data and POLYGON data for GAME BASIC for SEGA SATURN. Only "3D FACE" is supported for DXF data. The converter has a 2-pass configuration, 1st Pass - Cut out "3DFACE" information from the DXF file: Convert the DXF file to a ".POL" file in the following format. Polygon ID (increasing from 1) Number of vertices (3 or 4) Layer name, defined in DXF group code 8 Color code, defined in DXF group code 62 The x-coordinate, y-coordinate, and z-coordinate of the first point, defined by DXF group codes 10, 20, and 30. The x-coordinate, y-coordinate, and z-coordinate of the second point, defined by DXF group codes 11, 21, and 31. The x-coordinate, y-coordinate, and z-coordinate of the third point, defined by DXF group codes 12, 22, and 32. The x-coordinate, y-coordinate, and z-coordinate of the fourth point, defined by DXF group codes 13, 23, and 33. * In the case of 3 vertex polygons, the coordinate values of the 3rd and 4th points are the same. * Exit code, enter -1 to all data. * If there is no group code 8 between one 3D FACE and the next, the layer name will be default, and if there is no group code 62, the color code will be 0. When you run the program, the converted polygon ID will be displayed. 2nd Pass - Converts "3DFACE" information to a BASIC text file: Convert the ".POL" file to a".VTX" file and ".PNT" file in the following formats. There are two types of converters in the second stage: a program that converts the input file into one object, and a program that combines 3DFACEs with the same layer name into one object to generate multiple objects. The color code information in the ".POL" file is not used. Also, the number of vertices is not used in this program. ".VTX" file format 10000 REM----------- 10001 DATA N (Number of vertices) 10002 DATA X,Y,Z (Coordinates of the first vertex) 10003 DATA X,Y,Z (Coordinates of the second vertex) ********* ".PNT" file format 20000 REM----------- 20001 DATA N (Number of polygons) 20002 DATA ,(A,B,C,D) (List of vertex IDs of the first polygon) 20003 DATA ,(E,F,G) (List of vertex IDs of the second polygon) ********* * For programs that create multiple objects, 10000 REM----- 10001 DATA N 10002 DATA X,Y,Z 10003 DATA X,Y,Z 10004 DATA X,Y,Z 10005 DATA X,Y,Z 10006 REM----- 10007 DATA N 10008 DATA X,Y,Z 10009 DATA X,Y,Z 10010 DATA X,Y,Z 10011 DATA X,Y,Z 10012 DATA X,Y,Z 10013 REM----- 10014 DATA N 10015 DATA X,Y,Z 10016 DATA X,Y,Z 10017 DATA X,Y,Z one file with multiple Data statements in a row is generated, as shown. If you run a program that generates multiple objects, first a list of layer names and the number of layers that existed in the original DXF file are displayed. When creating a program on GAME BASIC for SEGA SATURN, it is necessary to register objects based on this number of layers. * Source code will be released for the above tools. (Included on CD) * It is assumed that the user will make improvements based on this source code. * Since the format of the converted file is assumed to be DXF format, we do not guarantee the operation when trying to convert other files. This is a sample program that displays the created VERTEX and POINT data. If there is only one object, it can be displayed by combining ".VTX" and ".PNT" data with the following sample program. Simple display program "Headbas.b" 1000 '---------------------------------- 1010 'Polygon TEST PROGRAM 1020 ' for 1030 'DXFconv.exe Output file 1040 '---------------------------------- 2000 SCREEN 2010 READ VTN 2020 SETVERTEX 1,VTN,READ,(5,5,5) 2030 READ PLN 2040 SETPOLYGON 1,PLN,1,READ 2050 SETATR 1,PLN,(4,1,3,0,7399,8) 2060 OBJ(1,@ATR) = 1,1 2070 OBJ(1,@TYPE) = 4 2080 OBJ(1,@XRV) = 0.002,0.001,0 2090 '---------------------------------- For details, refer to the "SETVERTX" instruction, "SETPOLYGON" instruction, "SETATR" instruction, etc. in the manual. Read the number of vertices and the number of faces with the READ command, and use it as data to specify the number of vertices when reading with SET VERTEX or the like. In the case of data in which multiple objects occur, it is necessary to repeat SET VERTEX and SET POLYGON multiple times with FOR-NEXT. Load with zoom and offset as needed to define the parent-child relationship of the object. [Caution] Please note the line delimiter of the DXF file. The line end condition is [CR] + [LF], so when converting a DXF file created by Mac etc., the line end condition should be changed from [CR] to [CR] + [LF]. Please execute DXFCONV after converting lines to the correct format. ------------------------------------------------ How to Uninstall ------------------------------------------------ To remove installed application: In [Control Panel]-[Add / Remove Programs], Select [DXFCONV]. (C)1998 ASCII Corp./Bits Laboratory/ESP inc. * Translation Note ------------------ Where the instructions say that an unspecified extension for a conversion source file will be output as ".B," this is likely a typo in the original document. Rather, an unspecified extension for a conversion *destination* file will be output as ".B".