4
$\begingroup$

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:

$\endgroup$
1
  • 1
    $\begingroup$ Edited my answer to a method that supports moving boolean sources. $\endgroup$
    – Hulifier
    Commented Apr 22, 2022 at 19:06

1 Answer 1

5
$\begingroup$

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

$\endgroup$
1
  • $\begingroup$ Love your "move the hole" animation effect! Like the tax man moving the hole to empty my bank account of play marbles, LOL. $\endgroup$
    – james_t
    Commented Apr 23, 2022 at 15:49

You must log in to answer this question.

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