The eagle-eyed among you may have noticed:
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31128
(i.e. revision 31128)
This commit basically adds support for using Blender's "Force Fields" in Rigid Body simulations. They are a way of allowing you to "sculpt" the simulation result. Here's a little illustration of effectors in action:
Before (running simulation) |
After (while simulation is running) |
In the meantime, go out and have fun with these new toys :)
[EDIT: 5:50pm]
For those curious about how this works, here's a little overview:
Blender already has a unified system for handling effectors. Basically, it takes all the effectors you're worrying about, and determines the "net force" (i.e. consider it grabbing a bunch of arrows pointing in different directions, mushing that together, and getting a single big arrow pointing in the direction that the combination of arrows were pointing before) for each "particle"-like entity it is asked to determine this net force for. This is then simply fed into Bullet as an external force that gets applied to the Rigid Bodies for whatever reason (the same thing happens with the other sims too AFAIK).
For anyone who's looking at implementing such support for another physics sim in future, have a look at rigidbody_update_sim_ob() in blenkernel/rigidbody.c, particularly the first block only (/* update influence of effectors - but don't do it on an effector */) as in the linked commit. I can't guarantee it'll still be there in later revisions, though it most likely will stay put :)
~~~
Also, while testing that earlier file again with a different build, I've been able to get things working quite nicely for a demo. So, without further ado, here's that file (shown in the screenshots above):
http://www.pasteall.org/blend/3347
And as promised earlier, a video demo of this in action :)
http://vimeo.com/13954183
Remember, you'll need one of the latest builds of my SoC branch to get that to work.
Looks promising!
ReplyDeleteContinue your excelent work.
Great developments Aligorith! Thanks for all your efforts.
ReplyDeleteDemohero.
Thanks for your work, it's very exciting.
ReplyDeleteI'm wondering if physics could be used with particles systems too?
E.g make a particle system that would emit some cubes that have physicall properties (collision).
isn't a rigid body less complex than a cloth/softbody? wouldn't it be simpler to use a native rigid body edition to the non realtime simulation set, than to water down the forces inputs for realtime bullet?
ReplyDelete