Skip to content

FPG is used for generating fur patterns. It utilizes the cellular automata algorithm developed by David Young. It can be used as a add-on within Blender or in a standalone GUI application.

License

Notifications You must be signed in to change notification settings

RobertHue/fur-pattern-generator

Repository files navigation

fur pattern generator

Python License: MIT Build

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:

  • Used in a QT application (fpg-gui/): example

  • Used as Blender Addon (fpg-bpy-addon/): example

  • 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.

Table of Contents

Repository structure

The repository is structured as follows:

  • .github/: contains the automated testing & linting by using GitHub Actions
  • .vscode/: workspace configuration for VSCode
  • fpg/: Python package containing the modules of the fur-pattern-generator (FPG)
  • fpg-bpy-addon/: Python package containing the blender addon
  • fpg-gui/: Python package containing the QT-based GUI
  • tests/: contains unit tests for this project
  • pyproject.toml: configuration file for Poetry, isort, Black, mypy, Ruff and pyright
  • README.md: the README file that you are reading right now

Getting Started

Installation prerequisites

  • Git

  • VSCode

  • 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

Usage

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:

example


Development

This section serves rather as a knowledge-base for developers, who want to test or extend this addon.

Visual Studio Code

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.

Blender & VSCode interoperability

Blender Python Conventions

Hints

  • 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.

About

FPG is used for generating fur patterns. It utilizes the cellular automata algorithm developed by David Young. It can be used as a add-on within Blender or in a standalone GUI application.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages