taichi-dev / taichi_three

A soft renderer based on Taichi (work in progress)
https://t3.142857.red/
MIT License
223 stars 24 forks source link

material problem #38

Closed coffeiersama closed 3 years ago

coffeiersama commented 3 years ago

Hi, I updated the tina into the latest version, and it shows me errors when I am trying to render.

Traceback (most recent call last):
  File "animComparator.py", line 113, in <module>
    helper = SceneHelper()
  File "animComparator.py", line 73, in __init__
    self.scene = tina.Scene(culling=False, clipping=True, res=1024)
  File "/home/donyan/Downloads/Anaconda/ENTER/envs/taichi/lib/python3.7/site-packages/tina/scene/raster.py", line 35, in __init__
    self.default_material = tina.Diffuse()
  File "/home/donyan/Downloads/Anaconda/ENTER/envs/taichi/lib/python3.7/site-packages/tina/matr/material.py", line 683, in Diffuse
    material = tina.Lambert() * color
TypeError: can't multiply sequence by non-int of type 'Lambert'
archibate commented 3 years ago

Sorry for the trouble! This seems to be an old file (tina/core/material.py) not being upgraded by pip, we may need to remove it manually... So does running

os.unlink(os.path.join(tina.__path__[0], 'core/material.py'))

solve the issue?