Skip to content

c31io/tofon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ToF ON

Blender Time-of-Flight Add-on

Much inspired by How to calculate for every ray the total distance it has traveled from camera to emitter.

Usage

Install Python 3.9.2 (version as Python in Blender 2.93).

Then install the modules,

python -m pip install numba opencv-python

Open the Blender default scene.

Modify Module Path to where cv2 and numba are installed.

Click the buttons from the top to the bottom.

Find the video in the temperary file directory.

Development

Install a portable version of Blender in user directory, and install the VS Code plugin and the fake bpy for developent.

On Linux, to keep the cache in RAM, create a RAM file system,

mkdir ~/ramfs
sudo mount -t tmpfs -o size=2048M tmpfs ~/ramfs

Known Issues

Only accept simple blend files and texture-free shader nodes.

A shorter path overwrites the longer ones.

High ray-depth patterns spin.

Ior is not supported.