Blender to Sprite


#41

The script rotate the camera only?


#42

Is all the frame has problems?


#43

the script rotates the block in the middle
and the camera and lights are children of the block.
so they should be rotated around the block.
The animation frames look good. i made a comparison render, and the light seems about right.
to use the script open the text editor.


#44

w8 let me check if the block rotate or not…btw why didn’t you tried to animation of cube rotation…instead of script?


#45

because i need to render the entire animation, before i start rotating.
the script is the best solution and works with all animations.
easier to change 1 number in a script then to time keyframes in relation to character animations.


#46

Cube not rotating in animation. Let me know the keyframe I can animate


#47

the script rotates the block, not the animation.
it starts to rotate the block 45 degrees after finishing the render.


#48

How did your script work after render finish? …
In here after render the it came to viewport again.


#49

import bpy
from math import radians

S = bpy.context.scene

camParent = bpy.data.objects[‘rotationmask’]

startFrame = 1 # replace with your start frame
endFrame = 251 # replace with your end frame
numAngles = 8
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 + 1):
    S.frame_set( f ) # Set frame

    frmNum   = str( f-startFrame ).zfill(3) # Formats 5 --> 005
    fileName = "yawn_{a}_frm_{f}".format( a = angle, f = frmNum)
    fileName += S.render.file_extension
    bpy.context.scene.render.filepath = r"C:\Users\gertrud\Desktop\runRoll"

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

copy this code, change the path in “” to your file location.
then click on run script. it will render the animation (251 frames)
then it will rotate the block 45 degrees and render 251 frames again.
it will repeat that 8 times.


#50

I am kinda confuse tell me step by step


#51

w8 you just want to rotate the cube right ?.. just tell me which frame to rotate and in which angle


#52

wait, no animation of the cube. just the script. it makes the rest much easier.
step by step incomming


#53

Are you writing an essay :hushed:


#54

assuming, you have not changed the camera position:

Step 1: Open the TextEditor.

Step 2: Copy the code: (strl + c)
step2_

Step 3: inside the text editor right click and paste the code (or strl + v)

Step 4: replace the filepath with the location you want to store the render result:
keep the r in front of the “” and replace the path inside the “”
step4_

Step 5: Run the script:


#55

be warned, this will render 2008 images and would take this pc 33hours (oha)


#56

Any pausing way to cool down the pc?


#57

Check the script


#58

i dont know. maybe split the render steps in 2 parts by changing the numAngles from 8 to 4

the scipt looks right. keep in mind that the rendersetup need to render from camera not viewport.


#59

btw 2008 image for a single idle animation … don’t you think that’s weird?


#60

Num Angle Ok right