I am using Animation Nodes' Object Instancer to duplicate an object with Rigid body settings. A far as I can tell, the physics settings are being duplicated on the cloned objects, but the physics engine is not recognizing the clones i.e. their outline is not green and the clones do not interact. Thanks.
Kudos to Jacques Lucke for actually providing the solution in the comments above.
There are two conditions for an object to be considered in rigid body simulations:
The object has to include the actual settings for physics, accessible in the Physics tab of the Property area.
If you use Animation Nodes' Object Instancer to duplicate an object which already is set up for rigid body physics, then these settings will only be duplicated if Copy Full Object is selected.
Blender does only simulate objects which are in a special group called Rigid Body World. Enabling rigid body physics on an object in Blender's native interface does automatically create such a group, assign it to the scene (visible in the Scene tab of the Properties area) and add the object to that group.
Duplicating an object with Animation Nodes however does not copy that group information. Instanced objects have to be manually added, e.g. with the Object Group Operation node.
To add all instances of an object:
- Press Shift+A in the Node Editor and select Subprograms > Loop to add a Loop Input node
- Click on New Iterator and type
- Press Shift+A again to add the Object > Group Operations node.
- In this node, click on the empty field of the first input node and choose the Rigid Body World group, named
(If this group doesn't exist yet then you have to assign physics to some object first.)
- Connect the Object output of the Loop Input node with the matching input socket of the Object Group Operations node.
- (The Linked checkbox has to be enabled to add the objects to the group, but it should be by default.)
- Press Shift+A again, select Subprograms > Invoke Subprogram > My Loop (or however you might have called it) to actually use the loop.
- Connect the Objects output socket of your existing Object Instancer node with the Object List input socket of the Invoke Subprogram node.