Blender to Sprite


it a bit over the top, yeah, but its an experiment with very smooth animations. i might reduce them later.
but 1 sprite is only 4kb so its not that big.




you can reduce the frames by half.
change in the script
for f in range(startFrame,endFrame + 1):
for f in range(startFrame,endFrame + 2):

check if you have the object rotationmask in the scene



i do not know why that is.
in blender 2.76 this line of code works.
try to copy this here:

camParent =['rotationmask']

maybe the ‘’ are wrong, or try “” instead.


Place this line where?


line 6 where the error is. replace it.
should be exactly the same, but maybe the copy pase via forum changes syntax.



import bpy
from math import radians
from os.path import join

S = bpy.context.scene

renderFolder = r"C:\Users\gertrud\Documents\GDevelop projects\Hunters\My project21\sprites\thief suit\noWeapon\yawn"

camParent =['rotationmask']

startFrame = 1 # replace with your start frame
endFrame  = 251 # replace with your end frame
numAngles = 4
rotAngle  = 360 / numAngles

for i in range(numAngles):
# Set camera angle via parent
    angle = i * rotAngle
    camParent.rotation_euler.z = radians( angle )

# Render animation
    for f in range(startFrame,endFrame + 2):
        S.frame_set( f ) # Set frame

        frmNum   = str( f-startFrame ).zfill(3) # Formats 5 --> 005
        fileName = "yawn_{a}_{f}".format( a = angle, f = frmNum)
        fileName += S.render.file_extension
        bpy.context.scene.render.filepath = join( renderFolder, fileName )

        bpy.ops.render.render(write_still = True)

try copy this and change the filepath again (line 7)


It worked and then blender crushed lol


blender should work still. check your folder where it saves. there should be pictures showing up.


Blender is rendering only 1 image then it stops working


ure sure? blender is not frozen anymore?


While it is frozen maybe that time it render that image then it crash


when i run the script blender freezes (looks like a crash) but is actually rendering the images. when the images are rendered blender runs normal again/defreezes
check the image folder, there should be more showing up.


if you want to just render all 8 angle per hand by yourself, you can do it of cause.
the script is just convenience to run overnight.

I am very glad for your help, and you can do it however you want <3


trying but seams it will crash again


let it “crashed” it should work anyway. let it open


yea it did …


i know how confusing that is. i was amazed to see it still working while beeing white frozen xD