Summary
In this chapter, we explored how you can work together with Blender and Three.js. We showed how you can use the glTF format as the standard format to exchange data between Three.js and Blender. This works great for meshes, animations, and most textures. However, for advanced texture properties, you will probably need some fine-tuning in either Three.js or Blender. We also showed how you can bake specific textures such as lightmaps and ambient occlusion maps in Blender and use them in Three.js. This allows you to render this information once in Blender, import it into Three.js, and create great shadows, lights, and ambient occlusion without the heavy calculations that Three.js would have to do normally. Note that this, of course, will only work for scenes where the lighting is static, and the geometries and meshes don’t move around or change shape. Often, you can use this for the static parts of your scene. Finally, we looked a bit at how UV mapping works, where vertices...