3
$\begingroup$

I'm trying to animate a cross section for a complicated object. I'm doing this by using a difference boolean modifier on the object and then sliding a cube into the object. The results look very nice, but blender basically grinds to a halt when trying to calculate the boolean.

This is easily reproducible: just create a cube, add a subdivision surface, increase to 6 subdivisions (makes a sphere), add another cube, and add a boolean modifier to the first cube. Try to move one of the objects across the other one and observe the incredible slowness.

I've tried to decrease the number of vertices and faces in my scene, but it's a complicated object, so I cannot get much below 100k vertices.

There are some other methods of generating a cross section (using nodes, or camera clipping plane), but I like the look of the boolean which produces nice, closed objects instead of open ones.

Is there any way to speed up the boolean?

EDIT: to be more specific, I'm not really looking for a cross section, but more of a "cutaway view", as described in this post.

$\endgroup$
8
  • $\begingroup$ This could be of use to you: Bool Tool $\endgroup$ Commented Jun 16, 2014 at 1:14
  • $\begingroup$ I tried the Bool Tool, it is very nice and very fast. However, I think that it is a "one time" tool, and not the modifier that I would need for an animation. Unless I am misunderstanding how it works... $\endgroup$ Commented Jun 16, 2014 at 3:19
  • $\begingroup$ Do you really need 6 subdivisions in the viewport? (even for the render it seems a lot to me..) $\endgroup$
    – gandalf3
    Commented Jun 16, 2014 at 4:14
  • $\begingroup$ You're right, I don't need that many subdivisions for a simple object. But I just wanted to give a quick example of how slow boolean can be for an object with ~2,000 vertices. $\endgroup$ Commented Jun 16, 2014 at 13:56
  • $\begingroup$ I don't think there is really any way around this, heavy meshes will increase computation time. AFAIK bool tool is just a usability/workflow improvement for using the same old boolean modifiers. If you use the brush options of bool tool, it won't apply the modifier immediately, so you can move things around and it will still apply. $\endgroup$
    – gandalf3
    Commented Jun 16, 2014 at 20:27

2 Answers 2

8
$\begingroup$

You can achieve a much much faster cross section effect (almost real time) by using a simple mesh circle with a Shrinkwrap Modifier.

Demo

To set this up:

  1. Add a mesh circle (Add > Mesh > Circle) with at least 64 verts.
  2. Scale the circle so it's bigger than object you want to slice, and position it so that the center of the circle is at the center of your object more or less.
  3. Add a Shrinkwrap modifier to the circle object and set the Target to the object you want to slice into cross-sections.
  4. Set the Shrinkwrap mode to Project, and toggle both the Negative and Positive Direction on.

That's about it. You can move the circle up and down to see the cross section effect. You can hide the target object or move it to another layer to see only the cross section.

You can add depth to the circle and make it renderable by adding a Skin Modifier.

If the Shrinkwrap modifier is misbehaving, try to scale the circle or change its center position.

Here's how it looks with Skin and Subsurf modifiers added, played in real time in OpenGL: Demo OpenGL

$\endgroup$
2
  • $\begingroup$ Wow, this does seem quick, but I'm not sure if it's exactly what I'm looking for. The effect that I would like is to cut away half of the object to reveal what is inside. Much like this question: blender.stackexchange.com/questions/6550/… $\endgroup$ Commented Nov 10, 2015 at 5:23
  • $\begingroup$ I see, that is trickier. Might want to try achieving this through shading (mix between your regular shader and a transparent shader in cycles, and animate a ColorRamp node as the mix shader's factor). Example here: blender.stackexchange.com/questions/27797/… $\endgroup$
    – TLousky
    Commented Nov 10, 2015 at 7:28
1
$\begingroup$

Faster boolean operations are possible via external software. Not a problem at all since Python allows for a lot of magics.

Here's an example on how to use (open source) Cork with Blender: http://arc-team-open-research.blogspot.com.br/2014/10/boolean-operations-powerful-cork.html

Cork seems to better (and faster) handle high tesselation meshes. You then only need to retrieve the .off result with the Blender OFF add-on.

$\endgroup$
3
  • $\begingroup$ Is there a solution with cork for an animation, not only a 1-time bool operation? $\endgroup$ Commented Nov 9, 2015 at 13:24
  • $\begingroup$ Yeah, the method demonstrated in that link seems very cool, but looks like it would be difficult to implement for an animation. $\endgroup$ Commented Nov 10, 2015 at 5:25
  • $\begingroup$ Well, if you're looking for a fast alternative, I already asked for it here blender.stackexchange.com/questions/39962/… Either you choose to do boolean operations on meshes or on rays. $\endgroup$
    – nantille
    Commented Nov 10, 2015 at 14:24

You must log in to answer this question.

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