Awesome
whycode
whycoding?
It is the work of the "Colorful Black" team in the TaiChi Hackathon 2022. It mainly uses the parallel programming language Taichi to achieve some dynamic transformation visual effects and assist in music accompaniment. The project mainly describes the scene with SDF (Signed Distance Field), which is implicitly expressed. It uses Taichi's efficient parallelism to perform multiple sampling calculations on the GPU. The return value of the SDF is used for transformation processing of various shapes.
Install and Use
# install ffplay [ffmpeg]
# ubuntu
sudo apt-get install ffmpeg
# mac
brew insatll ffmpeg
# clone code
git clone https://github.com/ElonKou/whycode
# install environment.
cd whycode
pip install -r requirements.txt
# run
python3 main.py
Results
Project introduction π
Team name: colorful black project name: why coding? Entry direction: application direction Project category: interactive art
Project details
Project introduction: Interactive and cool program animation clips can be used to render animation in a similar way using shader toy. Expected effect: to achieve the effect of continuous switching of multiple shader SDF scenes over time, with music as accompaniment.
Technical solution:
overall technology: module division is realized by fragment shader rendering:
- shader module β: Use taichi to implement clip shaders
- Scene module β: Maintain the information of various scenarios, including time, and call different shaders in different time periods
- Basic component module β: The geometry of SDF is used to represent physics
- Special effect component module β: Realize different transformation functions for the control of shader special effects
- Scene transition special effect components β: Realizing scene switching special effects
- music control component β: Realize special effect music