Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Exporting Blender Models For ThreeJS

It's great to play around with ThreeJS, but it doesn't take long before on hits the hurdle of wanting to import and use custom 3D models, rather than ones we create programmatically. This tutorial will show you how one can export a 3D model from Blender into a format that we can then import into our ThreeJS application.

Steps

Open your blender project and click File > Export > gLTF 2.0.


Now you have a choice between exporting everything in one file in binary form (.glb), exporting as a set of files, or exporting as one (.gltf) JSON file with data embedded into the file to make it one file. I prefer to use this last option, but I have tested and used the first one too, which we can import in the exact same way.


Now review the export settings (1), before setting the safe filepath/name (2), and clicking export (3).


You have now exported your model from Blender into a format that we can now import into ThreeJS.

References

Last updated: 9th October 2022
First published: 9th October 2022

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch