Jump to content

Animating a car following a path with diferent height points


Jago_0108
 Share

Recommended Posts

Hi there. Does anybody knows how to make a car follow a path with different heighs in it?. For example the garage or parking is 20 cm above the street level, then we have the sidewalk with a curvature from 20 cm to 0 cm to get to the level of the street. What I would like to do is to get from the parking level to the street level following that curvature of the sidewalk, and then when I get to the street level just drive it following the street.

 

Any suggestions?

 

Thanks a lot in advance.

Link to comment
Share on other sites

Not too difficult.

 

  • Create a copy of all the objects you want the car to follow
  • Attach them all together (materials are irrelevant cuz it's just a copy of the original objects)
  • Draw a spline in Top view where you want the car to go
  • Go to Spline subobject mode and use the Outline option to create a closed outline of the spline (any small amount will do such as 12 inch)
  • Extrude the spline a large amount and position it so it cuts through the entire object you just attached together
  • Use the Boolean>Cut>Split routine to cut out the spline from the object
  • Add the Edit Mesh modifier
  • Go to Face subobject mode and detach the selected faces
  • Deleted the object you cut the shape from
  • Select the cut out shape and go to Edge subobject mode
  • Click the Select Open Edges option and click the Create Shape button (use the Linear option)
  • Delete the mesh
  • Select the shape, go to Segment subobject mode and delete the 2 segments at the end of the spline
  • Delete one of the 2 remaining spline subobjects
  • You are left with a single spline that conforms to the road, driveway, etc
  • Add the Path Constaint to the Car and use the spline as the path

 

That's all :D

 

If all this fails...fudge it.

Link to comment
Share on other sites

If your road surface has a continuous edge, like a shoulder or curb, than try this:

 

Convert object to "Editable Poly"

 

Go to subobject level and elect an edge and then use "Loop"

 

Select "Create Shape From Selection"

 

Select your newly created Shape and go to subobject "Spline" and use offset

 

Select a value that places the offset of the spline into the lane your car is using

 

Delete segments of spline that are not in that lane

 

Select car and go to Animation tab and select "Path Constraint"

 

Car still selected, go to Motion tab and reorient car using XYZ and "Flip"

 

Hope that helps...if not PM me.

Link to comment
Share on other sites

If you have to do this sort of thing often, then I'd recommend the craft animations car plugin. It's very simple to setup and you can just drive the vehicles (like a game) wherever you want (it will automagically follow your terrain).

 

Here's a link to their website if you want to take a look:

http://craftanimations.com/

 

Disclaimer: I'm not associated with them. I've just found their various vehicle and camera plugins to be real time savers.

Link to comment
Share on other sites

couldnt you just simple use "edge" snap and draw a spline over the geometry you want....thats what I aways do and it works a treat

 

Well i'm guessing that if your view is close enough to warrant even making 3D terrain for a mere 20cm change in elevation, then you're probably pretty close to the view of where the rubber meets the road and any inconsistencies will be probably be seen. Doing it the way you suggested will work otherwise but might not be accurate enough unless you spend a good amount of time massaging vertices.

Link to comment
Share on other sites

Ok first I tryed Claudio's Suggestion but ... didn't work. I compressed and image so I can explain my point. I can animate a car following a path, the thing is that in this work, because of the sidewalk curve, the back wheels of the cars should obviously follow first that curvature and then get to the level of the street while the front wheels are still on the parking level (20 cm above), then that front wheels follow the sidewalk and get to the street level. Thats the part where it gets complicated because when the car is following the path spline, when the path starts its curvature from 20 to 0 cm all the car starts going down and not as first the back wheels and then the front wheels.

 

Here's the image of that path (More Less)

 

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...