I'm at it again (can't keep a good man down! ). This time my 80% engineering self is taking over, and the 20% artist is taking a backseat. Using some bits and pieces that I've collected over the years, together with my new JointHelper object and the Esenthel World Editor I've assembled a physics-based bicycle. The main jointed parts were pre-assembled in my favourite 3D modeller, and then transferred to the Esenthel Object Editor where they were given materials, physbodies and physical properties. These parts were then transferred to the Esenthel World Editor, ready for final assembly with joints:-
Using my JointHelper I set up all the joints and positioned them carefully at there crucial locations... to end up like so:-
Here's a short video clip of the bicycle initially standing, but very soon to topple over, as no real bicycle can stand unassisted for too long! It has to be moving forward to stay upright... but this is my next fun challenge!
As an aside, I must add that after getting more to grips with the slightly unconventional Esenthel toolset, I am now really appreciating its ease of use and the amount of careful thought and planning that has been put in by the Esenthel developer, Gregory.
A final word to the adventurous...
If you are attempting something like this then
1) Keep your dynamic physbodies simple and made up from standard primitives. Do not attempt to use convex bodies... these tend to end up unbalanced.
2) It is important that all parts are positioned accurately... do not guess... use numerically entered values in the World Editor popup dialog window.
3) Very important... ensure your jointed parts ignore collisions between them. For this, there is a boolean parameter in the CreateJoint functions. Other parts of your model which may collide with each other (unless by design) should use the 'actor.ignore()' function.
4) I've always used Kg/m3 for my material densities (seeing as PhysX use the MKS (meter, kilogram, sec) system). But I see that most users use densities expressed in gm/cm3 (I've failed to understand why). This means that the density of water is 1000Kg/m3 ( 1gm/cm3)
5) I'm used to scaling up the size of my physbodies, as I've discovered that PhysX does not take too kindly to physbodies less the 50cm in size. Gravity should also be scaled up proportionally.
These are just a few pointers that I've picked up along the way, to partially avoid jittering and exploding models due to instability issues.
I'm used to using PhysX with small tabletop models, and I've found that to avoid instabilities I've had to greatly increase my scale. So through force of habit I did the same for the bicycle. However, I've now realised that this bicycle is going to operate in the real Esenthel world of 1metre=1unit, and I certainly did not want to start scaling everything up to suit the bicycle's scale. So I've rescaled the bicycle down to Esenthel size.
'TestCrashDummy' (the testrider-to-be) is of average height, 1.7m
Also, in the pic I've left the JointHelpers visible so folk can see the location and orientation of the joints.
Just completed testing that all the hinge joints are operating smoothly and correctly. No wheel contact with the ground at this stage.
I'm using the recently added "hingeDrive()" functions.
oh no... no, no, no, no, no Allan you're just nearing the end of the first half of this equation...
your next task is to create a self balancing controller (bike rider) who will become the controlling force and provide power to the pedals, and keep the bike from tipping over while it's in motion...
straight line biking will suffice for now
--Mike
(This post was last modified: 05-17-2015 02:18 PM by RedOcktober.)
My bicycle now has a 'rider' to provide some peddle power. Still suspended above ground, but 'CrashTestDummy' has learnt how to pedal, change gear, steer, and what will happen to him when the bike comes to a dead stop from speeding!
Thank you, Pixel Perfect, for your assistance on this... deleting the leg motion keyframes did the trick.
In the last month I think that I've actually learnt more about character animation than I have in the last 10 years.