From: Svjatoslav Agejenko Date: Sun, 27 Apr 2025 22:44:37 +0000 (+0300) Subject: Document some 3D animations X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=15611f8c02c7df5d9d2467cc3128f091daca7a02;p=qbasicapps.git Document some 3D animations --- diff --git a/3D GFX/3D Synthezier/doc/index.html b/3D GFX/3D Synthezier/doc/index.html deleted file mode 100644 index 738ba22..0000000 --- a/3D GFX/3D Synthezier/doc/index.html +++ /dev/null @@ -1,1573 +0,0 @@ - - - - - - - -3D Synthezier - - - - - - - - - - - - - - - - - - -
-

3D Synthezier

- - - - -
-

1. Operating principle

-
-

-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. -

- -

-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. -

-
- -
-

1.1. Rectangular city

-
- -
-

rectangular city, 1.jpeg -

-
- - -
-

rectangular city, 2.jpeg -

-
- - -
-

rectangular city, 3.jpeg -

-
-
-
-
-

1.2. Hexagonal city

-
- -
-

hexagonal city, 1.jpeg -

-
- - -
-

hexagonal city, 2.jpeg -

-
- - -
-

hexagonal city, 3.jpeg -

-
-
-
-
-
-

2. Scene description language

-
-

-See also examples. -

-
-
-

2.1. here

-
-
-here
-
- -

-defines new segment -

-
-
-
-

2.2. p

-
-
-p  x y z
-
- -

-defines new point -

-
-
-
-

2.3. f

-
-
-f  p1 p2 p3 p4
-
- -

-defines new polygon, p4 may be unused -

-
-
-
-

2.4. warn

-
-
-warn  <message>
-
- -

-displays warning message, and wait for key -

-
-
-
-

2.5. end

-
-
-end
-
- -

-terminates parser -

-
-
-
-

2.6. mtl

-
-
-mtl  material
-
- -

-selects material -

-
-
-
-

2.7. mtlrnd

-
-
-mtlrnd  material ...
-
- -

-selects random material from list -

-
-
-
-

2.8. obj

-
-
-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 -

-
-
-
-
-

2.9. rnd

-
-
-rnd  p^1^2^3 p^7^2^1
-
- -

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

-
-
-
-

2.10. #

-
-
-# whatever text
-
- -

-comment -

-
-
-
-

2.11. out

-
-
-out  file
-
- -

-specify output file name, must be first command -

-
-
-
-

2.12. set

-
-
-set  variable  contents
-
- -

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

-
-
-
-

2.13. variables usage

-
-
-anycommand %1 anything
-
- -

-inserts variable 1 contents info line -

-
-
-
-

2.14. cmp

-
-
-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. -

-
-
-
-

2.15. ?

-
-
-?flag anycommand
-
- -

-executes command if flag is true. -

- -

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

-
-
-
-

2.16. dum

-
-
-dum
-
- -

-dummy function, does notheing -

-
-
-
- -
-

3. Installation

-
-

-Edit bin/3dparse.bas file and update include path in there. -

-
- -
-

3.1. System requirements

-
- - - --- -- - - - - - - - - - - - - - - - - - -
softwaretested version
DOS6.22
QBasic4.5
-
-
- -
-

3.2. 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
-
-
-
-
- -
-

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. -

-
-
-
-
-

Created: 2025-04-23 ke 23:27

-

Validate

-
- -