263 Commits
Author SHA1 Message Date
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 abbfd7a493 Fixed handling of vertexColors parameter in Blender JSON importer. 2011-04-21 13:58:52 +02:00
alteredq 614925336d Added support for empty objects and meshes without geometries to Blender scene exporter and SceneLoader. 2011-04-21 13:28:04 +02:00
alteredq b6e3089425 Added embedded meshes to Blender scene exporter. 2011-04-20 15:59:48 +02:00
alteredq b9977ede37 Added triggers type to Blender exporter and scene loader. 2011-04-19 18:08:39 +02:00
sroucheray 39e993d50d Include Trident.js in the EXTRAS_FILES Build array 2011-04-17 22:41:32 +02:00
alteredq 3505923be5 Changed default in OBJ converter to no alignment. 2011-04-15 04:17:36 +02:00
alteredq 691a5ea3ed Added handling of shadow geometry to scene loader. Made default light and camera option to Blender scene exporter. Made shadow geometry invisible in exported scene. 2011-04-13 12:26:49 +02:00
Mikael Emtinger b0e904eb29 Merge branch 'master' of git://github.com/mrdoob/three.js 2011-04-12 14:49:59 +02:00
Mikael Emtinger 147961f4b5 Added Roll Camera and example 2011-04-12 14:49:45 +02:00
alteredq ac6e6e7fbd Blender exporter: added custom property for selecting material type.
For the moment it handles Basic, Lambert and Phong.

As with other custom properties, this should be persistent, saved into blend file.
2011-04-12 01:30:17 +02:00
alteredq c94104147e Blender exporter / scene loader: added handling of vertex colors for scene materials.
Made mesh colliders exported from Blender invisible in scene.

Added handling of meshes with multiple materials in scenes (for the moment just by using MeshFaceMaterial where real materials come from model JSON).
2011-04-12 00:10:06 +02:00
alteredq 7e22df47aa Synced with mrdoob's branch. 2011-04-11 21:15:02 +02:00
Mr.doob 1622b033f0 Merge remote branch 'sroucheray/Branch_r39' into experimental 2011-04-11 19:50:58 +01:00
sroucheray b58e495de2 Add --unminified optional parameter to the build.py, useful when developing without modifying the build script itself
Add an Ant build.xml file : another way to launch different pre-configured builds
2011-04-11 15:15:13 +02:00
Mr.doob bc520665d3 Cleaned up Blender exporter (visually, code-wise and whitespaces-wise) 2011-04-11 13:03:19 +01:00
alteredq bdbf1f78c5 Synced with mrdoob's branch. 2011-04-10 23:47:43 +02:00
alteredq 22bd108ab1 Added FlyCamera (thanks to James Baicoianu). Added specular map to normal map shader. Added WebGL Earth FlyCamera demo.
Changed normal map shader to multiply specular component with diffuse weighting as specular highlights were appearing in the dark parts.

Changed camera look speed in minecraft and terrain demos, they were too fast - I guess as everything got faster with antialiasing off.

Reenabled antialiasing in few demos where it was too ugly without (basically anything with lines and without postprocessing).

Fixed again spurious invisible characters in empaempa's code (which are breaking everything and are hard to hunt as they look like spaces).
2011-04-10 23:13:05 +02:00
Mr.doob 25dddd2024 Uops... 2011-04-10 16:43:26 +01:00
Mr.doob eb411d1bef Blender exporter now has options to export (or not) vertices and faces too.
Also renamed some vars for consistency reasons, hope I didn't break anything...
2011-04-10 13:00:49 +01:00
Mr.doob 3bc9f48c2f src/animation ⟶ src/extras/animation
Improved lod and grass examples.
2011-04-10 09:36:28 +01:00
Mr.doob 76e7ea3461 Added namespace to all the objects that missed it (geometries, uniforms, etc)
WebGLRenderer antialias is off by default (considering Firefox doesn't support it...)
Formatting clean up here and there
2011-04-09 12:38:39 +01:00
Mr.doob c74f046b76 src/physics ⟶ src/extras/physics 2011-04-09 08:18:45 +01:00
alteredq 5fcc6190f2 Added remembering of Blender exporter settings between sessions. Also fixed Blender exporter crashing on scenes without world.
Settings are remembered in JSON file "threejs_settings_export.js" stored in Blender's temp folder. It should survive restart of Blender.
2011-04-08 19:18:25 +02:00
alteredq 58bbd02e9e Added handling of mesh colliders to scene loader. Changed Blender scene exporter to make mesh colliders invisible. 2011-04-08 06:13:12 +02:00
alteredq f7d97caf1d Merged with empaempa's branch. 2011-04-07 21:29:21 +02:00
Mikael Emtinger 615f872023 Added sprite support. See Sprite.js for details. No support for custom shader at this point. 2011-04-07 15:52:57 +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 693a36f509 Moved scene loader from SceneUtils into SceneLoader. 2011-04-05 08:59:45 +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
alteredq 7915999bdd Added edges to Blender exporter, JSONLoader and Geometry.
There is a new class Edge which stores vertices and faces for edge (I wasn't sure if indices or references would be better, so at least for the moment it contains both).

Geometry now contains a list of such edges, created in JSONLoader, based on edge data exported from Blender.

From Blender we get a list of vertex index pairs, from which in Geometry.computeEdgeFaces() we compute faces which share this particular edge and store them in the Edge object.

Not sure if edges work properly till we don't have something using them. For now I just checked cube data exported from Blender and it seems fine.

Also did some whitespace cleanup here and there.
2011-04-05 00:18:36 +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 477b0095a9 Added dumping of scale to Blender exporter / handling of scale to JSONLoader.
This is backwards compatible: for existing models that don't have scale nothing should change.
2011-04-03 08:48:08 +02:00
Mr.doob e6fd2d0516 Blender Exporter: Added option for truncating vertex values. Added scale parameter. 2011-04-03 05:17:48 +01:00
Mr.doob 09e976f299 Blender exporter: Scene export option False by default. 2011-04-03 04:04:36 +01:00
alteredq c2a401f2b8 Added option not to export materials to Blender exporter.
In such case faces will not get material index in JSON data and then no material reference in Face objects, so MeshFaceMaterial is not going to show anything and you have to add your own material for the whole mesh after loading.

Tested on few models and it seems to work, new JSON format allows to omit materials :)
2011-04-03 00:22:20 +02:00
alteredq 9abbb97d4c Fixed Blender exporter not checking if material texture actually has some image. 2011-04-02 09:31:50 +02:00
Mr.doob 8af4dd49c1 WebGLRenderer now uses material.transparent to determine whether a material is transparent or not.
Moved materials/RenderTarget.js ⟶ renderer/WebGLRenderTarget.js
2011-03-31 07:22:44 +01:00
Mikael Emtinger 7b07f34b7d merged with mrdoob. fixed so depthMask is correctly restored after stencil and lensflares. removed all enable/disable _gl.BLEND as it's always on. 2011-03-30 20:52:23 +02:00
Mikael Emtinger 3536f3f2f5 Merged with MrDoob 2011-03-29 20:50:45 +02:00
alteredq 220983f455 Updated Blender importer to show textures. 2011-03-29 18:10:34 +02:00
Mikael Emtinger ac6f422a6f Added LensFlares. Note that a new blending mode has been added. Added an (quite ugly example). NOTE: this doesn't seem to work on Chrome+Mac+NVIDIA unless you turn off antialias (which I've done in the example). 2011-03-29 13:30:53 +02:00
alteredq 10e86a45fe Added handling of materials and textures to Blender importer.
Also added custom property to materials to be able to select if vertex colors should be used for the material.
2011-03-29 05:51:49 +02:00
alteredq 827dcdd908 Added handling of UVs to Blender importer. 2011-03-28 04:17:38 +02:00
alteredq 32cd7c25c2 Added handling of vertex colors to Blender importer. 2011-03-28 02:49:28 +02:00
alteredq 012b9a7c04 Added handling of normals to Blender importer.
There is checkbox for choosing whether Blender should recalculate vertex normals or whether to use normals from the data.

Using vertex normals from the data can in some cases lead to artefacts. This is probably caused by sharing of vertices across several faces (I didn't find a way how to specify vertex normals per face use of vertex; there is just API for setting normals to vertices).

If you select "recalculate vertex normals" (default), this sets faces to use smooth shading, which upon subsequent mesh update computes correct vertex normals (but it will lose eventual smoothing groups baked in vertex normals).
2011-03-28 00:44:19 +02:00
alteredq 33e5a9bfe0 Added very basic Three.js Blender importer.
Very much work in progress, for the moment it creates just pure geometry (no normals, uvs, colors or materials).

Also fixed bug in JSONLoader in handling of face uvs.
2011-03-27 08:47:11 +02:00
alteredq f1a91c9fd5 Fixed bug in max exporter.
Vertex color parameter was undefined for dummy materials.
2011-03-26 20:49:52 +01:00