Is there a way to create magnetism in Blender? Using the physics engine or the game engine, I want to create BuckyBalls (the magnetic toys) within Blender.
-
$\begingroup$ Yes, magnetic forces are certainly possible with Blender, but I'm wondering what this has to do with Bucky balls? $\endgroup$– GwenCommented Jun 30, 2013 at 1:09
-
$\begingroup$ @Gwenn A quick google search reveals this.. google.com/search?q=google+bucky+balls $\endgroup$– gandalf3Commented Jun 30, 2013 at 1:25
-
$\begingroup$ The 2.66 release-logs included a nice video showing rigid body simulation's support for force fields. $\endgroup$– AldrikCommented Jun 30, 2013 at 1:27
-
1$\begingroup$ @gandalf3 Oh, apparently there's also a kind of magnetic toy called BuckyBalls, not the carbon nanomaterial. The OP's probably referring to the toy. $\endgroup$– GwenCommented Jun 30, 2013 at 2:48
-
$\begingroup$ Some more or less related fun: blendernation.com/2016/04/23/bge-katapult-simulation, blendernation.com/2016/05/01/… $\endgroup$– SamothCommented May 12, 2016 at 12:31
3 Answers
Assuming that you are indeed referring to the magnetic toys and not the carbon nanomaterial, then you have a couple of different options.
- Technically, you could model the magnetic attraction between all of the individual balls by using Blender's Force Field physics. You can enable this physics simulation in the Properties> Physics menu. However, this would be very inefficient. Since the magnetic attraction between these balls is so strong, they're almost always touching each other directly and you would hardly see any effects of the simulation.
- Instead, you can just model the balls themselves, and keep most of them touching each other.
If you only have a few of them, it's probably fastest just to control their movements by hand. However, if you need to animate them more efficiently, you can use a combination of Array modifiers (parented to empty objects for convenience) and Transform/Relationship constraints as appropriate to keep the right balls locked to each others surfaces.
BuckyBalls:
-
$\begingroup$ Lol yes. I meant the magnetic toys. I meant to link, but couldn't figure out how exactly stack exchange handled linking. $\endgroup$– StariusCommented Jun 30, 2013 at 7:54
-
$\begingroup$ I appreciate your answer. This has helped me research further into what I am wanting to do. Thank you. $\endgroup$– StariusCommented Jun 30, 2013 at 7:55
-
1$\begingroup$ Could you expand your answer on how the force field should be set up? I tried adding a force field to two active spheres, but they do not move, so the setup seems non-obvious to me. Thank you! $\endgroup$ Commented Apr 26, 2016 at 13:08
-
$\begingroup$ Suzanne, exactly my thoughts. Non-obvious. I posed a fresh question, maybe you can answer it if you found a satisfying answer. $\endgroup$– t8jaCommented Feb 16, 2020 at 13:50
The only possible way as of 2.77a is to write your own engine for magnetism in python. The hint how to do that as an addon is here:
Create custom physics for an object with python
Explanation why it is not possible:
A Force field cannot be a Rigid body actor, so they are only passive in the scene and cannot move by themselves. Force fields do not act on each other. Parenting force fields on rigid body actors creates a dependency cycle.
A Magnetic force field is not what you think it is, it only acts on moving particles. Every force field effects all particles or rigid bodies the same except Charge force field. That is why only this one comes in mind, because we want to attract one kind of magnetic pole and repel the other kind. But Charge force fields work only on charged particles and you cannot constrain 2 particles to behave like fixed pair and be a magnetic dipole.
If you actually want to simulate the magnetic forces, you could use a Force or Magnetic force field with rigid body simulation.
you would need to use force field empties parented to the rigid bodies, as it seems force field objects are not effected by other force fields..
also particles with a self effecting force could work, or also with a magnetic force field.
-
3$\begingroup$ Can you add some more detail to your answer? $\endgroup$ Commented Jun 30, 2013 at 12:32