three.js icon indicating copy to clipboard operation
three.js copied to clipboard

Loaders

Open mrdoob opened this issue 11 years ago • 74 comments

List of loaders that would be nice to have:

3D

  • [x] 3DMLoader
    • https://www.rhino3d.com/opennurbs
  • [x] 3DSLoader
    • http://en.wikipedia.org/wiki/.3ds
    • http://dzzd.net/3DSChunkDefinitions.html
    • http://k3d.ivank.net/demos/parsing3DS.html
  • [x] 3MFLoader
  • [x] AMFLoader
    • http://en.wikipedia.org/wiki/Additive_Manufacturing_File_Format
  • [ ] BREPLoader
    • https://en.wikipedia.org/wiki/Boundary_representation
  • [x] BVHLoader
    • https://sites.google.com/a/cgspeed.com/cgspeed/motion-capture/cmu-bvh-conversion
  • [x] ColladaLoader
  • [ ] DXFLoader
    • http://en.wikipedia.org/wiki/AutoCAD_DXF
    • https://github.com/gdsestimating/dxf-parser
  • [x] FBXLoader
    • https://banexdevblog.wordpress.com/2014/06/23/a-quick-tutorial-about-the-fbx-ascii-format/
    • http://code.blender.org/2013/08/fbx-binary-file-format-specification/
    • https://github.com/hamish-milne/FbxWriter
    • http://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure
    • https://github.com/dobkeratops/openfbx
  • [x] GLTFLoader
  • [x] IFCLoader
  • [ ] IGESLoader
    • http://en.wikipedia.org/wiki/IGES
  • [x] KMZLoader
    • https://3dwarehouse.sketchup.com/model.html?id=907f1fa5805282f8630a81e41b3b6ffd
  • [x] LWOLoader
    • http://static.lightwave3d.com/sdk/2018/html/filefmts/lwo3.html
    • https://github.com/marcbizal/lwo-parser
  • [x] M2Loader
    • https://wowdev.wiki/M2
    • https://github.com/Dramacydal/M2Lib https://github.com/Koward/M2Lib
  • [x] MD2Loader
  • [x] MDDLoader
  • [x] MMDLoader
    • http://mikumikudance.wikia.com/wiki/MMD:Polygon_Model_Data
  • [x] MTLLoader (needs refactoring)
  • [x] NRRDLoader
    • http://lessons.goxtk.com/10/
  • [x] OBJLoader
  • [x] PDBLoader
  • [x] PCDLLoader
  • [x] PLYLoader
  • [x] PVRLoader
  • [ ] QuakeBSPLoader
    • https://github.com/mrdoob/three.js/issues/11604
  • [ ] STEPLoader
    • https://github.com/mrdoob/three.js/issues/7125#issuecomment-308232748
  • [x] STLLoader
  • [x] TILTLoader
    • https://github.com/benfoxall/tiltbrush/blob/master/lib/Sketch.js
    • https://github.com/googlevr/tilt-brush-toolkit
    • https://docs.google.com/document/d/11ZsHozYn9FnWG7y3s3WAyKIACfbfwb4PbaS8cZ_xjvo/preview
  • [x] URDFLoader
    • #13768
  • [x] USDLoader
    • #14219
    • https://graphics.pixar.com/usd/docs/Usdz-File-Format-Specification.html
    • https://fereria.github.io/reincarnation_tech/05_DCCTool/10_Houdini/11_SOLARIS/12_usd_preview_surface/
    • https://github.com/usd-wg/assets
    • https://github.com/erich666/McUsd
    • https://github.com/syoyo/tinyusdz
  • [ ] VDBLoader
    • https://www.openvdb.org/
  • [x] VRMLLoader
  • [x] VTKLoader
  • [ ] X3DLoader

Bitmap

  • [x] DDSLoader
  • [x] HDRLoader
  • [x] TGALoader
  • [x] TIFFLoader

Vector

  • [ ] IVGLoader
    • https://github.com/google/iconvg/blob/main/spec/iconvg-spec.md
  • [x] SVGLoader
  • [x] TTFLoader

mrdoob avatar Oct 27 '14 23:10 mrdoob

Very extensive list ! I also propose AMF (http://en.wikipedia.org/wiki/Additive_Manufacturing_File_Format) loader. (3d file format used for 3d printing). I already have the basics of the loader done, so I could modify it a bit and add to the examples.

kaosat-dev avatar Oct 28 '14 14:10 kaosat-dev

Most of these loaders are more important for special cases such as an editor, because for let's say games it might be better to convert into the three.js format straight away, right? In these cases the converters/exporters are more important.

Herst avatar Oct 28 '14 16:10 Herst

We've tested glTF as a replacement for three's formats as an optimization - there the data is binary and can be compressed with geom compression.

Herst [email protected] kirjoitti Oct 28, 2014 kello 5:38 PM:

Most of these loaders are more important for special cases such as an editor, because for let's say games it might be better to convert into the three.js format straight away, right? In these cases the converters/exporters are more important.

— Reply to this email directly or view it on GitHub.

antont avatar Oct 28 '14 16:10 antont

@kaosat-dev Added to the list! @Herst Yes. It's mostly for editors or apps that don't require fast load times.

mrdoob avatar Oct 28 '14 22:10 mrdoob

I am also looking for a IGES loader. I would even maybe start building one myself but not sure where to start.

jpsmith1981 avatar Nov 03 '14 21:11 jpsmith1981

how about adding 3DM (used by Rhinoceros) to the list?

nyaaao avatar May 01 '15 11:05 nyaaao

@nyaaao added. thanks!

mrdoob avatar May 01 '15 12:05 mrdoob

About 3DS Loader :

Hi everyone, long time ago, I needed to make a 3DS loader for 3DzzD Web 3D engine, that was a little hard to do... not difficult to obtain some first results but rather to handle all the chunks correctly, but after some times I managed to produce a pretty efficient loader. the 3DS file format spécifications are difficult to find, but I finished to find one that worked pretty well. I 've built the loader for 3DzzD with this documentation and it works even better than the one in the current photoshop (better handle on pivot/smooth groups/scale/ keyframe/etc...), so here is the spécifications I have used (3DzzD source code is opensource and may help but code is really ugly... a ten years old project...)

http://dzzd.net/3DSChunkDefinitions.html

About OBJ Loader :

I modified the current OBJ loader and get about at least 10/15 FPS more on a lot of 3d models, but for now I did not found how I should do to post these changes ?

The problème was mainly due to the fact that the current OBJ loader create too many objects (more than the original 3d model, one object created at each material change) and also the 3dFaces with same material was not groupped together even within the same object, and was producing too many WebGL calls

DzzD avatar May 01 '15 13:05 DzzD

http://dzzd.net/3DSChunkDefinitions.html

Thanks! Added to the first post.

The problème was mainly due to the fact that the current OBJ loader create too many objects (more than the original 3d model, one object created at each material change) and also the 3dFaces with same material was not groupped together even within the same object, and was producing too many WebGL calls

Oh! Interesting. You mean the OBJMTLLoader one though. Right?

mrdoob avatar May 01 '15 19:05 mrdoob

Oh! Interesting. You mean the OBJMTLLoader one though. Right?

Yes,, to be more precise the "if ( /^usemtl /.test( line ) ) " block create a new object/mesh for each material switch, this ends with poor performance and a wrong objects hierarchy.

I will post a simple test case showing the difference between both the current loader and the one modified (difference is mainly noticeable on mobile device)

DzzD avatar May 02 '15 05:05 DzzD

Here is the test case for the current loader and the one optimised :

http://demo.dzzd.fr/threejs/OBJMTLLoaderTest/

EDIT: I got 10 FPS on GalaxyTab3 with the current loader and more than 60 FPS with the new one, difference may be hard to see on fast devices

PS: If you wonder where the 3D model comme from :)

DzzD avatar May 02 '15 07:05 DzzD

Does anyone know about IGES. I could really use an IGES loader. If someone could just point me in a direction to start on how to build one? Or if there is one out there somewhere. I noticed the folks at http://www.3dfile.io/ and some of the other 3D visualization sites are using ThreeJS and allowing for IGES uploads.

jpsmith1981 avatar May 02 '15 21:05 jpsmith1981

K3D.js (MIT license) has a parser for OBJ, 3DS, MD2 and Collada. http://k3d.ivank.net. See #3843.

dubejf avatar Jul 01 '15 04:07 dubejf

how about NIfTI for doctor?

jugl avatar May 11 '16 02:05 jugl

@jugl Do you have any information about the format?

mrdoob avatar May 11 '16 15:05 mrdoob

I really hope for the .m2 models, its a huge community arround. I would offer my help with model files etc. you can contact me for that case on skype: deexone . As hint from one lib developer http://bridge.net/ could be maybe used to transform his lib to js.

team4music avatar May 16 '16 16:05 team4music

Hey I have a BVH loader that parses through a BVH file and outputs a THREE.Skeleton and AnimationClip for easy use with the Mixer: https://github.com/herzig/BVHImporter and the working example: http://herzig.github.io/BVHImporter/ It's mainly tested on the CMU BVH files and some others.

Are there any guidelines on how the loader API should look like?

herzig avatar Jun 20 '16 13:06 herzig

@herzig Sweet! A BVHLoader would be awesome! Loaders basically have a .load() and .parse(). You can use MD2Loader as reference, but I would be happy to clean up your code if you do a PR with what you have now (an example + sample animation would be much appreciated too).

mrdoob avatar Jun 20 '16 20:06 mrdoob

Hi there, just to sync this list with files loader in the repo...

3MFLoader is missing in the list but already implemented. BinaryLoader is missing in the list but already implemented. DDSLoader is missing in the list but already implemented. FBXLoader is unchecked but already implemented. HDRCubeTextureLoader is missing in the list but already implemented. MD2Loader is unchecked but already implemented. NRRDLoader is unchecked but already implemented. PCDLLoader is missing in the list but already implemented. PlayCanvasLoader is missing in the list but already implemented. RGBLLoader is missing in the list but already implemented. SVGLoader is unchecked but already implemented. TGALoader is missing in the list but already implemented. TTFLoader is missing in the list but already implemented.

next:

ASCLoader should be added to the list, and PR will be send in few days. LASLoader should be added to the list, and PR will be send in few days. XYZLoader should be added to the list, and PR will be send in few days.

Best regards, Tristan

Itee avatar Nov 10 '16 23:11 Itee

just to sync this list with files loader in the repo...

Updated!

mrdoob avatar Nov 13 '16 05:11 mrdoob

OpenCTM might be a good addition, since Autodesk is using it for their cloud service https://en.m.wikipedia.org/wiki/OpenCTM

On Sun, Nov 13, 2016 at 6:33 AM Mr.doob [email protected] wrote:

just to sync this list with files loader in the repo...

Updated!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mrdoob/three.js/issues/5524#issuecomment-260168120, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkmxkkOn179ZJvqc8yScOoxnaDGzuH6ks5q9qE6gaJpZM4CzpFw .

dlabz avatar Nov 14 '16 18:11 dlabz

@dlabz We do have a CTMLoader already.

mrdoob avatar Nov 14 '16 20:11 mrdoob

I'm working with some iOS devs in the AR space, might there be a loader for the binary SCN files used by Apple in ARKit? I'm working on making use of the BinaryLoader and we'll see if I can get that working.

jjPlusPlus avatar Nov 14 '17 00:11 jjPlusPlus

Is there a spec somewhere for that SCN format?

mrdoob avatar Nov 15 '17 00:11 mrdoob

@mrdoob Sorry I'm so late. NIfTI is a NMR data format which transferred from DICOM. My current solution is get a 3D shape from it as VTK/OBJ format.

jugl avatar Nov 21 '17 15:11 jugl

I see. Is there a spec somewhere?

mrdoob avatar Nov 22 '17 03:11 mrdoob

How about IFC loader. This format is using very common in construction for its 3d model

YouYue123 avatar Feb 06 '18 23:02 YouYue123

@YouYue123 https://github.com/mrdoob/three.js/issues/9764

mrdoob avatar Feb 07 '18 00:02 mrdoob

@mrdoob Thank you very much.

YouYue123 avatar Feb 07 '18 00:02 YouYue123

@mrdoob what are the guidelines + knowledge prerequisites to build a three.js loader ? I want to build one, but it want to be sure to make it the right way. Thanks

Aarbel avatar May 13 '18 16:05 Aarbel