ovelix123
ovelix123

Reputation: 205

Which 3D object format is better with three.js

If someone is working on a webgl-three.js context using many 3D objects (with textures,slight movement and mouse listeners) which format is more suitable to use to import them; JSON or OBJMTL ?

I can make both work,I just want to know which is best before starting writting much code and then realize I should have done it that way.

NOTE: .obj and .mtl files seem to have much less information about the vertices etc than the .js files. is that a bad sign as far as the quality of rendering is concerned?

Upvotes: 1

Views: 417

Answers (1)

user2118784
user2118784

Reputation: 452

JSON is preferable.

  • It is more concise and loading is faster
  • Browser can load it directly into JavaScript data structures
  • JSON format accommodates more than one material for a single mesh
  • Three.js has a binary equivalent to its text-based JSON format

Upvotes: 1

Related Questions