1
- Usage: ./objcompress in.obj [ out.utf8]
1
+ Usage: ./objnormalize in.obj out.obj
2
2
3
- If 'out' is specified, then attempt to write out a compressed,
4
- UTF-8 version to 'out.'
3
+ "Normalize" an obj file. This simply shifts all vertices so that
4
+ the middle of the object is at (0,0,0). This is required for some
5
+ viewing environments such as the open-3d-viewer and the included
6
+ sample viewer.
7
+
8
+ Usage: ./objcompress [-w] in.obj out.utf8 >out.js
5
9
6
- If not, write a JSON version to STDOUT.
10
+ Converts and compresses the OBJ file to the UTF8 format. The
11
+ necessary JavaScript file is output onto STDOUT. If -w is included
12
+ then all missing materials will be replaced with a bsaic solid
13
+ white material. If not provided, any missing materials will cause
14
+ the process to fail. The actual output file names are prepended
15
+ with a hash of the file data. This is because a single OBJ file
16
+ can include multiple models while an UTF8 file cannot.
7
17
8
- Usage: ./objanalyze in.obj [list of cache sizes]
9
-
10
- Perform vertex cache analysis on in.obj using specified sizes.
11
- For example: ./objanalyze in.obj 6 16 24 32
12
- Maximum cache size is 32.
18
+ objanalyze is non-functioning, other tools can be used for this purpose.
13
19
14
20
Building:
15
21
16
22
Since there are no external dependences outside of the C/C++ standard
17
- libraries, you can pretty much build this however you please. I've
18
- included a cheeky way to do this on POSIX-like systems by including a
23
+ libraries, you can pretty much build this however you please. One compile
24
+ option is using -D MINI_JS. When defined the output JavaScript will be
25
+ minified.
26
+
27
+ I've included a cheeky way to do this on POSIX-like systems by including a
19
28
build shell script at the top of the file itself. You can build by
20
29
making the .cc file executable, and running it on the command line.
30
+
31
+ For Windows there is a build.bat script which will compile the code using
32
+ mingw-w64. Make sure to have both the i686 and x86_64 builds installed.
0 commit comments