1
$\begingroup$

I am trying to figure out how to use Blender to simulate a real world application. I'm wondering if Blender will allow me to create a response to a stimulus or whether I have to mathematically calculate the response and then (somehow) program this into the objects? I have uploaded the test model to blend exchange . The green block is constrained to only rotate around the origin on the Z plane. The red bar is constrained to movel only along the Y axis. I would like to move the red bar and see the green bar rotate as a consequence of the movement of the red bar. Is this possible or do I have to do all of the trigonometry? If I have to do the trig then how do I configure blender to use the calculation / formula?

The image shows the starting position

Thanks in anticipation

Push lever model

$\endgroup$
3
  • $\begingroup$ can u pls tell us what u did with your rigid body setup? why are your masses 0? (which makes no sense in a rigid body world). Why is the mass 0 if i create a new rigid body in your blend file? normally it should be 1kg.... $\endgroup$
    – Chris
    Jun 30, 2022 at 16:58
  • $\begingroup$ Hi Chris, I haven't set up any rigid body parameters (out of ignorance). For my simulation I am only interested in visualising how one object will move when stimulated by another. If setting up masses is a requirement then I will need to do that. These will be small metal parts weighing a few grams each and while I will be happy to experiment with different mass values, from my current level of understanding I do not see how the mass relates to the position. I kind of see that if I succeed in moving the green bar then as it is currently massless and frictionless it would simply spin for ever $\endgroup$
    – argyrg
    Jun 30, 2022 at 17:10
  • $\begingroup$ ok, then just download my example file and check it out. if you want ;) if you have questions, just ask. i just was curious because of your blender file...i had to make a new one ;) $\endgroup$
    – Chris
    Jun 30, 2022 at 17:11

2 Answers 2

3
$\begingroup$

I hope you want to do something like this:

enter image description here

This could be easily achieved with a hinge.

So start with a new blend file (i have no idea what happened to your file...even gravity was changed...)

Make a plane, give it a rigid body passive.

Create the two boxes, then select the plane, shift-select the green bar and choose Object->rigid body -> connect.

enter image description here

then select the newly created empty and change type to hinge.

enter image description here

give the red object rigid body passive and check "animated". Animate the movement of the red bar with keyframes.

Additionally you can give the green bar a generic spring connection like this:

enter image description here

example file:

result:

enter image description here

Of course you can change the stiffness of your spring as you want.

$\endgroup$
5
  • $\begingroup$ Thanks Chris, This model does what I expect in the absence of friction or some other force to constrain the green bar. I'll take a look at your model and see if I can get it to work as I intend. In reality the green bar will be spring loaded so when I apply a force to the red bar to move it along the Y axis the green bar will remain in contact with the red bar and will return the red bar to its original position when the red bar force is removed. I realise that I have a lot to learn. $\endgroup$
    – argyrg
    Jun 30, 2022 at 17:24
  • $\begingroup$ ah...ok...i will update my answer...give me a minute $\endgroup$
    – Chris
    Jun 30, 2022 at 17:31
  • $\begingroup$ i updated my answer $\endgroup$
    – Chris
    Jun 30, 2022 at 17:41
  • $\begingroup$ Thanks again, I'm about to grab something to eat and then I'll have a play with the settings later this evening. I've already learned a lot, the important point for me has been to understand which controls to use and where to find them. $\endgroup$
    – argyrg
    Jun 30, 2022 at 18:00
  • 1
    $\begingroup$ I've spent a bit of time getting close to your model but with a couple of issues (how to set the actual point of rotation in the hinge and how the springs work) but I think I've got enough to move one or two steps forward. I'll dig in to the Blender manual a bit more and research around the areas of connections and rigid bodies. Thanks again $\endgroup$
    – argyrg
    Jul 1, 2022 at 10:04
2
$\begingroup$

If I didn't completely misunderstand you, you can solve this with a Transform Constraint.

enter image description here

Here you can map the Y-location of an object to the Z-rotation of another object.

enter image description here

$\endgroup$
3
  • $\begingroup$ Ah, OK, I just see that I really misunderstood the question. ...I'll leave the answer anyway, maybe it will help someone. $\endgroup$
    – quellenform
    Jun 30, 2022 at 17:10
  • $\begingroup$ GREAT. This is exactly what I want to achieve. would you be kind enough to upload your model and point out what you did that's different from my original settings please. Do you make the red bar move as a consequence of the green bar rotating or the other way around? $\endgroup$
    – argyrg
    Jun 30, 2022 at 17:18
  • $\begingroup$ @argyrg I actually just used your file, and added an additional constraints modifier to the object named "pivot". You can see in the screenshot how I configured it. PS: The red bar drives the green bar (location -> rotation). $\endgroup$
    – quellenform
    Jun 30, 2022 at 19:12

You must log in to answer this question.

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