Connect Aseprite to Blender for painting pixelart textures in real time

Overview

Pribambase

Pribambase is a small tool that connects Aseprite and Blender, to allow painting with instant viewport feedback and all functionality of external editor at the same time. It also adds a few shortcuts like displaying the UV map in Aseprite or setting up a grid-scaled pixelart reference in the viewport.

Currently, the addon has mostly one-way workflow where you paint in Ase and not much in Blender. Better bidirectional workflow is quite a task tell ya what is planned in future versions.

  • Download packaged version for your platform
  • Geeting Started after installing, look there
  • Reference explains each button and setting
  • Itchio forum to show off your work or ask for help
  • Issue tracker for bug reports and feature requests. Kindly don't submit non-technical help requests.

​Although the entire project is distributed free of charge, I highly encourage you to support it financially sooner or later, as if it was on blen***arket or flip***rmals. There's still work left to do, and it'd be pretty great to be able to do it sooner.

Setup

This plugin consists of two parts: for Aseprite and for Blender. Get pre-packaged version for your OS on Itchio. Do not download repo ZIP, it won't just work without extra steps.

Prerequisites

  • Blender recommended version 2.83 or later, preferrably latest. Minimum version is 2.80, but performance and stability are significantly worse
  • Aseprite minimum version 1.2.30 or 1.3-beta7. Trial version won't work

Installing Aseprite plugin

  1. Launch Aseprite and drag the file called pribambase-aseprite into the window
  2. Press Install
  3. Restart Aseprite

After that, a new menu option called Sync should appear in the File menu

Installing Blender plugin

  1. In Edit > Preferences > Addons click Install and chose the file called pribambase-blender-[YOUR OS]
  2. After the addon appears in the list, check the box next to its name to activate it. The app might freeze for several seconds
  3. Save preferences from the "burger" menu

After that, a new section called Sync will appear in N > Tools tab in viewport, and a new menu called Sprite will appear in the Image/uv editor.

Source

Source for aseprite plugin is the client/ folder. The repo root is the blender plugin. For using source, you'd probably want to symlink them to extension/addon locations.

Third party dependencies aren't stored in the repo. Download them from PyPI to thirdparty folder, or fetch with PIP:

cd to/project/root

## for your platform
pip download -d thirdparty -r requirements.txt

## for different platforms; the platform tags tags go look up on PyPI
pip download -d thirdparty --platform win32 --only-binary=:all: -r requirements.txt

License

In accordance with Blender developers' wishes, the addon is distributed under GPL-3.0 license. See COPYING for full license text. Specific files or libraries might be also available under different terms, see included comment or package licenses.

Acknowledgements

Async loop handling is based on Blender Cloud Addon

Comments
  • Automatic

    Automatic "Send UV" refresh when UV changes in Blender

    What for

    After changing UVs in Blender, I need to manually re-send UVs back to Aseprite using the menu option. It would be nice if this was automated, or on a timer I could configure (similar to the auto-reimport addon). I frequently tweak UVs as I'm drawing and it would save some keystrokes/clicking each time.

    How

    Either by detecting changes in the UV map (if this is possible in the Blender UI), or by setting up a configurable timer so it can just be resent every couple of seconds.

    Relevance Please classify it by leaving, removing, or adding list items

    • It affects everyone using the tool
    • It's a very repetitive task
    enhancement 
    opened by recatek 9
  • Something wrong with the sent UV map in Aseprite

    Something wrong with the sent UV map in Aseprite

    Reality Sending a UV map to Aseprite yields a mix of the UV map and some graphics card framebuffer garbage, sometimes only garbage.

    Expectation To get a transparent layer with only the UV map outlines.

    Logs Shows nothing after Info: Aseprite connected

    Version info

    • Blender 3.0.1
    • Aseprite 1.3 Beta 10
    • Pribambase 2.2.0
    • OS: Linux 5.14.21 (KDE on AMD using X11)

    Additional context Screenshot from Aseprite

    It did work in the first released version, if I recall correctly. I guess it can just as well be Blender or some recent graphics driver bug.

    opened by photodiode 4
  • Websocket failed to send data

    Websocket failed to send data

    Reality Addon loaded in blender (latest release) and aseprite (v1.3 beta16 64bit)

    Sync blender and aseprite successfully (both show connected)

    when creating a new sprite via the sprite menu in blender, aseprite console says "appdata/roaming/aseprite/extensions/pribambase/snyc.lua:267 websocket failed to send data

    Logs

    Error handling request
    Traceback (most recent call last):
      File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\pribambase\thirdparty\aiohttp-3.8.0-cp310-cp310-win_amd64.whl\aiohttp\web_protocol.py", line 430, in _handle_request
        resp = await request_handler(request)
      File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\pribambase\sync.py", line 119, in _receive
        await addon.handlers.process(msg.data)
      File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\pribambase\messaging\__init__.py", line 143, in process
        msg._parse(mvdata[ID_SIZE:], args)
      File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\pribambase\messaging\__init__.py", line 107, in _parse
        self.parse(args)
      File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\pribambase\messaging\handle.py", line 55, in parse
        args.name = self.take_str()
      File "C:\Users\XXX\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\pribambase\messaging\__init__.py", line 80, in take_str
        return str(self.take_data(), encoding)
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 3083: invalid start byte
    
    
    

    Version info

    • for Blender 3,4
    • for Aseprite v1.3 beta16
    • for Pribambase. if it's installed from source code, please use the commit hash 2.4.1
    • OS Windows10 x64

    Additional context Add any other context about the problem here.

    opened by Bionic-Matt 3
  • Error when starting sync string.unpack call

    Error when starting sync string.unpack call

    After enabling sync in Aesprite 1.3, and syncing with my blend file in Blender 3.0, Aesprite throws an error in Sync.lua line 576

    image

    Version info 3.0- for Blender 1.3 - for Aseprite 2.1 according to blender Addon - for Pribambase Win10 x64 - OS

    [AFK] 
    opened by ghost 3
  • Numpy not found error on enable

    Numpy not found error on enable

    Reality On a fresh install of Blender, install the extension and try to enable it. It gives a ModuleNotFoundError and fails to load. Numpy is already installed systemwide.

    Expectation An enabled extension.

    Logs

    Traceback (most recent call last):
      File "/usr/share/blender/3.0/scripts/modules/addon_utils.py", line 351, in enable
        mod = __import__(module_name)
      File "/home/argent/.config/blender/3.0/scripts/addons/pribambase/__init__.py", line 31, in <module>
        from .props import *
      File "/home/argent/.config/blender/3.0/scripts/addons/pribambase/props.py", line 29, in <module>
        from .addon import addon
      File "/home/argent/.config/blender/3.0/scripts/addons/pribambase/addon.py", line 91, in <module>
        from .messaging import handle
      File "/home/argent/.config/blender/3.0/scripts/addons/pribambase/messaging/handle.py", line 27, in <module>
        import numpy as np
    ModuleNotFoundError: No module named 'numpy'
    

    Version info

    • Blender: 3.0.1
    • Aseprite: N/A
    • Pribambase: 2.2.1
    • OS: Arch Linux
    [AFK] 
    opened by argentsileo 2
  • error when adding pribambase materials

    error when adding pribambase materials

    Reality I am unaware of how i caused this error. or how to fix it

    Expectation i expected everything to work normally when i tried to make a new pixel texture but i keep getting said error

    Logs ck.

      File "C:\Users\jacob\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\pribambase\object.py", line 157, in execute
        raise RuntimeError()
    RuntimeError
    
    location: <unknown location>:-1
    
    location: <unknown location>:-1
    Error: Traceback (most recent call last):
      File "C:\Users\jacob\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\pribambase\object.py", line 157, in execute
        raise RuntimeError()
    RuntimeError
    
    location: <unknown location>:-1
    

    Version info i have tried using the all recent blender versions and im being met with the same error

    opened by Smiley-ball 1
  • [UI]

    [UI] "Send UV" option not showing up

    Reality On start in Blender, the option "Send UV" is not showing up.

    Expectation On start in Blender (new file), making a new UV, the "Send UV" option is showing up

    Logs

    Info: Packed to memory image ""
    ERROR: Image "" not available. Keeping packed image
    Info: Packed to memory image ""
    ERROR: Image "" not available. Keeping packed image
    Info: Packed to memory image ""
    ERROR: Image "" not available. Keeping packed image
    Info: Packed to memory image ""
    ERROR: Image "" not available. Keeping packed image
    Info: Packed to memory image ""
    ERROR: Image "" not available. Keeping packed image
    Info: Packed to memory image ""
    ERROR: Image "" not available. Keeping packed image
    Info: Packed to memory image ""
    ERROR: Image "" not available. Keeping packed image
    Info: Packed to memory image ""
    ERROR: Image "" not available. Keeping packed image
    Info: Packed to memory image ""
    ERROR: Image "" not available. Keeping packed image
    
    

    Version info

    • for Blender 3.1.2
    • for Aseprite 1.2.40
    • for Pribambase 2.3.0
    • OS Windows 10 PRO v21H2 19044.2130

    Evidence

    image image image

    opened by RogelioVR 1
  • Texture doesn't update in blender 3.1

    Texture doesn't update in blender 3.1

    Reality Image changes in blender are ignored until something else flushes them, e.g saving and reloading the image.

    Expectation textures change every time image data cahnges

    Logs In blender, please click Window > Toggle System Console and see if there's anything suspicious there. On Windows, copying from there is done by selecting text and right click.

    To paste it here, use triple ticks like this
    

    Version info blender 3.1

    Additional context blender's new partial image update system is buggy, e.g. like this.

    E.g. this test works in older versions, but not 3.1. Should fill image with random shade of gray on each call, but in 3.1 only works forst time; than need e.g. to save and reload the image.

    import bpy
    import numpy as np
    from random import random
    
    try:
        img = bpy.data.images["Untitled"]
    except KeyError:
        img = bpy.data.images.new("Untitled", 32, 32, alpha=True)
    
    
    gen = np.ones((img.size[1], img.size[0], img.channels), dtype=np.float32) * random()
    gen[:,:,3] = 1.0
    img.pixels.foreach_set(np.ravel(gen))
    
    
    img.update()
    img.update_tag()
    for area in bpy.context.screen.areas:
        area.tag_redraw()
    
    
    wontfix 
    opened by lampysprites 1
  • Typing broke compatibility with blender 2.83

    Typing broke compatibility with blender 2.83

    Reality The addon crashes when trying to enable it.

    Expectation It should not

    Logs

    Read prefs: C:\Users\lampy\AppData\Roaming\Blender Foundation\Blender\2.83\config\userpref.blend
    found bundled python: C:\Users\lampy\Desktop\blender-2.83.18-windows-x64\2.83\python
    Traceback (most recent call last):
      File "C:\Users\lampy\Desktop\blender-2.83.18-windows-x64\2.83\scripts\modules\addon_utils.py", line 351, in enable
        mod = __import__(module_name)
      File "C:\Users\lampy\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\pribambase\__init__.py", line 32, in <module>
        from .sync import *
      File "C:\Users\lampy\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\pribambase\sync.py", line 22, in <module>
        from aiohttp.web_ws import WebSocketResponse
      File "C:\Users\lampy\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\pribambase\thirdparty\aiohttp-3.8.0-cp39-cp39-win_amd64.whl\aiohttp\__init__.py", line 5, in <module>
        from . import hdrs as hdrs
      File "C:\Users\lampy\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\pribambase\thirdparty\aiohttp-3.8.0-cp39-cp39-win_amd64.whl\aiohttp\hdrs.py", line 13, in <module>
        from typing_extensions import Final
    ModuleNotFoundError: No module named 'typing_extensions'
    
    

    Version info

    • blender 2.83
    • Aseprite any
    • Pribambase 2.1.1
    • OS win64 (any?)

    Additional context ouch

    bug 
    opened by lampysprites 1
  • Save As

    Save As

    • [x] sent a patch to ase that allows scripts to subscribe to filename change event (it already exists internally)
    • [x] patch got merged, now waiting for the next release that will include it
    • [x] use that functionality in the plugin

    Currently, name changes are handled with the next change in undo history

    bug 
    opened by lampysprites 1
  • Prescale Textures

    Prescale Textures

    Prescale can be used temporarily to make pixel snapping snap to half-pixels

    Prescaling is already implemented and used for reference images

    • [ ] choose when creating or opening a sprite
    • [ ] change for an existing texture (an operator?)
    • [ ] apply when receiving data from ase
    • [ ] undo before sending data to ase
    enhancement 
    opened by lampysprites 1
  • Name collision for same named layers.

    Name collision for same named layers.

    Reality When layer sync enabled, all layers with the same name are synced to the same image in blender.

    Expectation Layers in blender have separate images, same as they do in aseprite.

    Logs not relevant

    Version info not relevant

    Additional context Aseprite default names are like that when there's several layer groups. Use same .001 convention when creating 2nd+ image as blender uses everywhere.

    await blender 
    opened by lampysprites 1
  • UVMap image with no layer in Aseprite

    UVMap image with no layer in Aseprite

    Sometimes, syncing UVs multiple times. possibly along with undoing/redoing, makes the UVMap layer disappear in the layer list while the image remains on the canvas (can be moved and resized even).

    Even more strange, it seems that it got fixed with Reload All References for someone, which is completely unrelated operation but it could e.g refresh the list of textures in aseprite. Could have to do with lua hogging a reference to image?

    Perhaps a good way to deal with that would be contributing reference resizing to ase api, as right now it takes a specific sequence of illogical actions to achieve the required behavior of those.

    bug 
    opened by lampysprites 1
  • Sprites added as planes don't resize when the texture changes

    Sprites added as planes don't resize when the texture changes

    Shouldn't be surprizing for those familiar with blender, but as an option, it can be adjusted on sync, like e.g. action strips are. There's mesh and UV map to consider.

    enhancement 
    opened by lampysprites 0
  • Other software support

    Other software support

    Includes maya, blockbench, blender forks, krita, and whatnot.

    While a small portion of code can be ported, most functionality has to be reimplemented to account for the software structure. So the workload during development and testing grows by the factor of (raster editors to support)*(3d editors to support)

    enhancement 
    opened by lampysprites 0
  • UV Unwrapping

    UV Unwrapping

    The approach that I use/suggest for pixel-friendly unwrapping is a sizeble amount of information to digest. Part of that comes from needing to use a small bit of general purpose tool, which were created with a different goal in mind, then fixing the result. So it’s more akin to solving a weird puzzle.

    At the same time, this kind of unwrapping is very repetitive, and mostly consists of simple manipulations. Separating them into dedicated tools with a visual feedback will create a good flow that feels natural to beginners, and speeds up the process to everyone.

    It's a pretty sizeable amount of work starting at analyzing the workflow, but the potential benefits are huge

    enhancement 
    opened by lampysprites 3
Owner
null
A real-time dolly zoom camera effect

Dolly-Zoom I've always been amazed by the gradual perspective change of dolly zoom, and I have some experience in python and OpenCV, so I decided to c

Dylan Kai Lau 52 Dec 8, 2022
End-to-end pipeline for real-time scene text detection and recognition.

Real-time-Scene-Text-Detection-and-Recognition-System End-to-end pipeline for real-time scene text detection and recognition. The detection model use

Fangneng Zhan 89 Aug 4, 2022
Developed an AI-based system to control the mouse cursor using Python and OpenCV with the real-time camera.

Developed an AI-based system to control the mouse cursor using Python and OpenCV with the real-time camera. Fingertip location is mapped to RGB images to control the mouse cursor.

Ravi Sharma 71 Dec 20, 2022
This is a project to detect gestures to zoom in or out, using the real-time distance between the index finger and the thumb. It's based on OpenCV and Mediapipe.

Pinch-zoom This is a python project based on real-time hand-gesture detection, to zoom in or out, using the distance between the index finger and the

Harshit Bhalla 6 Jul 11, 2022
With the virtual keyboard, you can write on the real time images by combining the thumb and index fingers on the letter you want.

Virtual Keyboard With the virtual keyboard, you can write on the real time images by combining the thumb and index fingers on the letter you want. At

Güldeniz Bektaş 5 Jan 23, 2022
Opencv-image-filters - A camera to capture videos in real time by placing filters using Python with the help of the Tkinter and OpenCV libraries

Opencv-image-filters - A camera to capture videos in real time by placing filters using Python with the help of the Tkinter and OpenCV libraries

Sergio Díaz Fernández 1 Jan 13, 2022
OCR, Object Detection, Number Plate, Real Time

README.md PrePareded anaconda env requirements.txt clova AI → deep text recognition → trained weights (ex, .pth) wpod-net weights (ex, .h5 , .json) ht

Kaven Lee 7 Dec 6, 2022
Dataset and Code for ICCV 2021 paper "Real-world Video Super-resolution: A Benchmark Dataset and A Decomposition based Learning Scheme"

Dataset and Code for RealVSR Real-world Video Super-resolution: A Benchmark Dataset and A Decomposition based Learning Scheme Xi Yang, Wangmeng Xiang,

Xi Yang 91 Nov 22, 2022
This is a real life mario project using python and mediapipe

real-life-mario This is a real life mario project using python and mediapipe How to run to run this just run - realMario.py file requirements This req

Programminghut 42 Dec 22, 2022
Script para controlar o movimento do mouse usando Python e openCV com câmera em tempo real que detecta pontos de referência da mão, rastreia padrões de gestos em vez de um mouse físico.

mouserController Script para controlar o movimento do mouse usando Python e openCV com câmera em tempo real que detecta pontos de referência da mão, r

Vinícius Azevedo 6 Jun 28, 2022
Select range and every time the screen changes, OCR is activated.

ASOCR(Auto Screen OCR) Select range and every time you press Space key, OCR is activated. 範囲を選ぶと、あなたがスペースキーを押すたびに、画面が変わる度にOCRが起動します。 usage1: simple OC

null 1 Feb 13, 2022
A program that makes all 47 textures of Optifine CTM only using 2 textures

A program that makes all 47 textures of Optifine CTM only using 2 textures

null 1 Jan 22, 2022
Blender add-on for baking your scene to textures

Bake Scene This add-on bakes your scene to textures. This is useful in many situations: Creating trim sheets Creating decals Creating hair cards Creat

null 5 Sep 20, 2022
A Python library that provides basic functions to read / write Aseprite format files

A Python library that provides basic functions to read / write Aseprite format files

Joe Trewin 1 Jan 13, 2022
Connect-4-AI - AI that plays Connect-4 using the minimax algorithm

Connect-4-AI Brief overview I coded up the Connect-4 (or four-in-a-row) game in

Favour Okeke 1 Feb 15, 2022
PyNeuro is designed to connect NeuroSky's MindWave EEG device to Python and provide Callback functionality to provide data to your application in real time.

PyNeuro PyNeuro is designed to connect NeuroSky's MindWave EEG device to Python and provide Callback functionality to provide data to your application

Zach Wang 45 Dec 30, 2022
An implementation of "Optimal Textures: Fast and Robust Texture Synthesis and Style Transfer through Optimal Transport"

Optex An implementation of Optimal Textures: Fast and Robust Texture Synthesis and Style Transfer through Optimal Transport for TU Delft CS4240. You c

Hans Brouwer 33 Jan 5, 2023
Simple Python / ImageMagick script to package images into WAD3s for use as GoldSrc textures.

WADs Out For [The] Ladies Simple Python / ImageMagick script to package images into WAD3s for use as GoldSrc textures. Development mostly focused on L

null 5 Apr 9, 2022
Higher quality textures for the Metal Gear Solid series.

Metal Gear Solid: HD Textures Higher quality textures for the Metal Gear Solid series. The goal is to maximize the quality of assets that the engine w

Samantha 6 Dec 6, 2022