2431 Commits
Author SHA1 Message Date
Mr.doob baa72f5f7a Merge remote-tracking branch 'jzaefferer/blender-readme' into dev 2011-12-25 08:55:49 +01:00
Mr.doob a31f83f754 Merge remote-tracking branch 'alteredq/dev' into dev 2011-12-22 15:35:52 +01:00
alteredq ef5f67d1a6 Merged @greggman's cube texture autoscaling patch.
Made it toggleable with "renderer.autoScaleCubemaps" flag (on by default).
2011-12-21 18:31:17 +01:00
alteredq ab0ce36091 Unrolled shadow filtering loops to work on ATI OpenGL.
ATI OpenGL shader compiler doesn't seem to like texture access with UV coordinates generated in a loop.
2011-12-21 03:39:07 +01:00
alteredq 3dea25939c Refactored shadow test to work on some ATI cards with OpenGL.
Using boolean vector instead of "if ( expression && expression )".

This helps for hard shadows code path. There are still some problems with soft shadows code path, which still don't want to compile.
2011-12-21 01:37:54 +01:00
alteredq ccf6d803cd Fixed shadow darkness for non-soft shadow code path. 2011-12-21 01:11:10 +01:00
alteredq 47523c5fcc Added flag to SpotLight for only casting shadows.
This exists also in Blender, useful for when you want to add shadows independent of lighting (it's cheaper to turn off SpotLight than to have it with 0 intensity).
2011-12-20 22:57:57 +01:00
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 5dc4bcc1d2 Added handling of BufferGeometry in ShadowMapPlugin. 2011-12-20 19:52:29 +01:00
Jörn Zaefferer 92bb079145 Add readme for blender plugin 2011-12-18 14:21:42 +01:00
Mr.doob 31477b24df Merge remote-tracking branch 'alteredq/direct_buffers' into dev 2011-12-17 01:48:21 -08:00
Mr.doob 6194a306e0 Merge remote-tracking branch 'zz85/master' into dev 2011-12-17 01:48:15 -08:00
Greggman 3015d93960 Make three.js autoscale texture to max size of WebGL hardware 2011-12-16 17:04:11 -08:00
alteredq 60ee1e8ccb Added wrap-around lighting to Phong and Lambert materials (aka half-lambert from Half-Life 2).
With a little twist - per color component mixing of regular and wrap-around lightings.
2011-12-16 02:13:22 +01:00
alteredq 272a83ff53 Fixed ColladaLoader crashing on "constant" materials. 2011-12-12 22:33:48 +01:00
zz85 2399ccc9d2 Really freeze FPSControls 2011-12-13 00:55:19 +08: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 f811090f3b Added CTM converter.
Command line Windows executable from OpenCTM install.
2011-12-08 22:14:41 +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 757c4e62f6 Fixed bug in UTF8Loader. 2011-12-05 20:29:22 +01:00
alteredq 0dfb751e6d Added missing "formatVersion" in max exporter (thanks to @rogercodina). 2011-12-05 12:54:37 +01:00
alteredq 4ac72ffc75 Added material name tracking in Loader. 2011-12-02 19:59:37 +01:00
alteredq 019a0f59ef Some more GLSL precision cleanup. 2011-12-02 14:16:38 +01:00
Mr.doob 37f2ad3b19 Changed default precission to mediump.
As per Giles recommendation here http://learningwebgl.com/blog/?p=4379
2011-12-02 06:00:00 +09: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 3163b79782 Added name copying to GeometryUtils.cloneObject (thanks to @C4RL05) 2011-11-30 15:24:26 +01:00
alteredq 36338eeeef Tweaked and renamed geometry extrude examples. 2011-11-30 12:12:39 +01:00
alteredq 999964a3d4 Merge remote-tracking branch 'remotes/grorg/extruded-object-materials' into dev 2011-11-30 11:19:15 +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
alteredq 370d20b407 Refactored normal map shader.
Doing normalization of normals / binormals / tangents in fragment shader instead of vertex shader. This seems to help with artefacts appearing in certain models with OpenGL rendering backend.

Also added modulating environment reflection by specular map.
2011-11-29 12:20:54 +01: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
alteredq b1ef3409a6 Sorting out accidental double-merge. 2011-11-25 00:42:28 +01:00
alteredq 3aa1767844 Merge remote-tracking branch 'remotes/mrdoob/dev' into dev 2011-11-25 00:33:32 +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 955705f73e Merge remote-tracking branch 'alteredq/dev' into dev 2011-11-25 00:18:32 +01:00
Mr.doob 5bcf179d3e Merging with @alteredq's branch. 2011-11-25 00:18:21 +01:00
Mr.doob a640e74c70 Merge remote-tracking branch 'AddictArts/dev_collada' into dev 2011-11-25 00:15:06 +01:00
alteredq 1d5a72ddc9 Resurrected UVs normalization (as GeometryUtils.normalizeUVs).
Turns out it may be useful after all, seems some GPUs may have troubles dealing with texture coordinates outside of <0,1> (need to be tested if normalization helps there).
2011-11-24 22:36:30 +01:00
Erik Kitson 298afecf80 Added progress callback to ColladaLoader. 2011-11-24 10:22:39 -08:00
Erik Kitson fe8e1b881f Added option to ColladaLoader to recenter all Geometry so that they are centered around the local origin of their containing Mesh. 2011-11-24 10:21:12 -08:00
alteredq 86fac679c3 Renamed some examples.
As per discussion here:

https://github.com/alteredq/three.js/commit/457be13975345dcd53f5a07f38ac09b5bada5f0b
2011-11-24 18:05:46 +01:00