16
$\begingroup$

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.

$\endgroup$
5

3 Answers 3

9
$\begingroup$

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.

enter image description here

  • 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:

enter image description here

$\endgroup$
4
  • $\begingroup$ Lol yes. I meant the magnetic toys. I meant to link, but couldn't figure out how exactly stack exchange handled linking. $\endgroup$
    – Starius
    Commented 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$
    – Starius
    Commented 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$
    – t8ja
    Commented Feb 16, 2020 at 13:50
7
+50
$\begingroup$

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.

$\endgroup$
4
$\begingroup$

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.

$\endgroup$
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .