6 Commits
Author SHA1 Message Date
alteredq b0cfbad8cc Updated CTM pipeline to use single concatenated file for multi-material models.
Added Python script for file concatenation with keeping track of file start offsets.

This single file way is a bit slower, but should be easier on server / workers (before every part spawned own worker, now all parts for a single model are handled by a single worker).
2011-12-09 12:33:02 +01:00
alteredq b59e818f39 Added handling of materials to CTMLoader. Added more complex CTM example.
CTM pipeline produces very small and efficient models, just it's quite involved.

Models with multiple materials need to be split into separate files. For this there "split_obj.py" helper script.

Also, as CTM format uses indexed shared vertices, with more complex UV unwrapping mesh may need to get preprocessed to create extra vertices for faces which have different UVs for the same vertices (MeshLab can do this).
2011-12-08 21:44:02 +01:00
alteredq 0d904dd3a8 Added vertex reordering to CTMLoader.
This is needed to avoid endless loop when generating offsets (when some triangles have vertices spread across offset boundaries).
2011-12-07 22:13:03 +01:00
alteredq 8ec6317ef8 Added BufferGeometry for direct rendering from typed arrays.
Work in progress. For the moment works just with CTMLoader. Still not sure where some pieces of code would go.

Upsides:
	- initialization time cut down significantly (1.8 seconds => 0.7 seconds for CTM example)
	- much smaller GL buffers thanks to fully used indexing (Walt has 6x less vertices)
	- consequently much smaller memory footprint all around, both for main and GPU memories,
	  which means less swapping and better vertex caching

Downsides:
	- can't have anymore sharp per-face effects like flat shading (at least if mesh is not constructed in a way where each face has own vertices)
	- can't have multiple materials per mesh
	- no more easy manipulation of anything (for the moment actually no runtime manipulation at all, typed arrays are just thrown away, dynamic geometries code path not yet implemented)
2011-12-07 01:47:39 +01:00
alteredq 4a82869c1e Added possibility of using workers for CTM decompression.
To be used with care, for the moment there is no mechanism to prevent shooting yourself in the foot with spawning too many workers.
2011-12-06 12:18:03 +01:00
alteredq 08e9c5b159 Added CTMLoader and example.
OpenCTM mesh format looks quite promising, smaller than UTF8 and more robust, just geometry creation time is slower (decompression is done in JavaScript as opposed to piggybacking on built-in http gzip).
2011-12-06 11:40:19 +01:00