5
$\begingroup$

I am relatively new to blender, and while I am pretty conversant with the main hard-modeling tools, I'm notso-hotso when it comes to physics. So I'm experimenting with some simple forms and interactions to get the hang of things.

Within my simulation, I have the following setup:

My basic setup

What happens is that, in the first few frames, the objects 'settle' (thank you gravity). Then, a number of frames later, the 'Cube Exploder' explodes. However, my simple sphere, which correctly obeyed the mesh-outline of the cube, just hangs in space instead of obeying the new reality of an exploded cube.

What's more, there's an odd discrepency between what I see in the viewport versus rendered mode.

Viewport

Just me in the 3D viewport in lookdev.

What I see in the viewport

Rendered

A proper render using the Workbench engine.

What I see when I render

As you can see, in the preview, the sphere actually enters the concave indent, whereas in the rendered view, it does not. In either event, both result in an explosion where the sphere does not respect the new cube-destroyed reality.

My objective is simply to cause the sphere to fall to the ground as the explosion is occurring.

Thanks for your attention.

$\endgroup$
3
  • $\begingroup$ This is very easily faked e.g. for video, but I take it that you're wanting this to happen as a single sequence physics exercise. I'm not sure it can without perhaps some scripting. Actually, I've got an idea, will be back... $\endgroup$ – Edgel3D Aug 14 '20 at 3:16
  • $\begingroup$ Heh. Oh wow, I didn't realize I'd be heading in a scripting direction... And yes, I'm hoping to execute some physics in a number of future projects. Nothing overly fancy (or so I thought) but yeah. Even if the 'faking' involves keyframes and then swapping out one shape for another. Or some such.. Thanks for any attention you can give. :) $\endgroup$ – DocBadwrench Aug 14 '20 at 3:22
  • $\begingroup$ Seems like sphere doesn't have enabled physics for render (camera icon). Cube is Explosion modifier, from particles, right? You should use Cell fracture add-on or better Fracture modifier for real shards. $\endgroup$ – vklidu Aug 14 '20 at 5:27
1
+50
$\begingroup$

This was done using pure physics as one contiguous sequence, no baking, no faking. If you want to make things a little easier, baking will allow you far more leeway when dealing with finnicky physics.

The Blender version is 2.77a, but it should behave similarly in 2.8+.

(Blend file below)

When put together the ball would not behave as required, nor would it sit properly in the dented cube when a bounce setting was added. As expected it would not fall to the ground after the explosion either.

The visible cube and ball in layer 1 were therefore purged of physics and a duplicate cube (in layer 2) added and given rigid body physics (passive) instead.

To bend Blender's physics behavior to what is required A 'Physics Box' was also used. (PH-box in the Outliner)
A Ph-box is simply an invisible substitute rigid body that can be any shape or size and located anywhere with respect to the ball, so the physics engine acts on the box, not the ball. The ball is parented to it outright. (CTL-P)

The box's Origin Point can also be located anywhere, giving you quite remarkable physics flexibility when compared to limiting physics to the ball itself.

It might be possible to obtain the behavior required without the PH-box but it's a lot easier with it.

The PH-Box is located at the lower surface of the ball.

The box falls to the cube as expected.

As is so often the case, when bounce and other factors are introduced, things can go awry as it did here so the ph-box & duplicate cube's bounce settings were keyframed to suit each stage of the sequence.

The duplicate cube was also lowered sufficiently to have the ball settle into the visible cube's indentation without needing to fiddle around with margin settings too much.

When the explosion occurs, the cube in layer 2 is simply keyframed (instantly) below ground so it's out of sight. The PH-box has no choice but to fall, taking the ball with it.

The box's bouncing was enhanced a little at ground level so it can be seen amid the debris flying around. (keyframed in the PH-box's physics settings)

Also note, with a PH-box, the ball (the child) can be animated slightly to shift lower on the way down so it's surface is at true ground level, negating the need to fiddle with margin settings etc.

Addendum -

Another version of the same thing, but baking physics at each stage, giving far more control over the ball's behavior...

$\endgroup$
2
  • $\begingroup$ This does appear to do what I'm aiming at. I just wish I understood it better. I've only been using Blender for the past three months so lots more learning is in order before I can make better use of this. Thanks very much! $\endgroup$ – DocBadwrench Aug 16 '20 at 22:44
  • $\begingroup$ 3 months? I know how you feel! I can elaborate as much as you need, so start at step 1 and when you meet a hurdle, comment here and I'll place more detail for that step. $\endgroup$ – Edgel3D Aug 17 '20 at 1:25
7
$\begingroup$

From OP is not clear if Explosion Modifier is requirement or you just went the way you know.


version Fracture Modifier

Primarily designed for this was Fracture Modifier (non destructive), but it is not included in recent official experimental builds. One build I found in early 2.80 version on Graphical.org so you can check.

enter image description here

In this example

  • Rigid Body set to all three objects (as you did)
  • Sphere increased to 10 kg
  • Cube - Fracture Physics Properties enabled Constraints with Breaking lowered to 0,5

With additional setup you can achieve explosion effect as well.


version Cell Fracture

Similarly you can achieve it with destructive way Cell Fracture add-on to generate shards + add Rigid Body, but with more manual setup. Destructive means - once generated you would have to care about a bunch of objects (sure they can be placed in one collection). In this example they are generated from Particle system, but you can use GreacePencil to draw breaks in your style.

enter image description here

In this example

  • add Particle System to Cube (Emit from Volume)
  • search for Cell Fracture (after you enable it User Preferences > Add-ons of course (usually useful to set some low Margin like 0.001, that creates gaps between shards so its more stable in later Rigid Body sim.)
  • Move Shards to Collection so its easier to manipulate with them or parent them to Empty
  • select Shards (with one active) and search for Rigid Body > Add Active
  • for explosion you don't need Constraints between shards, so I just animated Dynamic checkbox by keyframes (OFF/ON) on frame 45 under Physics Properties > Rigid Body > Settings panel (I just could not find how to do for all shards at once ... hm)
  • to let shards explode I used another Icosphere in center of shards as Collider Rigid Body – Static with animated Scale (and disable from visibility)

Note: When Cell Fracture was in golden age of 2.79 there was an another add-on Constraint Builder that generates connections between shards with breakability. But I didnt find any similar for 2.8x

$\endgroup$
1
  • $\begingroup$ These are good, albeit manual, methods to achieve what I'm aiming at. Sooo much more to learn... Thanks very much! $\endgroup$ – DocBadwrench Aug 16 '20 at 22:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.