Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Desert consists of two parts.

The main library is simply called Desert. It is a CUDA accelerated library for sandpainting:

The second part is called Erosion. A Redis-based client and worker that can accept and draw Desert primitives and commands encoded as JSON objects. That means that you can use the Erosion worker from any platform as long as you can construct JSON and send it to a Redis queue. Eg. if you want to program in a different language, while still having a fast drawing engine that benefits from CUDA.

I've written a little more about the library here:



Use the install script:


This will use setuptools to install python libraries desert and erosion. As well as a terminal util called erosion. It will be available as ~/.local/bin/erosion if you installed with the script.


There are some examples in ./examples.

To use Desert via Python as a local library, see:

To see how Erosion works, you can run this command (from ./examples):

./ && ~/.local/bin/erosion worker --path ./ --show --vv

This will first send some Desert primitives to the Erosion (Redis) queue. Then it will run the Erosion worker, which draws those primitives. Finally it will save the resulting image.

To see how the Erosion terminal util works:

~/.local/bin/erosion -h


This code is developed on Ubuntu 16.04 LTS. I imagine you will be able to get it running on Mac as well.

The library depends on the CUDA toolkit (8.0), Redis (if you are using Erosion), and a few Python (3) packages. If you install using the install script, the python packages will be installed automatically.

On Use and Contributions

This code is a tool that I have written for my own use. I release it publicly in case people find it useful. It is not however intended as a collaboration/Open Source project. As such I am unlikely to accept PRs, reply to issues, or take requests.



  • Circle: varying rad
  • Box: varying size


If cuda is not working try sudo ldconfig. and check $LD_LIBRARY_PATH