1
$\begingroup$

Dear Blender Community,

i would like to build a very simple carriage kind of vehicle, that is simply pushed or dragged over a surface and has the possibility to react to it. My first idea was to use the rigid body settings for it and just build it how i would build it in real life and push it with a cage like box over the surface. but whenever i start to push it, it simply explodes! I applied all the locations/sizes/transformations whatever and the objectcollision shapes are all set to "mesh". I realy don't get it and can't believe that it is so hard. Maybe someone has an idea how this kind of a model can work and react to an uneven surface, that there is this carriage vibe to it? Would be great!

this is how my model looks now, it doesn't need to be much more complex concerning the design:

$\endgroup$
  • $\begingroup$ instead of physics you should use a Shrinkwrap modifier and a Copy Location as explained here: youtube.com/watch?v=sfi7HW8qHAo I don't know how to make it for 4 wheels though $\endgroup$ – moonboots Mar 26 at 11:17
  • $\begingroup$ thank you very much! I will check it out and let you know if it worked for me!! $\endgroup$ – Almagor Apr 1 at 10:31
4
$\begingroup$

I don't know if it will help, but here is a way to make wheels following the ground:

  • Create a cube (the vehicle), a wheel, and a small plane.
  • Parent the wheel and the plane to the cube.
  • Put the plane under your wheel, subdivide it a bit, assign a vertex group to the whole mesh.
  • Give it a Shrinkwrap modifier, choose the ground as the Target
  • Give your wheel a Copy Location constraint, choose the plane as Target, select the plane's vertex group in Vertex Group, deactivate the X and Y axis so that it only moves on the Z axis, activate Offset and place the wheel at its right position, on the ground and above the small plane.
  • Move the cube to test the animation, the wheel should follow the ground.
  • Copy paste x 4 the wheel + its plane.

enter image description here

$\endgroup$
  • $\begingroup$ thank you very much. i will try it out and let you know if it worked for me, but this actually looks like exactly what i was looking for!! $\endgroup$ – Almagor Apr 1 at 10:30
  • $\begingroup$ I haven't explained how to make the legs because you didn't ask, but you could do as explained here: youtube.com/watch?v=xKfdy050JMQ $\endgroup$ – moonboots Apr 1 at 11:52
  • $\begingroup$ very cool, it worked for me. just a small irritation, it's not a copy location modifier but a copy location constraint, just for people who may follow your explanation and are confused. thank you so much, also your second tutorial link was very helpful. Just another small question. do you have any idea how my object could react to the wheels individually? like if one wheel goes up and the other stays down, the object would tilt regarding the wheels? tried to sketch it into the image: ibb.co/KsJ15cx sorry, my english is quite basic. $\endgroup$ – Almagor Apr 1 at 17:07
  • $\begingroup$ I don't know how I would do it, if it was me I would create the keyframes manually to fake the cabin movement, but I guess it's not what you're looking for ;) maybe create a second question? $\endgroup$ – moonboots Apr 1 at 17:44
  • $\begingroup$ Yes I'll do it. Thank you anyways, great help! $\endgroup$ – Almagor Apr 2 at 8:11
1
$\begingroup$

Wheels traveling over bumps - (Blend file attached below)

(Edited 5th April 2019 - typos, review, and slightly updated Blend file)

If I'm correct in assuming you're not too familiar with the process described here and you're stuck, just ask for more help.

A suggestion - if you combine the track-to constraint (chassis tipping) with Moonboots' answer, the shrinkwrapped planes, this should remove the need to keyframe the wheels, albeit with some sinking into the road surface.

For the method here below some experience with the Graph Editor, it's handles, and also the Dope sheet, is recommended.

Normally, a vehicle following a "path" constraint would do this job but in those instances where we have to see the front and rear wheels going over sharply uneven ground and tipping the vehicle's body with it, it's probably easier to keyframe the whole thing, particularly when stability and predictability are required.

Shadows -

Shadow masks (planes) were used because of the OpenGL rendering. The van's shadow is actually a semmi transparent plane which is Shrinkwrapped to be a whisker above the road and parented to the van's "Navigation Empty". Consequently the wheels need to treat the shadow plane as the road surface to avoid them sinking into it and appearing somewhat under-inflated.

-===================-

The vehicle as a whole will be moved forward and turned left & right using a 'Navigation' Empty. (the large vertical circle. It's there to avoid forming a 'parent loop')

The vehicle body is parented to the front wheels, and it's pivot point also set at the axle. This will take the chassis up and down as the front wheels encounter the road's rises and falls.

Parent both front and rear wheels to the Nav Empty. (parent = Nav Empty)

Animate the Empty forward as far and at the speed required. The entire vehicle should follow but at this stage ghost right through the road humps.

The front wheels and the bumps -

The front wheels are only to be animated in the Z axis for this step in order to follow the road surface.

-=============-

HINT - In the Dopesheet, click on the ghost and arrow icons at the bottom of the window. This will unclutter the display and show only those objects selected in the 3D window.

(that's already done in the attached Blend file)

-=============-

The humps - It's best be in Ortho View mode and looking directly from the side. Tilt the view a fraction so you can see the road. (or shadow) or work in wireframe mode.

Insert a keyframe at frame 1 for the front wheel at the starting location for ALL 3 AXIS.This gives all axis' an appearance in the Dope sheet. Lock out (padlock) the X & Y strips so these can't be inadvertently accessed.

From frame 1, step through the frames and at the contact point between the first bump and the forward wheels, insert a keyframe. Only the Z axis will register a keyframe which is what we want.

Advance the timeline to the frame where the wheels' center will be at the peak of the bump. Drag the wheels up in the Z axis so they're sitting on the road surface. Insert another keyframe there.

Don't worry about the intermediate frames between the bottom and peak of the bump. (yet)

Move onto the other bumps and do the same at the high and low extremities

-=====================-

When all bumps are keyframed, we turn our attention to the intermediate frames and use the Graph editor's keyframe-handles to adjust the curves so the wheels stay at the road's surface at all times, unless otherwise required such as a bounce. Intermediate keyframes may be necessary but avoid these where possible.

The keyframe handles are easiest to use when set to "Free" movement. This ensures one handle won't be affecting it's counterpart. (Select the handle, press V and choose "Free") Select the handle again and press G to drag it around. Observe the effect is has on both the curve and the wheel in the inset 3D window.

-=====================-

If you're uncomfortable with dopesheet copy/paste, the rear wheel keyframes can be added manually as you did with the front. Skip this section...

With the front wheels following the road surface correctly, you can copy paste it's Z axis keyframes (ONLY Z) into the rear wheels' --> Z axis strip <-- in the Dopesheet.
MAKE SURE THE TIMELINE CURSOR IS AT FRAME 1 when doing this.

--> Be clever here and lock out all but the rear wheels' Z axis. (padlocks)

The rear wheels will now rise and fall in synch with the front so all it's keyframes -->except frame 1 <-- will need to be slid back to allow for the distance (and delay) between them.

The vehicle's forward motion is set to Bezier so all rises and falls will need to be adjusted back or forward to accomodate the vehicle's variable speed. Block select them and slide left or right.

This is not a difficult task but familiarity with the Dopesheet and Graph editor will be more than a little useful.

-====================-

Once the wheel rises and falls are right, it's time to force the vehicle's body to tip forward and back.

We need a target for the van's body to aim at (pivot towards) each time the rear wheels move up and down.

Place a "Track to" constraint on the body and set the rear wheels as the 'target'.

The vehicle's chassis should now tip forward and back as the wheels negotiate the road.

Turning is only a matter of rotating the Nav Empty in it's z axis.

-==========-

If the front wheels need to be turned whilst steering, that will require the existing wheels to made invisible and a new set of 'turnable' ones set in place. Parent those to the (invisible) front wheels and rotate them in the Z axis when making turns.

-==========-

Just when you think it's safe to have a break, sit back and enjoy the video you've just produced, you'll notice the rear wheels seem to be sliding back and forth along the chassis! Oh great!

This is a side effect because we can't parent the rear wheels to the chassis itself without upsetting the 'track-to'' constraint.

You'll notice an empty called 'Rear alignment' at the back of the body. It's there to use as a marker.

Unlock the X axis strip in the Dopesheet, view the vehicle from the side and simply keyframe and drag the rear wheels so they maintain alignment to that empty whilst keeping the wheel on the road. (or shadow plane)

$\endgroup$

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.