Need some help animating a mechanical diaphragm

Hello!
I have searched high and low trying to find a solution and so far have come up empty-handed. I am trying to realistically animate a speaker. The speaker has three parts that need to deform; Surround, Spider (wavy diaphragm), and the Leads. I am not super experienced with animating, so this could be much simpler than I am making it out to be. None-the-less, this has turned into a roadblock for me. I am open to using simulation if that may be a better solution. Any help would be greatly appreciated!

I have a few videos of a real speaker to show what I am trying to achieve, but as a new user, I wasnā€™t able to post them.

Iā€™m afraid I donā€™t know all those terms. Some searching lead me to the idea that a spider is a coiled spring, not a diaphragm, so itā€™d be best to hear what you mean.

An example of an animation youā€™d like to make would be helpful.

It seems to me that the biggest hurdle is, you probably want to show the speaker playing music or something, and thatā€™s, uh, way more insane in Blender than it sounds. Youā€™re rendering frames, maybe 60 per second; that gives you two samples per wave of a 30hz tone! So no shape to that wave, and anything higher frequency and you just have sampling artifacts like crazy. And the motion is complicated, not a simple spinning wheel or helicopter blade; Iā€™d be really surprised if motion blur was going to cut it. I donā€™t know how Iā€™d approach that problem personally. Maybe compositing a thousand slices, weighting by the integral of the wave over that time interval? It would probably involve some very non-traditional, hacky techniques.

1 Like

as bandages says, nyquist is gonna be your limiting factor here (1/2 frequency of frame rate, in this case) you .could. render far more frames, say 200 fps (which would ā€˜captureā€™ up to 100hz tones somewhat accurately), but youā€™re still in the deep base range with thatā€¦ you can extrapolate from there. also note that most audio will not give you full excursion of the coils (travelling to itā€™s limits ā€¦ which would likely damage an irl speaker anyway).

are you trying for realism? or is your video just need to portray the idea that the speakers are making noise, in which case, just play with the settings to make it look good to your eye. :slight_smile:

when you do go to animateā€¦ the way >iā€™d< approach it (and thereā€™s many ways of doing this), is a pair of shapekeys, one with the speaker fully ā€˜outā€™, and one with it ā€˜inā€™ (within reasonable limits, ofc)ā€¦ this could even be done with just one shapekey, and then apply it both positively and negatively (assuming rest position is in proper center). then you drive the amount the shapekey is applied based on whatever youā€™re using to drive the animation.

so: Shapekeys and Drivers would be what to look at next, if you go that route.

1 Like

Thanks for the replies!

Yea, I knew that it was going to be tricky from the get go. I took a few videos to show the movement I am looking to achieve. Iā€™ll post them below. There is definitely going to be some experimentation!

I havenā€™t played with shapekeys yet, ill experiment with them a bit. I am completely in the dark on drivers, iā€™ll need to do some research on them. Thank you guys for the suggestions so far!

Here are some explanations of the parts.

The Surround is the half-roll on the front of the speaker that connects part of the motor assembly (cone, coil former, and voice coil) to the basket (the outer part of the speaker). This helps damp and control the linear movement of the cone. These are generally made out of thin molded rubber or foam.

The Spider is a solid diaphragm, generally made from a treated fabric and molded into a kind of radial accordion shape. It makes up the second suspension point of the linear motor. Its purpose is also to damp and control the movement of the assembly.

The Leads are just braided copper wires that carry the electrical AC signal to the voice coil that interacts with the permanent magnet structure. In my model they are attached to the spider, but are often free floating.

The surround spider, and leads are attached to a static structure on one side, and a moving structure on the other side, with the deformation happening between the two.

I did try to use rigging and got kinda close, but the problem I run into is the radial nature of the spider and surround. I am having a problem with having an even, linear effect of movement on the X axis. Luckily, there is only one axis of movement that I am trying to achieve.

The video links:

basically with shapekeys, youā€™ll use edit mode to modify the mesh yourself to the full out positionā€¦ blender can then interpolate between the two based on the ā€˜amountā€™ of the shapekey you apply. this lets you use the normal edit tools to modify the speaker parts into place (moving the cone/coil on the x axis, deforming the spider on x, probably with the proportional tool, etc), avoiding any fights with rigging, or weight maps to control the rigging, etc.

Seeing the animations, I agree that shapekeys would be a good fit for the spider and surround. They move in a single axis, linearly at least as far as I can tell, in proportion with the motion of the cone. So you can model them in two positions and just interpolate between them based on the position of the cone (probably, directly from whatever control youā€™re using for the cone.)

It would still be easy to do with bones (itā€™s just, radial weights; you could use radial gradients, or manual assignment, or vertex weight proximity modifier targeting the center), but if youā€™ve already modelled this stuff, then you should be comfortable with modelling them in a different position in a shapekey.

For wires, the main thing is that you need to preserve lengths while bending. Shapekeys are not appropriate for this. So model them in a slightly bent position and use IK with rotation:

Because the chain excludes the first bone, and it enables rotation, the first and last bones in this chain will maintain their orientation to the parent of the chain and the parent of the IK target, so they wonā€™t bend out of their socket. The weights are just autoweights.

If you want to learn the weights for this, hereā€™s a radial gradient:

Iā€™ve selected the gradient tool, then Iā€™ve specified a linear falloff and a radial type of gradient. I can click in the center of the circle and drag my brush to create linear weights. To change the center of these, I might use a custom curve falloff, or I might use a ā€œlevelsā€ operation in weight paint to add+multiply to the weights. I can use a vertex weight edit modifier with a custom curve to change these from linear weights to something else (probably, tuning to eye.) These would be weights to the cone; I can assign to root and then normalize all with locked cone, unlocked root to build root weights that are the inverse of cone weights.

Animate a speaker for what? Do you know you can bake audio to an f-curve ? F-curve being the curve shown in blenders graph editor. So a shapekey or keyframe can have the f-curve of its motion set to track the audio. Or more exactly the frequency slice of the audio frequency you choose to bake to the f-curve.
If that is what you want then search for bake sound to f-curve and check the blender.stackexchange and youtube results.
Graph editor > Channel > Sound to samples - is what bake to f-curve is called in the latest blender version.

The wires could be given a curve modifier to make them follow a curve. Add hook modifiers to the curve & you can also bake audio to a hook or two to make the wires twitch to the audioā€¦ Or use the hooks to do standard animation.

If it helpsā€¦ In the Dope sheet window you can change Dope Sheet in the Header Bar dropdown menu to Shape Key editor. Then you can tweak their timing etc ifw you need to.
In the graph editor / dope sheet etc do a right click and select interpolation mode. That gives you effects to add to selected keyframes - like bounce, to show diminishing vibration.

So do what the others discuss - then do this stuff in my comment to automate its motionā€¦

Thank you guys again for the suggestions!

After playing around with proportional editing, I think the shapekeys might do the trick, or at least get me closer!

Thank you KDLynch for the video! (I can only @ 2 people apparently)

@bandages I will spend some more time figuring out weights. I knew about the radial gradient, but I just started messing around with weight painting within the last week, and there is a lot to learn and understand. Iā€™m sure itā€™s pretty powerful once you get your head wrapped around the concept.

@Matakani I did watch a video on that just the other day, and honestly is what intrigued me to try and animate the speaker. Originally, I built the model just for static rendering.

Iā€™ll try to remember to post the final solution I come up with for anyone else that may be interested.

2 Likes

Maybe, yeah. Thereā€™s also not that much to understand about weight painting: you give a bone more influence over a vertex, it acquires more of its position from that boneā€™s transform. I really concentrated on weights when I started (in a different application) and it was kind of miserable and discouraging, because I didnā€™t realize that weight painting doesnā€™t exist in a vacuum; that many times, better weights wonā€™t solve the problem, because that problem is that you need more bones, or bones that are posed differently, or different mesh topology. If you want to animate anything, you should learn some weighting-- not necessarily weight painting, there are a lot of ways to do things-- but just be careful that you donā€™t think that itā€™s the solution to all animation problems (like I did, for too long.)

Thank you for the advice! I spent hours with weights and bones and just wasnā€™t getting what I was looking for, but I think it is just my lack of knowledge on the subject and how to properly weight, parent, target, etc.

I was able to achieve this, which I think is what Iā€™m going to go with for now.

Please refer to the video
shape keys+Bake Sounds to F-Curve (the menu has been repositioned since blender 4.0.)

1 Like