Git Product home page Git Product logo

blenderspriter's Introduction

BlenderSpriter (alpha 2)

Homepage/Screenshots:

http://jameskersey.com/BlenderSpriter

Description:

This script turns character animations into sprite sheets.

For each .blend file in the blend_files directory with a camera set up to point at the target object, it will run through all of the animations and output the animation in the listed directions into a 1024x1024 .png file.

Setup:

I'm running this with the 2.68a version of Blender and the included Python on Windows. I installed the Pillow image processing library in my installed version of Python3.3 and then copied the PIL and Pillow-2.1.0-py3.3.egg-info directories from the /Lib/site-packages directory to Blender's python/lib/site-packages directory

The config file has options for output path, anti-aliasing, and frame skipping

What you'll need to do in the .blend file:

  • Create an empty object called "Grip"
  • Set Grip as the parent of your camera
  • Set Grip as the parent of all lamps
  • Make sure the camera is set to Orthographic
  • Position the camera so that the entire object is visible and is as close to the edge as possible (accounting for animations)
  • Check the included player.blend file for examples

Running:

c:/Program Files/Blender Foundation/Blender/blender.exe --background --python RenderScript.py"

There is an ant script and .sh script included as well

I also had to do this:

set PYTHONPATH=%PYTHONPATH%;.

To get it to see the Stitcher.py file.

Output:

The output goes into the output directory, split into an images directory for the sprite sheets and a js directory for the JSON files with the animation lists.

Known Issues:

[ ] It only lets you fill one 1024x1024 page per .blend file

(Windows) I tried using an external version of Python 3.3, but I got the cannot import name: MAXREPEAT exception and couldn't get past it.

Further Reading:

http://www.blender.org/documentation/blender_python_api_2_61_0/info_tips_and_tricks.html

blenderspriter's People

Contributors

jkersey avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.