Skip to content

surachno/animal-vision-simulator

Repository files navigation

Animal Vision Simulator for GIMP 3

This package provides a GIMP 3 plug-in that approximates several animal-vision modes from ordinary RGB images.

Included features

  • Built-in presets: Dog, Cat, Honeybee, Pigeon
  • Progress text while processing
  • Auto-built low-resolution preview sheet
  • Preview grid layout dropdown (Auto, 1–4 columns)
  • Original image kept untouched on its original layer
  • Processing happens on a duplicated active layer
  • Output layer names use short setting notation
  • Custom animal model support through:
    • Filters → Vision → Animal Vision Model Editor…
    • or direct editing of animal_vision_models.json

Files

  • animal_vision_simulator.py — the plug-in
  • animal_vision_models.json — the live custom-model store loaded by the plug-in
  • animal_vision_models.template.json — an example template for expert editing

Installation

  1. Copy the whole animal_vision_simulator folder into your GIMP 3 plug-ins folder.
  2. Make sure animal_vision_simulator.py is executable if your platform requires it.
  3. Restart GIMP.

Menu entries

  • Filters → Vision → Animal Vision Simulator…
  • Filters → Vision → Animal Vision Model Editor…

Simulator workflow

When you run Animal Vision Simulator…:

  1. The selected layer is left untouched.
  2. That layer is duplicated.
  3. The duplicate becomes the active work layer.
  4. The simulation is applied to the duplicate.
  5. The duplicate is renamed with a short notation, for example:
    • Dog [cmb f60]
    • Honeybee [col f60 uv1.4]
    • Raptor UVS [cmb f60 d20m ff0.2 uv1.3]

Preview grid layout

The simulator includes a Preview grid layout dropdown with these options:

  • Auto
  • 1 column
  • 2 columns
  • 3 columns
  • 4 columns

The preview sheet is intentionally built before the main settings dialog opens. Because of that, the selected grid layout acts as a persisted preference: change it once, and the new layout will be used for the next auto-built preview sheet.

Custom animal models

Use Animal Vision Model Editor… to save or update models. The editor form now resets to clean defaults each time you open it, so old values do not linger when you start a new animal.

Main fields

  • Model key — short unique identifier, for example ferret or raptor-uvs
  • Animal name — visible display name
  • Transform family
    • Dichromat-style RGB
    • UV insect false-colour
    • UV bird false-colour
  • Acuity (cycles/degree)
  • Shadow boost
  • Contrast
  • Saturation
  • Blue boost
  • UV gain factor
  • 3×3 matrix coefficients for dichromat-style models
  • Notes for scientific provenance

Important note

  • The 3×3 matrix is used by dichromat-style models.
  • For UV insect false-colour and UV bird false-colour, the matrix is stored for documentation but not used by the current transform.

Immediate use of saved custom models

Saved custom models are written to animal_vision_models.json. The plug-in now prefers a user-writable config folder for that file, and falls back to the plug-in folder only if that is writable.

  • They can be used immediately in the simulator by entering the saved key into Custom model key (optional).
  • The simulator now also auto-prefills the last-saved custom model key in interactive mode, so the next run should pick up the most recently saved custom animal automatically unless you clear or change that field.
  • After restarting GIMP, saved custom models should also appear in the preset dropdown.

Scientific caution

These outputs are approximations, not literal reconstructions of animal subjective experience.

  • Dog and cat are RGB-only dichromat-style approximations.
  • Honeybee and pigeon are false-colour approximations because ordinary RGB images do not contain a real UV channel.
  • Distance is only a rough acuity cue, not full scene depth.

Troubleshooting

  • If the menu item is greyed out, open an RGB image and select a pixel layer.
  • If a newly saved custom model does not appear in the preset dropdown immediately, either:
    • enter its key in Custom model key (optional), or
    • restart GIMP.
  • If a custom model does not load, check that animal_vision_models.json is valid JSON.

About

Research-informed GIMP 3 plug-in for approximating animal vision from RGB images, with clear limits for UV/IR/polarization data.

Topics

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages