fixed file permissions
[qbasicapps.git] / graphics / 3D / 3dSynthezier / doc / index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>3D Synthezier</title>
6 </head>
7 <body>
8 <h1>3D Synthezier</h1>
9
10 <pre>
11 This QBasic program was written by me in around 2003. It parses scene
12 definition language and creates 3D world based on it.  Result will be
13 in a wavefront obj file, witch can be then visualized using external
14 renderer.
15
16 Basic concept of defining scene is:
17   Simple and primitive objects are created on point and polygon level.
18   More complex ones can be created my combinig already existing ones,
19   while applying various transformations on them.
20
21 Objects with all its subobjects can be rotated, flipped or resized
22 omong any axis.  Generator has built in cache for data input and
23 output to minimize file access.
24
25 </pre>
26
27 <BR/>Examples:
28 <CENTER>
29         <BR/><IMG src="city1.jpg">
30         <BR/>Attempt to make "Fifth Eelement" like city.
31         <BR/><BR/>
32
33         <BR/><IMG src="city2.jpg">
34         <BR/>Attempt to make "Fifth Eelement" like city. Night.
35         <BR/><BR/>
36
37         <BR/><IMG src="city3.jpg">
38         <BR/>Attempt to make "Fifth Eelement" like city. Night.
39         <BR/><br/>
40
41
42         <BR/><IMG src="c1.jpg">
43         <BR/>Hexangular city.
44         <BR/><BR/>
45
46         <BR/><IMG src="c2.jpg">
47         <BR/>Hexangular city, closer.
48         <BR/><BR/>
49
50         <BR/><IMG src="c3.jpg">
51         <BR/>Hexangular city, even closer.
52         <BR/><BR/>
53 </CENTER>
54
55 <pre>
56 <CODE>
57
58 I converted these 2 generated cities also
59 to <a href="http://www.blender.org/">Blender</a> format so you can
60 explore them interactively :)
61
62 Download:
63         <a href="city_square.blend">Square city (3.5 MB)</a>
64         <a href="city_hexagon.blend">Hexagonal city (20.3 MB)</a>
65
66
67
68
69         System requirements
70         ===================
71
72 DOS     (6.22 preferred)
73 QBasic  (4.5 preferred)
74
75
76         Installation
77         ============
78
79 * Unpack ZIP file in any folder.
80 * update include path inside  bin/3dparse.bas
81
82
83         Running program
84         ===============
85
86 Make sure you have QB binaries in your PATH.
87 Execute  bin/city1.bat  or  bin/city2.bat to generate example citys.
88 After parsing is finished appropriate *.obj files will
89 appear in the  bin  directory holding generated scene.
90 Visualize scene with your favourite renderer.
91 (3D Studio MAX or Nugraf 3D rendering System will do)
92
93
94         Directory layout
95         ================
96
97 bin
98         3dparse.bas             3D generator main executable
99         city1.3d                city with square-like buildings
100         city2.3d                city with hexangular buildings
101         result.mtl              shared material library
102         *.bat                   quick launch scripts
103 doc                             manual
104 include                         3D objects used to compose the scene
105
106
107         Scene description language
108         ==========================
109         (read examples...)
110
111
112 here                    - defines new segment
113 p  x y z                - defines new point
114 f  p1 p2 p3 p4          - defines new polygon,  p4  may be unused
115 warn  message           - displays warning message, and wait for key
116 end                     - terminates parser
117 mtl  material           - selects material
118 mtlrnd  material ...            - selects random material from list
119 obj  object xz45 xy20 x+3 y*2   - includes sub object, can be rotated moved
120                                 or resized,
121                                 across X Y Z. If object name begin vith ~
122                                 then it will be loaded from current directory.
123                                 if object name ends with ~ then object will
124                                 be parsed directly from file, and not chached,
125                                 to allow loading of greater than 500 lines
126                                 files.
127         <IMG src="axes.png">
128
129
130 rnd  p^1^2^3 p^7^2^1            - select random command to execute, ^ will be
131                                   converted to spaces.
132 # whatever text                 - comment
133 out  file                       - specify output file name, must be first command
134 set  variable  contents         - set variable contents, variable must be
135                                   number, contents can be string. max variables
136                                   is 100. first is 0.
137 anycommand %1 anything          - inserts variable 1 contents info line
138 cmp  flag string1 string2       - compares strings, and inserts TRUE to flag, if
139                                   they are equal, else inserts FALSE. max 9 falgs
140                                   ,0 first. Each subobject has its own flags.
141 ?flag anycommand                - executes command if flag is true.
142                                   exapmle: ?3 obj car z*2 xy45
143 dum                             - dummy function, does notheing
144
145 </CODE>
146 </pre>
147 </BODY>
148 </HTML>