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