With this Blender add-on, you can generate textures in the form of stripes and spots found on animals, such as leopards and tigers.
It can be used in one of the following three ways:
-
by using it as a library for your own application (
fpg/
)
The algorithm used for this purpose is the one defined by David Young. It is based on cellular automata and simulates the behavior of pigment cells (melanocytes) inside mammals. These cells send out activator and inhibitor genes to their neighboring cells, resulting in the observed patterns.
- https://users.math.yale.edu/public_html/People/frame/Fractals/Panorama/Biology/Leopard/Leopard.html
- http://ccl.northwestern.edu/netlogo/models/Fur
The repository is structured as follows:
.github/
: contains the automated testing & linting by using GitHub Actions.vscode/
: workspace configuration for VSCodefpg/
: Python package containing the modules of the fur-pattern-generator (FPG)fpg-bpy-addon/
: Python package containing the blender addonfpg-gui/
: Python package containing the QT-based GUItests/
: contains unit tests for this projectpyproject.toml
: configuration file for Poetry, isort, Black, mypy, Ruff and pyrightREADME.md
: the README file that you are reading right now
-
Python (see
pyproject.toml
for it's version) -
Install Poetry, as follows:
python -m pip install --upgrade pip python -m pip install --user pipx python -m pipx ensurepath pipx install poetry
To install these dependencies, just execute the following command:
poetry install
Go into UV-Editor and create an image by hitting New Image
.
It is recommended to choose low resolution, because the algorithm is not yet optimized enough.
After that you can generate a Random Noise
or let the CA young pattern generator run by hitting CA Young
:
This section serves rather as a knowledge-base for developers, who want to test or extend this addon.
I recommend utilizing Visual Studio Code due to its convenient development features, including autocomplete, syntax highlighting, seamless integration with version control systems, and other tools that significantly enhance the speed and ease of the development process. Just install the recommended VSCode extensions of this project and you are good to go.
- https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Addons
- https://docs.blender.org/api/2.83/bpy.props.html
- https://b3d.interplanety.org/en/using-microsoft-visual-studio-code-as-external-ide-for-writing-blender-scripts-add-ons/
- https://youtu.be/q06-hER7Y1Q
- https://www.gdquest.com/docs/guidelines/best-practices/blender-python/
- https://realpython.com/absolute-vs-relative-python-imports/
- https://b3d.interplanety.org/en/class-naming-conventions-in-blender-2-8-python-api/
-
Please install the recommended plugins for VSCode (located in
.vscode/settings.json
). -
For testing changes in your addon really quick, just reload the addon with F1:
Blender: Reload Addons`
-
For debugging your addon, you can also use normal or conditional break-points.