taichi-dev / taichi_three

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

Proposed 0.0.3: coordinate system & camera control #9

Closed victoriacity closed 4 years ago

victoriacity commented 4 years ago

The following features are added in this fork based on the taichi_three:dev branch:

Implemented full camera control: use scene.camera.from_mouse(gui) after a gui.get_event() call (without arguments) to control the camera with the mouse.

Implemented Backface culling for perspective cameras

Used the area method to compute barycentric coordinates

Clipped the triangle bounding box to prevent drawing outside the camera

Updated the monkey.obj asset to the correct orientation using +Z forward, +Y up

Fixed SceneRT compatibility with the refactor API for the dev branch

archibate commented 4 years ago

It seems that if I scale first, then the orbiting center is changed?

archibate commented 4 years ago

The target should not be changed without pressing CTRL, IMO. This allows users to orbit the target in a closer details when zoomed in. Btw, would it be nice add some hints in from_mouse's first invocation, showing something like [Tai3D] Hint: use LMB to orbit, RMB to ...? So that users know how to control our cool camera system.