I can’t seem to wrap my head around where Taichi is supposed to fit into my projects. Forgive me if these questions are obvious, I’m merely a hobbyist game developer, but I’m not sure how much of my current rendering pipeline Taichi is supposed to replace.
Am I supposed to be creating and compiling Taichi programs to be executed on each frame? or am I supposed to be running a Taichi program on the side and somehow communicating with it to update and draw with?
Again, very sorry if I’m not making any sense I just don’t know where to get started to use Taichi in an existing game development project.
Hi, sorry for the delayed reply.
Taichi is not mainly designed for rendering though. It allows people to programme GPGPU (compute shaders) for parallel computation (e.g. physics simulation), instead of traditional GPU (frag/vert shaders) that only pursuits fast graphical rasterization.
So, where a compute shader is to be used, you may use Taichi.
You want to simulate a soft body in your game - the player wounds a Slime using their sward, or gun, the Slime breaks or split apart. You want the Slime-destroying animation to be physically-based, and interactive according to players action.
For small scale simulations you may write some C/C++ code to build a solver. But you find it’s not quick enough for real-time response for large scale ones.
Then you could use Taichi, to utilize player’s GPU to compute the physics in parallel, in order to make 60 FPS possible.
Taichi support multiple backends including CUDA, Metal, OpenGL compute shader. It can also fallback to CPU when none of them are available on player’s computer, it supports multi-threading so still profitable compared to single-threaded C solvers.