A quick example workflow of using 2D art assets in Three.js.
Specifically, this workflow tests to see if Three.js and Blender can be used to animate armatures in 2D, as well as create a scene of 2D images with parallax.
Try in now in the browser! Use the arrow keys to move.
During the walking and landing animation, there is some strange scaling and moving that occurs. I’m not sure what’s causing this, but oh well.
The process starts with 2D art assets. I’ve filled the Step 1 folder with the reference material I used. The images can come in any source: drawn on a graphics tablet, photographs of real-world art.
Disclaimer/Acknowledgement: The reference art I used is absolutely wonderful, but it’s not mine. I used screenshots from the game Child of Light. I only intend the art to be used for the purpose of demonstration.
In this step, the art from before is sliced into its component parts and packed into textures. If the artists can create the art in multiple parts to begin with, this step will be made quite easy.
You’ll need to know that:
Software I used:
After the art has been sliced and packed into textures, it’s time to put it back together again, but animated and in 3D! I spent all my time in this step in Blender.
You’ll need to know how to:
With exported, game-ready 3D models, it’s time to write the code to see it in action.
Note: You’ll need to start a server to view Step 4 properly if you’ve downloaded the project locally. An easy way to do this is to with Python 3.x is to run python -m http.server, which will start a server on port 8000. You can then head to localhost:8000/Step 4 in your browser to see it in action.
You’ll need to know how to:
THREE.ObjectLoader and Meshes using THREE.JSONLoaderTHREE.SkinnedMesh and THREE.AnimationAnd, that’s it! Go make some awesome interactives with art.