61 Commits
Author SHA1 Message Date
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
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
alteredq d2cad69664 Started to remove workers from the asset pipeline.
Work-in-progress => do not merge yet.

OBJ converter, JSONLoader, BinaryLoader and some examples are done. Still need to do Blender exporter, SceneLoader and more examples.

Advantages:

- faster parse times
- bypass array initializer size limit in Firefox
- no more crashes in Chrome 15 (caused by too many concurrently active workers)

Disadvantages:

- more browser UI freezing
- multiple models tend to appear all at once with the last one (instead of popping up progressively)
2011-10-30 22:09:55 +01:00
Mr.doob 6b151b552e Merging with @alteredq's experimental branches. 2011-10-23 12:34:46 +02:00
Mr.doob 2c8967b124 Fixed CanvasRenderrer incorrectly SphericalReflectionMapping Face4 rendering.
Also replaced WaltHead.js (old format) with WaltHeadLo.js (new format)
2011-10-08 21:04:26 +02:00
alteredq a60595b3f7 Removed edges handling from asset pipeline (Blender exporter, OBJ converter, JSONLoader). 2011-10-02 16:13:44 +02:00
alteredq 00b01e88b3 Added cars demo.
New stuff:

- car rig
- dynamic cube maps
- drop shadows from geometries
- tilt-shift
- motion blur
- fxaa

Uses shrunk lens flare texture from ro.me.
2011-09-30 00:51:45 +02:00
Mr.doob 717e414801 Examples that used Torus_bin now use TorusGeometry. 2011-08-29 14:31:43 +02:00
alteredq cbb88c6f3b Added skinning example.
Slightly modified ro.me buffalo test - using alpha test instead of alpha transparency to get rid of artefacts, also increased number of buffaloes to 375.
2011-08-14 23:19:43 +02:00
alteredq 023024f520 Updated Blender scene exporter to output proper JSON. Changed OBJ converter to dump less digits for floats. 2011-05-07 21:31:16 +02:00
alteredq 65293ea5e2 Updated terrain model used in mesh collider example. 2011-04-26 23:24:42 +02:00
alteredq 7ee6cc33eb OBJ converter: add option for scaling and truncating vertex coordinates (flag "-x scale").
To be used like this:

python convert_obj_three.py -i lucy100k.obj -o Lucy100k_slim.js -a center -s flat -x 100

It should work also for morph vertices.
2011-04-21 14:36:53 +02:00
alteredq 5fa19e8460 Fixed delays when loading multiple models.
Problem was having too many concurrent workers opened at once. Garbage collection apparently works very slowly on workers. Solution was to close them manually, after model data is sent to main thread.

Also some progress with Blender scene exporter. Some scenes now export correctly, though monkey test scene got worse, even with less hacky code.
2011-04-07 02:59:49 +02:00
alteredq 65e3f92d55 Merged latest master branch into physics branch. 2011-04-05 12:04:24 +02:00
alteredq f7e3a80d70 Added edges computation to OBJ converter.
If you want to get edges, run converter like with "-e" flag:

python convert_obj_three.py -i model.obj -o model.js -e

Output seems to match Blender exporter.
2011-04-05 03:37:13 +02:00
Bartek Drozdz 9850695f38 Collisions system initial commit. 2011-04-04 18:13:54 +02:00
Mr.doob abb4a774cd Merging with alteredq. 2011-04-04 05:00:21 +01:00
alteredq 827dcdd908 Added handling of UVs to Blender importer. 2011-03-28 04:17:38 +02:00
alteredq b31b8eebcd Changed exporters, converters and example models to use more proper JSON.
Single quote property names and hex numbers are not valid in JSON.
2011-03-26 06:05:46 +01:00
alteredq 1859fe4057 Updated Blender exporter to be able to export scenes.
Work-in-progress.

So close yet so far. Test scene almost works, just two things are not rotated properly (which means maybe everything will need to be reworked :(
2011-03-25 04:39:04 +01:00
Mr.doob 60ac9f8c2c Suzanne is the new Cube. 2011-03-23 06:36:10 +00:00
alteredq d9a930caa4 Added second cube for Blender vertex color example (courtesy of mrdoob). 2011-03-22 04:29:08 +01:00
alteredq 9db71a171a Fixed tangents and UVs in Blender exporter.
Also updated docstring for OBJ converter.

All WebGL examples should now work.
2011-03-22 00:32:45 +01:00
alteredq 044a27b530 Merge remote branch 'remotes/upstream/experimental' into experimental 2011-03-21 05:38:53 +01:00
alteredq 071de366c2 Updated Blender exporter to export new JSON format.
Also some fixes along the way to properly handle vertex colors in loaders.

Many things still broken, but we move forward.
2011-03-21 05:36:12 +01:00
Mr.doob f35e8092c6 More uvs fixes.
About to try to bring Face4 back.
2011-03-21 02:59:02 +00:00
alteredq 2989defcc8 First version that is at least partially working with the new model format ;).
Tons of things still broken.
2011-03-21 00:58:12 +01:00
alteredq a230b659ab More fixes.
Getting closer though still having some junk data poping out here and there.
2011-03-20 22:25:41 +01:00
alteredq bdc19a15c2 Updated OBJ converter to create new JSON model format.
Not tested yet, as the rest of the engine doesn't work yet.
2011-03-20 20:14:23 +01:00
alteredq ff832976b2 Removed underscores from texture filenames to please GitHub. 2011-03-15 17:59:32 +01:00
Mr.doob 88c2d7c77b Moved Object::sortObjectByMaterials to WebGLRenderer (so it's done automagically).
WebGLRenderer: renamed geometryChunks to geometryGroups :P
2011-03-02 15:51:09 +00:00
alteredq ccdff87382 Changed also JSON model files and exporters/converters to use CamelCase property names.
Only Blender 2.56 exporter and OBJ converter were tested. If somebody is using other ones, please reexport some files to be sure they work.
2011-03-02 05:55:29 +01:00
alteredq a9af9481e5 Added vertex colors to ASCII model loader and to Blender exporter (plus corresponding example).
Also fixed quads vertex color bug in WebGLRenderer and did small optimization of face state handling.
2011-02-14 20:21:42 +01:00
alteredq 6e91de5d8a Added diffuse map to normal map shader. Changed Lee Perry-Smith demo to use normal map shader.
Diffuse map and ambient occlusion maps are now optional in normal map shader.

By default, both are disabled, so they need to be enabled explicitly like this:

    uniforms[ "enableAO" ].value = true;
    uniforms[ "enableDiffuse" ].value = true;
2010-12-26 03:03:28 +01:00
Mr.doob 93fa1df174 Added Lee Perry-Smith Normal-notyet-Map demo. 2010-12-25 20:32:13 +00:00
Mr.doob cee1d4832f Merge remote branch 'alteredq/master' 2010-12-09 13:33:36 +00:00
alteredq ac5276b41f Added normal + ambient occlusion + displacement mapping demo.
A lot of things going on in this commit:

- added tangents computation for geometries
    - mesh must have UV coordinates
    - to be called explicitly once geometry is loaded like this: geometry.computeTangents()
    - tangents are stored in Vertex objects
    - quads are not solved properly (though workaround hack seems to work at least somehow, as far as each vertex appears at least somewhere)

- extended VBOs in WebGLRenderer to include tangent streams (when available)

- added "normal" shader to ShaderUtils (to be used with MeshShaderMaterial)
   - Blinn-Phong with one directional and one point light (7 varyings gone, just one spare)
   - normal maps are in tangent space
   - displacement maps use simple luminance value (could be changed if better precision is needed)

- displacement mapping uses vertex texture fetch
    - this requires GPU with Shader Model 3.0
    - not currently supported in ANGLE
    - for this, added "supportsVertexTextures" method to WebGLRenderer API, so that application can handle this
2010-12-09 12:27:49 +01:00
Mr.doob 10e21dde88 Geometry::computeNormalsGeometry::computeFaceNormals 2010-12-08 15:59:10 +00:00
Mr.doob f0cb056812 Cleaning up unused files. 2010-12-06 06:40:55 +00:00
Mr.doob 584a8440fd Merging with alteredq's branch. 2010-12-02 17:24:56 +00:00
Mr.doob e72b82cda2 Merging with orgicus' branch. 2010-11-30 17:30:45 +00:00
Mr.doob a2acf0b390 CanvasRenderer/SVGRenderer: RenderableFace4 is now gone. Unfortunately it created more problems than it solved.
CanvasRenderer now with ShadingSmooth, or something along the lines...
2010-11-27 11:30:01 +00:00
alteredq a20d9102ce Few small tweaks to cars demo.
Changed materials a bit to look better with lighter environment map.

Added space to buttons HTML so that Firefox don't draw them sticked together.

Also re-added htaccess for BIN files.
2010-11-25 02:10:54 +01:00
Mr.doob 8e8dfe2d01 Tweaked cars demo a bit. 2010-11-24 23:55:34 +00:00
alteredq 696c70152d Added cars demo.
Not sure about adding car models, they are quite big (even binary ones). To be removed if it makes troubles with git / GitHub.
2010-11-24 23:06:23 +01:00
alteredq bc11316ae9 Back at master branch.
Hooray. So long materials branch, you served us well ;)
2010-11-17 20:31:39 +01:00
Mr.doob 5feee3839f Trying to merge... 2010-11-15 01:56:10 +00:00
alteredq a0fa2ae3dd Optimized binary model format to use indexed UVs. Updated OBJ slim converter and Loader accordingly.
This saves about 10% from size of textured binary models.
2010-11-08 23:20:25 +01:00
alteredq 188f36be5d Optimized ASCII model format to use indexed UVs. Updated OBJ slim converter and Loader accordingly.
This saves ~22% from size of textured ASCII models.

TODO: make the same for binary model format.
2010-11-08 18:10:43 +01:00