I created a force field, after enabling the “animated” button under effects, I got the partcles to move as I moved the force field around.
But there is a problem, when I tell the force field to move (from one location to another) from frame 01 to 20; The location of the force field of frame 01 and frame 20 act on all frames. This is the image I got for all the 20 frames.
I decided to take a less drastic approach at animating static particles, after reading that I could “IPO-ize the strength of the force field, and the distance.” I tried just that. Same story, the strength of the first and last frame is combined (in a strange way) and is used on all frames, thus no animation.
I hope this is not a bug, and just something I missed. Please Help!
[update] - The python script didn’t help… Is there a way to delete the “pre-calculated” position of particle, and recalculate (or start a new calculation) at each frame?
I used it as a world script link, with framed changed event.
Ok so its a hack… So heres how to use it…
Animate a empty That does not have any effect on the static particles. This is called “Cube” in the script… At this point rotations don’t do anything… Not much to change tho in the python.
Then add a empty that has force or wind or whatever. dont animate it… It won’t work if you do. Its called “Effector” in the script.
The static particles come from a object named “Parts” …
If you use different names then you will need to change them.
Now each frame the effector is moved to the “cube’s” postion and the particles are recalulated each frame.
If you know python then you can change the script to your needs.
If you don’t you can ask nicly… But i’m pretty bussy… so i would’nt hold your breath.
I don’t have good access to a host. I have a tank tut as well and looking to host that somewhere… Some free hosting site either require me to sign my life away or has really small bandwidth restrictions.
BTW, have you tried going the other way and animating the “parts”?
[edit] I tried, but am having problems. No matter where I move the “parts” it pretends that it’s at the 0,0,0 location and deforms to the force field as if it was there. Is there a way to define this “particle origin”?
It worn’t for the the same reasons. So you add a few lines to the script to dd kinda the same thing.
Don’t animate parts. But animate some empty, the script at each frame copys the “parts” object to the empty (and rotation as required). ie just like it does for the effector.
Then it recalculates static particles just like it does now.
Again, this can be made into a sliglty usefull script without too much difficulty. But i’m behind on work at the momnet.
I’ve been trying to all day. Animated or not, the particle position is based on the 0,0,0 location. The force field affects the particles as if they were at that location.
BTW Delt0r, don’t worry about my dumbness now… Your job is more important.
Well i already did try… Mainly cus i want to do it.
But yes its based on the frame 1 postion. There are one or 2 things that can be done however.
Transfrom the Effector to the correct 1 postion. Let the script work out where that is… And bobs you uncle --That would work… Softbodys mite be a better choice however.
Leave the empty (the force field) where it is, and move the mesh (the static Particles) around. Then “RecalcAll.” Notice that the position of the static particles, as individuals didn’t change.
I believe there is a solution, but before I start writing this huge script (I thought out in my head.) I just want to confirm that this isn’t just a little button I forgot to enable in blender.
I don’t think so --Theres a Animate button under the static button in the particles options. But i can only get that to recalc animated textures, ie when theres texture effects in the particles.
I Played with this heaps earlyer this year, and i think script is the only way to go, Assuming that softbodys is just not a option.
import Blender
force = Blender.Object.Get("Empty")
parts = Blender.Object.Get("Mesh")
# Temp Location for Force
x = (parts.LocX - force.LocX) * (-1)
y = (parts.LocY - force.LocY) * (-1)
z = (parts.LocZ - force.LocZ) * (-1)
# Real Location
oldx = force.LocX
oldy = force.LocY
oldz = force.LocZ
# Switch to the Temp Location
force.setLocation(x,y,z)
# Recalculate Parts
parts.buildParts()
# Switch Back to the Real Location
force.setLocation(oldx,oldy,oldz)
Now you can just simply animate the location of mesh.
Now to work on the rotation aspects of it. Does anyone know how to rotate (or orbit) an object around a certian point, with certian radius, angle and direction (XYZ) using python? I mean is there a function for this?
Ahhh!! Spent all that time for nothing. Anyways I found another to do it.
When you parent an object to another, and rotate the child, the parent orbits the child. So I’m just going to copy the location of the parent. So simple!
import Blender
cube = Blender.Object.Get("Cube")
force = Blender.Object.Get("Force")
cubeEMU = Blender.Object.Get("EMU")
empty = Blender.Object.Get("Empty")
# Rotate cubeEMU, based on cube Rotation
cubeEMU.RotX = (cube.RotX * (-1))
cubeEMU.RotY = (cube.RotY * (-1))
cubeEMU.RotZ = (cube.RotZ * (-1))
# Find real location of empty
def reallocation(mat):
mtx = [list(mat[0][:4]),list(mat[1][:4]),
list(mat[2][:4]), list(mat[3][:4])]
a = mtx[3][0]
b = mtx[3][1]
c = mtx[3][2]
return [a, b, c]
mat = empty.getMatrix()
# Set force Location
force.setLocation(reallocation(mat))
# Rebuild cube or particles
cube.buildParts()