-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does or will Tina support Framewire or Transparent material? #35
Comments
Hi! Thank for your suggestions! Tina didn't support it before. However it hasn't been released to PyPI yet. So to play with it you may clone this repo and install it locally: pip install -y taichi-tina # uninstall the released v0.0.1 version
git clone https://github.com/taichi-dev/taichi_three.git --depth=1
cd taichi_three
python3 -m pip install wheel # required for generating wheels
python3 setup.py bdist_wheel # build the latest taichi-tina
python3 -m pip install dist/*.whl # install latest taichi-tina locally on your machine Checkout # In this episode, you'll learn how to render a wireframe model in Tina
#
# This tutorial is based on docs/monkey.py, make sure you check that first
import taichi as ti
import tina
ti.init(ti.cpu)
# you may specify the line width for rendering wireframes:
scene = tina.Scene(linewidth=2)
# load the monkey using `tina.MeshModel` node (`tina.SimpleMesh` works too):
model = tina.MeshModel('assets/monkey.obj')
# convert the mesh to its wireframe using the `tina.MeshToWire` node:
wiremodel = tina.MeshToWire(model)
# add the wireframe model into scene:
scene.add_object(wiremodel)
# add the original model, with a tiny scale:
model = tina.MeshTransform(model, tina.scale(0.9))
scene.add_object(model)
gui = ti.GUI('wireframe')
while gui.running:
scene.input(gui)
scene.render()
gui.set_image(scene.img)
gui.show() I'll try to add another commit to support transparent materials later, write to you soon! |
Besides, I still have question for the design of the TriangleRaster. Why don't set 'Clipping' as a default True setting? This can make it more similar to a regular rasterizer from my point of view. |
Hello!
I want to compare the difference between two 3D simulation (They should have subtle difference) and Framewire or Transparent materials would be two intuitive way that come to my mind to show this difference.
However, I am not able to find relevant API in Tina. Is there a way now that I can do this?
Thank you!
The text was updated successfully, but these errors were encountered: