X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=qbasicapps.git;a=blobdiff_plain;f=graphics%2F3D%2F3D%20Synthezier%2Fdoc%2Findex.html;fp=graphics%2F3D%2F3D%20Synthezier%2Fdoc%2Findex.html;h=615e50258d54fd91306d2f8f7d13d27a3fbb32c6;hp=0000000000000000000000000000000000000000;hb=c6aaa433dedff2dd8063983c7716c0cdb296a0f9;hpb=3779e9035f2c67e36111585e10d956a3e9e3c0fa diff --git a/graphics/3D/3D Synthezier/doc/index.html b/graphics/3D/3D Synthezier/doc/index.html new file mode 100644 index 0000000..615e502 --- /dev/null +++ b/graphics/3D/3D Synthezier/doc/index.html @@ -0,0 +1,584 @@ + + + +QBasicApps - collection of applications mostly written in MS QBasic for DOS environment + + + + + + + +" + + + + + +
+

QBasicApps - collection of applications mostly written in MS QBasic for DOS environment

+
+ + + + +

+Parses scene definition language and creates 3D world based on +it. Result will be in a wavefront obj file, witch can be then +visualized using external renderer. +

+ +

+Basic concept of defining scene is: +

+
    +
  • Simple and primitive objects are created on point and polygon level. +
  • +
  • More complex ones can be created my combinig already existing ones, +while applying various transformations on them. +
  • +
+ +

+Objects with all its subobjects can be rotated, mirrored or resized +omong any axis. Generator has built in cache for data input and output +to minimize file access. +

+ +
+

1 System requirements

+
+ + + +++ ++ + + + + + + + + + + + + + + + + + +
softwarepreferred version
DOS6.22
QBasic4.5
+
+
+
+

2 Installation

+
+
    +
  • Unpack ZIP file in any folder. +
  • +
  • update include path inside bin/3dparse.bas +
  • +
+
+
+

2.0.1 Directory layout

+
+
    +
  • bin +
      +
    • 3dparse.bas - 3D generator main executable +
    • +
    • city1.3d - city with square-like buildings +
    • +
    • city2.3d - city with hexangular buildings +
    • +
    • result.mtl - shared material library +
    • +
    • *.bat - quick launch scripts +
    • +
    +
  • + +
  • include - 3D objects used to compose the scene +
  • +
+
+
+
+
+

3 Scene description language

+
+

+(read examples…) +

+ + +
+here
+
+

+defines new segment +

+ +
+p  x y z
+
+

+defines new point +

+ +
+f  p1 p2 p3 p4
+
+

+defines new polygon, p4 may be unused +

+ + +
+warn  <message>
+
+

+displays warning message, and wait for key +

+ +
+end
+
+

+terminates parser +

+ +
+mtl  material
+
+

+selects material +

+ +
+mtlrnd  material ...
+
+

+selects random material from list +

+ +
+obj  object xz45 xy20 x+3 y*2
+
+

+includes sub object, can be rotated moved or resized, across X Y Z. If +object name begin vith ~ then it will be loaded from current +directory. if object name ends with ~ then object will be parsed +directly from file, and not chached, to allow loading of greater than +500 lines files. +

+ + +
+

rotation.png +

+
+ + +
+rnd  p^1^2^3 p^7^2^1
+
+

+select random command to execute, ^ will be converted to spaces. +

+ +
+# whatever text
+
+

+comment +

+ +
+out  file
+
+

+specify output file name, must be first command +

+ +
+set  variable  contents
+
+

+set variable contents, variable must be number, contents can be +string. max variables is 100. first is 0. +

+ +
+anycommand %1 anything
+
+

+inserts variable 1 contents info line +

+ +
+cmp  flag string1 string2
+
+

+compares strings, and inserts TRUE to flag, if they are equal, else inserts FALSE. max 9 falgs, 0 first. Each subobject has its own flags. +

+ +
+?flag anycommand
+
+

+executes command if flag is true. +

+ +

+exapmle: ?3 obj car z*2 xy45 +

+ +
+dum
+
+

+dummy function, does notheing +

+
+
+ +
+

4 Usage

+
+

+Make sure you have QB binaries in your PATH. Execute +

+
+bin/city1.bat
+
+

+or +

+
+bin/city2.bat
+
+

+to generate example cities. After parsing is finished, appropriate +*.obj files will appear in the bin directory holding generated scene. +Visualize scene with your favourite renderer. +

+
+
+
+

5 Examples

+
+

+Download Blender files: +

+ + + +++ ++ + + + + + + + + + + + + + + + + + +
filesize
rectangular city.blend3.6 MB
hexagonal city.blend21 MB
+ +

+They were produced by importing generated wavefront obj files into +Blender. +

+
+ +
+

5.1 Rectangular city

+
+ +
+

rectangular city, 1.jpeg +

+
+ + +
+

rectangular city, 2.jpeg +

+
+ + +
+

rectangular city, 3.jpeg +

+
+
+
+
+

5.2 Hexagonal city

+
+ +
+

hexagonal city, 1.jpeg +

+
+ + +
+

hexagonal city, 2.jpeg +

+
+ + +
+

hexagonal city, 3.jpeg +

+
+
+
+
+
+ + +