Friday, July 12, 2013

How to make a spiral in blender ..... spin one vert with screw modifier, make it spiral with the latice modifier, apply all modifiers and scale on the z axis to 0 to flatten ... that it!

Saturday, August 4, 2012

Post Blender Scripts in Blogger

To post blender scripts in blogger add this code just before the <html> tag in your blogger template html.



















Now you must change all greater and lesser sines in your python code as your browsers will see them as starting and ending tags.

Replace all < symbols in you code with &lt;
Replace all > symbols in your code with &gt;

You can do this very easily with any advanced text editor like NotePad++
 http://notepad-plus-plus.org/
Just look for The Search or Find and Replace feature.

Now when making a post edit your html and use the pre tag to wrap your python code in like this :
<pre class="brush:python">

import bpy
#the rest of your python code goes here

</pre>


Python Controled Animation



Hitting the animation button thrue your python scrip is really easy ...
import bpy
bpy.ops.render.render(animation = True)


But this leaves your script completely out of the loop

What if you want to change things in your animation
with your script, without the hastle of scripting in key-frames....
key frames are often convenient for humans but not for humans writing scripts lol

Here is a scrip that renders on frame of your animation at a time and advances to the next frame
all on its own .. your scrip is back in the animation loop.

     

import bpy  # python imports a library of commands used to control blender

# LIST OF VARIABLES / PARAMATERS 
Start = 1  # Frame the animation will start on
End = 20    #Frame the animation will end on 

# MAIN PART OF SCRIP BEGINS
for i in range(Start, End):    # i will grow from Start to End by one each time the indented text below is caried out 
     bpy.data.scenes[0].render.filepath= ('C:\\Users\\rylangrayston\\Desktop\\bpyoutput\\' + str(i) + 'a.jpg')  # this sets the path and file name where each file is saved + str(i) + adds in the string equivilant of the intager i 
     bpy.data.scenes[0].frame_set(i) # this sets the animations frame to the falue held by the variable i 
     bpy.ops.render.render(write_still=True) # This renders the current frame 
     #Here you can add code that changes your animaion each frame 
     #If you have put key frames into blender buy hand they will show in the animation
    

    

Code works in Blender 2.63 Be sure to change the file path on line 10 to something that works one your computer

Animated Textures Key Frame Textures In blender




In this video tutorial you will see how to key frame a textures location so that the texture moves on the object its textured to. In this example it will give the effect of looking a bit like water.
The first video is the tutorial the second video is the rendered result.