|
||||||||||||||||||||||||||
Author : sushil Ronghe Education :M.S. Pharmacoinformatics Pre-Requisite - You should be a medium to high level blender user,as well as has some experience with python For whom - Those who want to programm the Blender.Ipo Claim : After reading this tutorial you will be able to create a complex animation in complex environment where it is impossible to draw the curves (curve fallow) or set the keys for object or bones Aim : Makeing blender worlds most popular software in this field | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
Playing with Action | ||||||||||||||||||||||||||
I hope you know enough about this kind of programming and a basics of blender as well as you have installed the latest version of blender and python scripts are working fine on your Work station | ||||||||||||||||||||||||||
Ipo (Interpolation) | ||||||||||||||||||||||||||
first thing you have to believe is ,curve is not exactly curve it is a set of lines drawn or approximated to look like a curve. As the 3D world in computer is not 3D ,because the screen is flat.These are some of the intrested thing i learn during OpenGL days of mine. So coming back to curve there are number of ways to approximate the curve some of these methods are very famous like You can get a complete book on mathematics involved in geometric modelling if you search on google,that much knowledge is not essential.but recently i have come across a good quote,"There's a huge difference between what a skilled artist and someone poking at buttons and using presets can accomplish."If you need any help in this regard ,go google.Ok so let's Start What is Object? Object is instance of the datatype,that can be built in or created by the programmer. Blender has so many objects,But the programmers who were involve in blender design were intelligent enough to understand the need to create a module called Object. Blender documentation has a good explaination of these Object. Blender.Object in python is associated with a ipo object,every ipo is associated with number of ipocurves of different type. Some of the times i find the word channels for these curve types | ||||||||||||||||||||||||||
Blender ---> Object---> Ipo --->IpoCurve | ||||||||||||||||||||||||||
Getting familier!! open up Blender and "AKEY" "XKEY" "Enter" now add one cube named it as a Rony. switch from model to animation window.Look at the ipo window all those names arrenge in a column are the ipocurves. LMB on LocX and add 5 key at frame (CTRL-LMB) 1 , 5 , 10 ,15 , 20 at values 0.0, 2.0 , 4.0 , 6.0 , 8.0, What is your intension ronghester ?? I just want to move rony on x-axis.Now Alt -A and you will see the animation is going On. Now we will first talk with blender to get familiar with this IPO | ||||||||||||||||||||||||||
<--!script-->
| ||||||||||||||||||||||||||
Run the script,what happend,you got the numbers back you supplied ! now change the for loop range function to look like this
range(0,21,1) run the script you will get the numbers which we have never supplied to blender,this is the
approximation.<>Here is the short explaination,when we input the number at particular time these are consider as a control
points ande it get approximated to form the curve <>. Now after for loop put this line posX[25] = 0.0 # Please bring rony back to home this means we have set one more control point for the curve posX which represent the location X of rony. the index 25 means at the "25 th frame" .Now see the ipo editor you will be surprised to see the curve is extended to the point we have specified. Now "ALT A" the animation will extend upto 25 frame.You must have to understand what you have done,because this is the power of blender. Let's discuss, It is intresting to note that the curve has [] operator,we can't imagine how much imagination the programmers has put into this software during development .In this case we have taken up a curve from blender means backward way,now we will go forward way (Means we will create a curve and then set it in blender. Once you have finished with this you are ready to make a very complex animation in very complex world. Be brave! again select all and delete add a new cube named it Rony. And understand the fallowing script,put it in blender and run,,,Viola | ||||||||||||||||||||||||||
<--!script-->
| ||||||||||||||||||||||||||
We have created the 2D spiral animation for our hero Rony,entirely by script,see the ipo editor the curves are
there.Here onwards use such script to animate the objects,once you get into this business you will find this very usefull,and owe
me a beer in a blender WC! .If you think this,can be done without scripting
You are correct,but you are denying to accept the power blender wants to give you,as well as not respecting the efforts blender
developer has made. # :~ Spinning Spinning means rotating about itself,like fan also the wheel can be animated with Spinning.Example the fan of helicoptor.Here is helicoptor 'Eagle' we have to animate the fan as it moves in general. first let's consider Eagle is made up of 2 object do fallowing step by step, Infact one can make a function,which will take up the argument for Object,Upaxis,angle,and frame . when ever you have to apply spining for a object,just run your function with the arguments that suit best for the underling condition.Here is one such function. | | <--!script-->
Let's animate the Circular Motion, You must have learned this in you physics class, When i discovered the beauty of IPO in Blender python i thought for what kind of animation i can use this? Very first thing came to my mind is circular motion, we all know electron is revolving round the nucleus what if electron become lazy and nomore want to revolve it will slowly get into the center of atom,let's animate this!.i will include the script for this ipo menace for other software in the world.The script can take up object provided with axis ,and angle as well as number of frame etc.One can use this script for many purpose, | | <--!script-->
| Now i think one can undetstand the script easily.it is only for the 2 axis,but it can easily be extended for Z
axis,i will like to give this as a assignment to you.<>One more intresting thing you can create a butterfly by using this script.<>
The ipo curves will look like this intresting and it is created in just a second,if you do not include the typing time in this.
this shows the object is coming spiraly towards the origin and then going back to his home by using the same path.
Now can you draw this curves by hand?.if you run the script and develop such graphs by your own then you can see this is
amazing! the figure first of for the "movingIn.py" and "two for movingInandOut.py" <--!script-->
moveIn.py |
|
moveInandOut.py |
|
End Note Ref : Comments and critics are highly appriciated,I will also include the scripts for making an actions like walk, jump,kick and all those body movements human know,But everything in world requires time, as i have this template ready i don't think it will require most effort let's see. Happy Blendering |