crystalthoughts / procedural_knots

This is the repository for Procedural Knots - a research project about modelling the annual ring pattern around knots in solid wood. It is implemented as a shader program in PyOpenGL and GLSL.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Procedural Knots

Procedural Knots

This is the repository related to the publication "Procedural Texturing of Solid Wood with Knots" (SIGGRAPH 2022). It is implemented as a shader program in PyOpenGL and GLSL.

Environment

It is recommended to use a virtual environment, for example venv.

The following command will install the packages at once.

$ pip install -r requirements.txt

Run Program

After installing the necessary packages, run the program with

$ python SETUP/main.py

If everything works properly, a window with a cuboid with an animated knotted wood texture will appear, as in the image below.

Procedural Knots

Understanding the Code

The procedure is located in the fragment shader (setup/main.frag). The process is explained in the methods section of the paper (PDF). To facilitate the understanding of the code, we made some references to the paper in the comments, e.g. // PAPER Equation 5 and // PAPER Section 4.2.2.

Feedback

If you experience any problems or have some suggestions for improvements, feel free to share under Issues.

Links

Project page: http://www.ma-la.com/procedural_knots.html

Paper PDF: http://ma-la.com/procedural_knots/Procedural_Knots_2022.pdf

ACM link: https://dl.acm.org/doi/abs/10.1145/3528223.3530081

About

This is the repository for Procedural Knots - a research project about modelling the annual ring pattern around knots in solid wood. It is implemented as a shader program in PyOpenGL and GLSL.

License:MIT License


Languages

Language:GLSL 54.2%Language:Python 45.8%