1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
\r
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
\r
5 <title>3D Synthezier</title>
\r
8 <h1>3D Synthezier</h1>
\r
9 <a href="http://svjatoslav.eu/programs.jsp">Other applications hosted on svjatoslav.eu</a>
\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
16 Distributed under <a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU GENERAL PUBLIC LICENSE Version 2</a>.
\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
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
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
37 <BR/><IMG src="city1.jpg">
\r
38 <BR/>Attempt to make "Fifth Eelement" like city.
\r
41 <BR/><IMG src="city2.jpg">
\r
42 <BR/>Attempt to make "Fifth Eelement" like city. Night.
\r
45 <BR/><IMG src="city3.jpg">
\r
46 <BR/>Attempt to make "Fifth Eelement" like city. Night.
\r
50 <BR/><IMG src="c1.jpg">
\r
51 <BR/>Hexangular city.
\r
54 <BR/><IMG src="c2.jpg">
\r
55 <BR/>Hexangular city, closer.
\r
58 <BR/><IMG src="c3.jpg">
\r
59 <BR/>Hexangular city, even closer.
\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
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
79 DOS (6.22 preferred)
\r
80 QBasic (4.5 preferred)
\r
86 * Unpack ZIP file in any folder.
\r
87 * update include path inside bin/3dparse.bas
\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
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
111 include 3D objects used to compose the scene
\r
114 Scene description language
\r
115 ==========================
\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
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
134 <IMG src="axes.png">
\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