983 Commits
Author SHA1 Message Date
alteredq 01e5aed5ad Added simple skin shader.
Also modified a bit old skin shader - for some reason there was square root just after color * color.
2011-12-20 22:47:54 +01:00
alteredq 3f58f03c79 Added color correction shader to ShaderExtras 2011-12-20 20:46:20 +01:00
alteredq 6ea8d3e83c Extended Texture class with "format" and "type" parameters.
As per @toji's "don't lie to WebGL about your format" recommendations in WebGL Camp 4 talk (http://media.tojicode.com/webglCamp4/#19).
2011-12-10 20:23:33 +01:00
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 eab35933dc Added forgotten example HTML file. 2011-12-08 22:47:08 +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
alteredq 019a0f59ef Some more GLSL precision cleanup. 2011-12-02 14:16:38 +01:00
alteredq 34716798d0 Added AudioObject (3d spatialized sound using Web Audio API).
Also added nicer flare texture.
2011-12-01 12:11:03 +01:00
alteredq 36338eeeef Tweaked and renamed geometry extrude examples. 2011-11-30 12:12:39 +01:00
Dean Jackson 5965061ca1 Extruded geometry was treating materials as objects rather than indices and
UV mapping of extruded geometry was miscalculated.

- ExtrudeGeometry was documented to take a Three.Material for the
  "material" and "extrudeMaterial" parameters, but the examples and
  usage in TextGeometry showed that these were in fact indices into
  the materials array. This meant that the tests such as "if (material)"
  would evaluate to false if the index passed in was 0 (a very typical
  index to choose :). Simply have the tests check against undefined and
  update the documentation.

- Also, the code that converted a shape into a set of triangles was
  miscalculating the UV offsets. It was correctly dividing the UV by
  the bounding box of the old shape, but was forgetting to offset the
  value from the minimum (which potentially led to negative UVs).
2011-11-30 08:40:27 +11:00
Mr.doob d9f055c989 Eek! That wasn't supposed to go in. 2011-11-29 03:32:15 +01:00
Mr.doob 5697084e64 Moved RequestAnimationFrame.js code right into src/Three.js. 2011-11-29 03:29:13 +01:00
alteredq befc98a01e Refactored bounding box to use 2x Vector3 instead of custom object. 2011-11-25 03:01:00 +01:00
Mr.doob c5613ebb53 Implemented again @ekitson's improvement to GeometyUrils.center. Increased light intensity in loader_json_blender example. 2011-11-25 00:31:12 +01:00
Mr.doob 5bcf179d3e Merging with @alteredq's branch. 2011-11-25 00:18:21 +01:00
alteredq 457be13975 Added example of animated textured character exported from Blender. 2011-11-23 23:25:29 +01:00
alteredq 655b1efbde Merge remote-tracking branch 'remotes/mrdoob/dev' into dev
Animation / skinning / path controller are now broken :/
2011-11-20 22:16:54 +01:00
alteredq e207f5e852 Changed lights to use global positions.
This should allow attaching of lights to objects. As a side effect, directional lights positions don't need to be normalized explicitly anymore.

Also changed viewport dimensions passed to render plugins to work with render targets with different dimensions than the screen framebuffer.

And fixed new dependencies in build script.
2011-11-20 20:18:16 +01:00
Mr.doob e16e443394 Better use of generated texture. 2011-11-20 19:19:14 +01:00
Mr.doob 48b3a72538 Simplified geometries example. 2011-11-20 16:28:03 +01:00
Erik Kitson 01ac1e3d17 Added proper up-axis conversion for COLLADA models. Added support for key-framed animation. 2011-11-18 16:47:39 -08:00
alteredq 0c78ae95e9 Rest of the commit.
Because TortoiseGit suddenly refuses to make single commit with added and changed files :/
2011-11-18 23:56:45 +01:00
alteredq 4be5880b0f Made SpritePlugin and LensFlare plugins default.
Also some refactoring in plugins.

Still not really satisfied with a solution, will need to handle somehow ordering of plugins (both among them and with respect to rest of rendering, this would be needed for example to be able to redo shadow maps as a plugin).
2011-11-18 17:19:10 +01:00
alteredq 1dcf5fc79b Moved sprite handling into plugin.
Work in progress. Still just experimenting. Probably will make some auto-adding of plugins.
2011-11-18 05:08:40 +01:00
alteredq 0eaeaad4f4 Added lens flares example. 2011-11-18 04:24:12 +01:00
alteredq ebf93289f8 Resurrected lens flares as custom plugin.
Still a bit dirty but less than it was before. Maybe also sprites could be pluginized.
2011-11-18 01:26:20 +01:00
Mr.doob 6ad7cbb47b Removed Collisions code.
No time right now to re-create the examples using Ray. Will do for r47...
2011-11-13 21:39:49 +01:00
Mr.doob 525527e03d Merge remote-tracking branch 'alteredq/dev' into dev 2011-11-13 21:25:42 +01:00
Mr.doob a0bc0e0661 Removed unneeded code in canvas_materials_depth example. 2011-11-13 21:24:56 +01:00
alteredq dd7e1e84ee Removed redundant GL call in render target setup.
Also fixed RTT example - seems UV mapping for SphereGeometry is now rotated 180 degrees.
2011-11-13 20:10:31 +01:00
alteredq 1d5baf11aa Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-11-11 12:48:58 +01:00
alteredq 0ce26e4c52 Moved normal map shader into ShaderExtras.js 2011-11-11 12:39:12 +01:00
Mr.doob f3e18523f1 Fixed canvas_geometry_terrain on Firefox (thx @sylarpowa!) 2011-11-11 03:20:22 +01:00
alteredq 89dc5b1b53 Added luminosity shader.
Dynamic terrain example now creates a specular texture from the color texture. That saves 2.17 MB download.

Just I had to drop materials pre-initialization, for some reason this doesn't play nice with having extra scene / render target :S.

In theory also detail normal texture could be computed from the color texture, just we need some nicer normal map filter (Gimp plugin has 9 different ones).
2011-11-09 23:53:32 +01:00
alteredq 5253c6490e Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-11-08 21:12:26 +01:00
alteredq 852738580e Added dynamic terrain example. 2011-11-08 20:54:57 +01:00
Mr.doob 1d82924efa Made SphereGeometry a bit more sturdy. 2011-11-07 02:47:19 +01:00
Mr.doob 81346eab80 Better UV texture 2011-11-05 14:59:17 +01:00
alteredq bad3639c26 Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-11-03 20:40:30 +01:00
alteredq e08434c183 Reworked binary format / BinaryLoader / OBJ converter to use binary ajax fetch.
It was quite a pain - ArrayBuffers / Typed Arrays are fussy about byte alignment - but seems to be worth it.

Parsing times are down (modest gains for small objects / Firefox, bigger gains for large objects / Chrome, performance gains from 10% - 200%).

Also as a positive side effect, changing interleaved face arrays into uniform arrays seems to have helped a bit with gzip compression (about 6% smaller size for gzipped 526K Lucy).
2011-11-03 20:30:10 +01:00
Mr.doob 036caa64ee CanvasRenderer now (properly) handles textured triangles with determinant to 0
Proper IcosahedronGeometry next...
2011-11-03 17:33:30 +01:00
Mr.doob 5d49ec9fae Workaround for CanvasRenderer 0x0 pixel case
It makes the whole thing imprecise, but cubes are now properly reflective.
2011-11-03 11:32:58 +01:00
Mr.doob 349e565de3 Fixed some examples. 2011-10-31 17:40:13 +01:00
Mr.doob aea1ef59a3 Merge remote-tracking branch 'alteredq/dev' into dev 2011-10-31 17:17:32 +01:00
alteredq 1658d7f083 Removed workers from Blender exporter.
Fixed Blender importer to work with Blender 2.60, add option for importing workers or non-worker models.

Fixed more examples to use worker-less format. All examples should work now.

Only Max exporter should be left to change.
2011-10-31 16:51:50 +01:00
alteredq 81a8eec8ee Removed workers from SceneLoader.
Also manually fixed buffalo model and test scene to be valid JSONs.
2011-10-31 14:12:44 +01:00