4

I am trying to model a pool table where the balls would fall into holes during play. If I create the Passive table object with boolean modifiers Difference with cylinder the RB-active spheres (balls) do not fall through the holes, whereas if I Apply the boolean, all's well.

enter image description here

Because I may want to resize or move the holes, I don't want to Apply the boolean cylinder holes.

Is there a way to coax the boolean to work with Rigid Body World or is this some limitation ?

Example:

james_t
  • 5,446
  • 8
  • 29

1 Answers1

5

On your mesh with the boolean modifier, change the collision source to final.

rigidbody source

If your boolean source changes, you will need to set the collision source to final every frame, I did that with python, the only way i managed to:

import bpy

every frame change, this function is called.

def fixRB(scene): ob = bpy.data.objects.get("Cube.001") ob.rigid_body.mesh_source = 'FINAL'

bpy.app.handlers.frame_change_pre.append(fixRB)

Result:

result

When you animate your boolean source, you will see all spheres behave incorrectly:

glitch

A workaround i found is to let all boolean modifiers disabled for the first two frames, then enable them after, you will need to remove those first frames from your animation after rendering.

glitch workaround result

Edit:

If you don't deactivate boolean modifiers for the first two frames, blender will crash when rendering.

keyframed boolean viewport display boolean modifier keyframes

I doesn't even need to be deactivated in render, but for some reason the viewport option affects the render:

Render with booleans enabled at the start

Hulifier
  • 6,048
  • 1
  • 8
  • 24
  • Love your "move the hole" animation effect! Like the tax man moving the hole to empty my bank account of play marbles, LOL. – james_t Apr 23 '22 at 15:49