A 3D dog model rendered with three.js for reproducing the MagicaVoxel's soft shadows.
This project includes 3 rendering examples.
It loads .obj
and .mtl
files that are exported from MagicaVoxel, using OBJLoader2
and MTLLoader
.
It doesn't produce any shadows out of the box, so it looks so flat.
It renders soft shadows dynamically using a PCSS shader. It works well but its performance is not well, expecially on mobile devices. Besides, the shadows are a bit shaggy.
The shadows are baked with Cycle engine of Blender beforehand, so the rendering performance can be significantly improved. It achieves the beautiful soft shadows just like MagicaVoxel renderer! But as a result, the glTF file size got quite large due to the high quality textures.
© Takuya Matsuyama. MIT License.