Skip to content

Loaders #5524

@mrdoob

Description

@mrdoob
Owner

List of loaders that would be nice to have:

3D

Bitmap

  • DDSLoader
    HDRLoader
    TGALoader
    TIFFLoader

Vector

Activity

kaosat-dev

kaosat-dev commented on Oct 28, 2014

@kaosat-dev

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.

Herst

Herst commented on Oct 29, 2014

@Herst
Contributor

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.

antont

antont commented on Oct 29, 2014

@antont
Contributor

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 notifications@github.com 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.

mrdoob

mrdoob commented on Oct 29, 2014

@mrdoob
OwnerAuthor

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

jpsmith1981

jpsmith1981 commented on Nov 4, 2014

@jpsmith1981

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

nyaaao

nyaaao commented on May 1, 2015

@nyaaao

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

mrdoob

mrdoob commented on May 1, 2015

@mrdoob
OwnerAuthor

@nyaaao added. thanks!

DzzD

DzzD commented on May 1, 2015

@DzzD

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

mrdoob

mrdoob commented on May 2, 2015

@mrdoob
OwnerAuthor

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?

DzzD

DzzD commented on May 2, 2015

@DzzD

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

DzzD commented on May 2, 2015

@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 :)

jpsmith1981

jpsmith1981 commented on May 3, 2015

@jpsmith1981

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.

63 remaining items

mrdoob

mrdoob commented on Aug 1, 2020

@mrdoob
OwnerAuthor

Nope

fraguada

fraguada commented on Aug 5, 2020

@fraguada
Contributor

Regarding a 3dm loader: I've started work on this now that the openNURBS library has been compiled to wasm thanks to emscripten (rhino3dm).

I'm working on this here and have mesh, breps, extrusions, pointclouds, materials, layers, and groups support started and working.

image

Relevant files:

I hope to submit a PR that has support for more object types sometime soon. I must admit that I've little experience with web workers, and am leaning on the draco and basis loader examples. Hopefully #18234 simplifies this a bit.

p.s. we are already adding threejs support directly to the rhino3dm.js library like here and here.

Edit: update links to point to McNeel org fork.

fraguada

fraguada commented on Oct 30, 2020

@fraguada
Contributor

We can check this one off ;)
image

mrdoob

mrdoob commented on Mar 30, 2021

@mrdoob
OwnerAuthor

IFCLoader just landed! ๐Ÿพ #20598

Faq

Faq commented on Aug 15, 2021

@Faq

Any update about M2Loader? Anyone working with that?

mrdoob

mrdoob commented on Aug 16, 2021

@mrdoob
OwnerAuthor

@Faq Not that I know of...

Mugen87

Mugen87 commented on Aug 12, 2022

@Mugen87
Collaborator

FYI: TIFFLoader has been added via #24420 ๐ŸŽ‰ .

Mugen87

Mugen87 commented on Aug 20, 2022

@Mugen87
Collaborator

Any update about M2Loader? Anyone working with that?

I've recently implemented a basic loader for M2 assets for a small personal project. If you want to play around with the code, you can access it via: https://gist.github.com/Mugen87/c96757cec0f7ec02214d6fdea880dec9

Use M2Loader like so:

const loader = new M2Loader();
loader.load( 'models/m2/cat/druidcat2.m2', function ( mesh ) {

    scene.add( mesh );

} );

And you get:
image

We can potentially add the loader's code to the repo. However, adding an example is problematic since all M2 assets I have found so far are directly from WoW and not available under an appropriate license.

Independently, I would love to add more features to the loader over time. Especially animations and multi-textured assets as well as supporting more asset versions.

Mugen87

Mugen87 commented on Aug 21, 2022

@Mugen87
Collaborator

I've played World of Warcraft in the past (nightelf druid, feral build) and loved the entire art design so much. Now seeing game assets rendered so nicely with three.js makes me a bit emotional ๐Ÿ˜Š.

Mugen87

Mugen87 commented on Aug 23, 2022

@Mugen87
Collaborator

Multi-textured assets work now (example 7ne_druid_worktable02.m2):

desk

Now comes the most complex part: Skeletal animation.

Mugen87

Mugen87 commented on Sep 1, 2022

@Mugen87
Collaborator

I've created a new repository three-m2loader for maintaining/developing M2Loader.

https://github.com/Mugen87/three-m2loader

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mrdoob@antont@onthez@Faq@dlabz

        Issue actions