Figure: result of
python3 example6.py. Please replace the image above (demo.jpg) with yours, so that other people can immediately see your results :-)
We invite you to create your voxel artwork, by putting your Taichi code in main.py!
Rules:
- You can only import two modules:
taichi(pipinstallation guide below) andscene.py(in the repo). - The code in
main.pycannot exceed 99 lines. Each line cannot exceed 120 characters.
The available APIs are:
scene = Scene(voxel_edges, exposure)scene.set_voxel(voxel_id, material, color)material, color = scene.get_voxel(voxel_id)scene.set_floor(height, color)scene.set_directional_light(dir, noise, color)scene.set_background_color(color)
Remember to call scene.finish() at last.
Taichi Lang documentation: https://docs.taichi-lang.org/
Modifying files other than main.py is not allowed.
Make sure your pip is up-to-date:
pip3 install pip --upgradeAssume you have a Python 3 environment, simply run:
pip3 install -r requirements.txtto install the dependencies of the voxel renderer.
python3 example1.py # example2/3/.../7/8.pyMouse and keyboard interface:
- Drag with your left mouse button to rotate the camera.
- Press
W/A/S/D/Q/Eto move the camera. - Press
Pto save a screenshot.
Please put your artwork at the beginning of this README file. Replacing the demo.jpg file with your creation will do the job.








