PDA

View Full Version : Bicycle drive Hell: animation struggle of path constraint vs expression controllers!


sirius
07-18-2002, 03:25 PM
Hi,

working on a mountainbike animation, i am encountering some problems which might be max limitations, but i am out of whits and had to like the problems solved one way or another.....ít's driving me nuts. :hmm:

short description:

i have this bike, it has to follow a path, while the wheels turn, the biker pedals and the steer turns according to the curves, the bike should inclinate in the curve, as in real world.
So now i have the wheels turn by expression, the bike follows a spline with a path constraint. the biped biker moves the pedals (object space attachments of the limbs to the steer and the pedals)

BUT:
Problem:
1. in the expression for the steering movement i cannot retrieve the euler angle of a dummy on the path which indicates the curving direction. How do i get that angle, between two objects attached to a path with path constraint?
And, if i use a orientation constraint for the steer instead of the expression the steer turns on the path according to the curve, ok, but i cannot anymore retrieve the separate euler rotations of the steer which i am needing for the inclination of the bike.
so: expressions are not compatible with the constraints, or what?

2. If the curves of the path turn too far, the pedals will flip 180 degrees distorting the legs of the biped. When i use orientation constraint for the steer the same happens to the steer. Weird!!

Any workaround is welcome, including automated plugins!!!!
I just want to drive that d**n bike!!
I never imagined this would be so complex in max! :thumbsdow

edit: corrected question :
how do i retrieve the angle between two dummys at differnet points on the path?
This would solve the problem. The bike is attached with the rear wheel to the path, the front wheel steers towards the path........
sirius
:bounce:

sirius
07-21-2002, 01:14 PM
hi,

since nobody came to save me, i tried to pull myself by my hairs out the mud.
:beer: :applause: :bounce:
1. while it is not possible to retrieve orientation relative to the world of a childobject in an expression, it is possible to obtain the position of a child object in world coordinates. (assigning a vector variable eg VectorV to the child's objecttrack (not the position track). then put for example VectorV.x in the expression, which will give you position x-axis.

2. to get fisical correct self-steering behaviour of the bike without the wheels sliding on the path i found the following:

Instead of trying to derivate direction/rotation and attaching with dummys inside the hierarchy of the bike itself, risking dependancy loops,
i created 2 sets of 2 linked dummys representing the touchpoints of the wheels, both attached to the path with pathconstraint with the rear touchpoint, but the second dummyset is slightly advanced on the path (0.2%, depends on pathlength.) The steerwheel of the bike has to point in the direction of the frontwheel" of the a bit advanced dummyset 2. this will give fisically correct steering behaviour.
So only remains:
calculate the angle between:
the bike and
the line from the frontwheel touchpoint of the bike(=fronttouchpoint dummyset 1) to fronttouchpoint of the advanced dummset 2....

sounds complicate but it is quiete simple.
right now i am trying to calculate this angle by some arcsin formula, but it is actually quiete lengthy and more complicate than it should be.
Anyone can explain me how to calculate in a simple way the angle on z-axis between two vectors, inside the expression editor of max?
Please? :hmm:


sirius

CGTalk Moderation
01-13-2006, 11:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.