Particles and Armatures are an integeral part of some animations. A great deal of these particles and armatures can be tweaked by manipulating vertex weights. The trouble I had was that one can’t animate their vertex weights for their particles and armatures. And thus, my only option to animate these vertex weights was to educate myself in python and create a tool to handle the animation of vertex weights.
What this program does, is that it animates the vertex weight values for a vertex group. This can be accomplished by the use of os.environ to create and edit variables across multiple scripts and the use of a frame handler script which makes use of the environmental variables to do all of the dirty work of animating vertex weights.
How to use Vertex Weight Paint Blender:
- Run the main python script (not the frame handler) in Blender3d.
- Input the names of both the object and the vertex group to be animated.
- Move to the frame in which the animation would begin.
- Set up weight paint values and then click on the “Define Start” button.
- Move to the frame in which the animation would end.
- Set up weight paint values and then click on the “Define End” button.
- Click on the “Enable Script” toggle button to enable the animation of vertex weight values between the start and end frames.
Currently, the state of the script is in alpha testing. There are some errors regarding environmental variables and registering the frame handler script. If the blender community is up for the challenge of fixing such errors, the script would be able to provide its described functionality. Untill then, the script is only able to make uniform animations from 0% to 100%. User defined vertex weights are currently not possible as of yet. Also, one might need to manually insert the frame handling script into blender for vertex weight animations to take place.
Here is a video of the current script in action…
Here is a screenshot of the current interface…
Code to the script will be in later posts…
Code to Vertex Weight Paint Blender (Alpha) shall be inside a Zip file instead since it’s code is too large to post.
Inside the zip file is…
Readme - simply stating that the code provided is free to use and change and where to contact me related to the code.
WeightScript.py - This script is used to run the application and provides the user with a graphical user interface
FrameScript.py - This script runs in the background and does the work of animating vertex weights.
The link is to zupload.com, a free file host similar to imageshack.com
Just wanted to say that this is a really cool idea… Thanks for posting the script…
The movie was great - like grass growing.
You are welcome Mthoenes! I really felt that Blender3d was hardly touching upon particle animation. Since Particles can be shaped by Vertex Weights I really hoped that there would be a way to animate the vertex weights. And I’m sure that this script has more uses than watching the grass grow. The use of an animated vertex weight can also be used to manipulate armatures and if I’m not mistaken, shape keys. Imagine that besides watching the grass grow, you could make a werewolf or animate a haircut.
I might be a bit ambitious in saying that could be done. After all, the script is in its alpha stage. I’m encountering some major problems with reading from or writing to various environmental variables. Also, I cannot seem to be able to automatically register the frame handler script. I cannot really wrap my head around those two problems and I wish that there was some help in its development. That is why I have released this script for all of you to see it.
With those two problems out of the way, You may be able to…
- Define your own vertex weights for the start and end frames.
- Not worry about manually registering the frame handler.
The list is not long, but when those two problems are fixed, the features described above would make the script alot easier to use and more powerful. Is there anyone interested in making such a feature possible?
ok… I’ve edited the link. hopefully, it should work now.
It is saying the file is no longer available. I know this is an old thread, but I would really like to have it, maybe you should upload it to a more permanent file hosting?
I found a way around it. By animating the brightness of the alpha gradient I can make it look like it’s growing.
But in order to prevent ‘ghost’ hairs you must either:
- turn down the specular or turn off the specular gradient
- animate the brightness of the specular gradient along with the alpha gradient
- or add specular to the the alpha gradient
Because this is important to me, I have bumped this thread.
Howitzer - I thank you for your interest in this project. Unfortunately, I seem to have lost my code over time. bought a new computer and didn’t make backups XP
I guess that I could re-make the whole thing from scratch. As it was before, the whole project was a mess. I do still remember the essence in how it operated. And if you would like, I’d describe it here when I have the time. Python isn’t my natural language to program in. And it is still all foreign to me. I should spend some time re-learning the latest python and blender api and hopefully, I will get it correctly this time.
I would appreciate it if this project finds a more permanent residence for all to download. And it would be nice if I wasn’t the only one writing out the code.
As for your animation Howitzer, the script will handle more than hair growth. Its potential could also handle the density of the hairs and the use of a shape key. Specific regions could be morphed at a time. Adding animation to Blender’s particle set should have been done a while ago. Its been something I’ve always wanted and I wonder why not many people desire it.
Ah, well, good luck if you decide to remake it. I don’t know anything about Python.
Try to get it distributed in the official distro, that way it will never be lost and always be a part of Blender.