{"id":19132373,"url":"https://github.com/taichi-dev/taichi_three","last_synced_at":"2025-04-06T11:07:59.777Z","repository":{"id":43531509,"uuid":"272924688","full_name":"taichi-dev/taichi_three","owner":"taichi-dev","description":"A soft renderer based on Taichi (work in progress)","archived":false,"fork":false,"pushed_at":"2021-07-10T09:32:09.000Z","size":2254,"stargazers_count":225,"open_issues_count":28,"forks_count":24,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-30T10:09:43.440Z","etag":null,"topics":["3d","graphics","python","renderer","software-rendering","taichi"],"latest_commit_sha":null,"homepage":"https://t3.142857.red/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taichi-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-17T08:52:31.000Z","updated_at":"2025-03-26T08:29:15.000Z","dependencies_parsed_at":"2022-09-26T17:40:49.675Z","dependency_job_id":null,"html_url":"https://github.com/taichi-dev/taichi_three","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-dev%2Ftaichi_three","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-dev%2Ftaichi_three/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-dev%2Ftaichi_three/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taichi-dev%2Ftaichi_three/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taichi-dev","download_url":"https://codeload.github.com/taichi-dev/taichi_three/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247471518,"owners_count":20944158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","graphics","python","renderer","software-rendering","taichi"],"created_at":"2024-11-09T06:18:00.186Z","updated_at":"2025-04-06T11:07:59.754Z","avatar_url":"https://github.com/taichi-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tina\n\nA real-time soft renderer based on the [Taichi](https://github.com/taichi-dev/taichi) programming language.\n\nCheckout [`docs/`](https://github.com/taichi-dev/taichi_three/tree/master/docs) for API demos to getting started.\n\nCheckout [`examples/`](https://github.com/taichi-dev/taichi_three/tree/master/examples) for application examples.\n\nNOTE: the renderer has been previously named Taichi THREE, see bottom.\n\n# Installation\n\nEnd users may install Tina from PyPI:\n```bash\npython3 -m pip install taichi-tina\n```\n\n# Features\n\nHere's a list of important features currently Tina have:\n\n* particles - `docs/particles.py`\n* triangle meshes - `docs/triangle.py`\n* connective meshes - `tests/connect.py`\n* smooth shading - `docs/smooth.py`\n* mesh grid - `examples/meshgrid_wave.py`\n* mesh wireframe \u0026 anti-aliasing - `docs/wireframe.py`\n* construct surface from particles - `examples/mciso_mpm3d.py`\n* foreground \u0026 background color - `examples/pars_mpm3d.py`\n* lighting \u0026 materials - `docs/lighting.py`\n* loading GLTF scene - `docs/gltf.py`\n* transforming models - `docs/transform.py`\n* screen blooming effect - `tests/blooming.py`\n* temporal anti-aliasing, TAA - `docs/options.py`\n* fast approximate anti-aliasing, FXAA - `tests/fxaa.py`\n* image-based lighting, IBL - `examples/ibl_matball.py`\n* screen space ambient occlusion, SSAO - `tests/ssao.py`\n* screen space reflection, SSR - `tests/ssr.py`\n* real-time rendering volume - `docs/volume.py`\n* loading OBJ models - `docs/monkey.py`\n* path tracing mode - `docs/pathtrace.py`\n* bidir path tracing (WIP) - `tests/bdpt.py`\n* detect element under cursor (WIP) - `tests/probe.py`\n* Blender addon (WIP) - [`Taichi-Blend`](https://github.com/taichi-dev/taichi_blend)\n\nIf you didn't find your feature of interest, feel free to [open an issue](https://github.com/taichi-dev/taichi_three/issues/new/choose) for requesting it :)\n\n# Developer installation\n\nIf you'd like to make use of Tina in your own project or contribute to Tina:\n\nThank for your support! You may like to clone it locally instead of the\nend-user installation so that you could easily modify its source code to\nbest fit your own needs :)\n\nHere's the suggested script for Linux users:\n\n```bash\ncd\npip uninstall -y taichi-tina  # uninstall end-user version\npip uninstall -y taichi-tina  # twice for sure :)\ngit clone https://github.com/taichi-dev/taichi_three.git --depth=10\n# try the link below (a mirror site in China) if the above is too slow:\n# git clone https://gitee.com/archibate/taichi_three.git --depth=10\ncd taichi_three\necho export PYTHONPATH=`pwd` \u003e\u003e ~/.bashrc  # add path for Python to search\nsource ~/.bashrc  # reload the configuration to take effect\n```\n\nOr, feel free to make use of `virtualenv` if you're familiar with it :)\n\n## Verifying developer installation\n\nAfter that, you may try this command to verify installation:\n\n```bash\npython -c \"import tina; print(tina)\"\n```\n\nIt should shows up the path to the repository, e.g.:\n```\n\u003cmodule 'tina' from '/home/bate/Develop/taichi_three/tina/__init__.py'\u003e\n```\nCongratulations! Now you may `import tina` in your project to have fun.\n\nMessage containing `site-packages` may mean something wrong with PYTHONPATH:\n```\n\u003cmodule 'tina' from '/lib/python3.8/site-packages/tina/__init__.py'\u003e\n```\n\n## How to contribute\n\nIf you've done with some new features, or bug fixes with developer mode:\n\nI would appericate very much if you'd like to contribute them by\nopening an [pull request](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/about-pull-requests)\nso that people (including me) could share your works :) To do so:\n\n```bash\nvim tina/somefile.py # suppose you've now modified some file ready to share..\ngit checkout -b fix-bug  # switch to a new branch with name 'fix-bug'\ngit add .  # add and commit the file change\ngit commit -m \"Hello, I fixed a bug in tina/somefile.py\"\ngit push -u origin fix-bug\n```\n\nThen visit https://github.com/taichi-dev/taichi/pull/new/fix-bug and click\n`Create Pull Request`, so that it will open a new pull request for you.\nThen I'll reply to your pull request soon, thank for the contribution!\n\n## Folder structures\n\n```bash\n$ ls\ntina/        # the main source code of Tina\ntina_blend/  # the Blender addon module (WIP)\nassets/      # binary assets (models, images) for the demos\ndocs/        # simple demos aimed to demonstrate the usage of basic APIs\nexamples/    # advanced demos to show what applications Tina is capable to do\ntests/       # some work in progress (WIP) features that remain testing\nbenchmarks/  # some benchmark scripts to test the performance of Tina\nsetup.py     # the script to build the PyPI package for Tina\n\n$ ls tina/\nassimp/      # asset (model) loaders, e.g. GLTF, OBJ, INP..\ncore/        # codebase related to the real-time rasterizer\npath/        # codebase related to the offline path tracer\nmesh/        # mesh storing and editing nodes\nvoxl/        # volume / voxel storing nodes\npars/        # particle set storing nodes\nscene/       # define the tina.Scene class\nmatr/        # material and shading nodes\nutil/        # some useful utilities for Tina and your project\nblend/       # Blender addon module (WIP)\ncli/         # command line interface (WIP)\npostp/       # post-processing, mainly about tone mapping\nskybox.py    # implementing cube map and spherical map for skybox\nrandom.py    # random number generators, e.g., Taichi built-in, Wang's hash\ncommon.py    # some common functions that might be used by Tina or your project\nadvans.py    # some advanced functions that might be used by Tina or your project\nhacker.py    # some dirty hacks into Taichi to make Tina easier to maintain\nlazimp.py    # lazy importing infrastructure to reduce import time\ninject.py    # profiling Taichi JIT compilation time (WIP)\nshield.py    # make Taichi fields to support pickle (WIP)\nprobe.py     # inspect geometry from screen space (WIP)\n```\n\n# Legacy\n\nHello, dear Taichi THREE users:\n\nThe core is completely re-written after Taichi THREE v0.0.9 is released making the API more intuitive and much easier to maintain in hope for make it available to everyone. It now supports rendering not only triangle meshes but also particles and volumes (more to be added).\nDon't worry, many of the good things from legacy Taichi THREE are left, like cook-torrance, mesh editing nodes, OBJ importer, marching cube... but some of the very core parts, including the triangle rasterizer, is completely thrown away and replaced by a more efficient algorithm that is friendly to GPUs when faces are a bit large. The new rasterizer also make compilation a bit faster and no more growing compilation time when there are a lot of models (reliefs #26). Also note that the camera system is completely re-written (sorry @Zony-Zhao and @victoriacity!) and now we no longer have dead-lock (万向节死锁) at +Y and -Y.\nThe re-written renderer is renamed to `Tina` to celebrate the huge changes in its API and important refactors and steps as an answer to issue #21, source of the name might be [`Seventina`](https://www.bilibili.com/video/BV1zt411U7ZE), one of my favorite song of harumakigohan :laughing: Another reason is that we don't need a very long `import seventina as t3` when import, we could directly use the original package name by `import tina` and `tina.Scene()`, what do you think?\nAlso thanks to the cleaned code structure, the renderer now also have a Blender integration work in progress, see [`Taichi-Blend`](https://github.com/taichi-dev/taichi_blend), and [video demo here](https://www.bilibili.com/video/BV17i4y157xx).\nI won't rename the repo `taichi-dev/taichi_three` very soon to prevent dead links to this project.\nAlso note that the dependency of [`taichi_glsl`](https://github.com/taichi-dev/taichi_glsl) is removed after the transition to `tina`, we invent own utility functions like `bilerp` and hacks like `ti.static` to prevent sync with the `taichi_glsl` repo (prevent issues like https://github.com/taichi-dev/taichi_three/issues/32#issuecomment-747265261).\nThank for watching and making use of my project! Your attention is my biggest motivation. Please let me know if you have issues or fun with it. I'll keep pushing Tina and Taichi forward, I promise :heart:\n\nThe legacy version of Taichi THREE could still be found at the [`legacy`](https://github.com/taichi-dev/taichi_three/tree/master/legacy) branch.\nAnd here is an video introducing the usage of Tina: https://www.bilibili.com/video/BV1ft4y1r7oW\nFinally, the new renderer Tina could be installed using command: `pip install taichi-tina`.\nWhat do you think about the new name and these huge refactors? Inputs are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaichi-dev%2Ftaichi_three","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaichi-dev%2Ftaichi_three","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaichi-dev%2Ftaichi_three/lists"}