[ODE] Objects rotating the wrong way ?

Rob Ruck bobruck at btinternet.com
Thu Oct 9 11:22:56 MST 2003


Thanks for the suggestions, but thankfully it was nothing this complex, (and 
as i'm using opengl this wasn't an right/left hand thing, but thanks djarcas). I 
twigged the problem whilst walking the dog (an odd connection but there you 
go). I was mapping the rotation matrix received from ode wrongly, (first 4 x, 
second four y, third four z) i indeed made an ass out of me and umption. As it 
stands the rotation info is stored column wise(x - 0/4/8, y - 1/5/9, z - 2/6/10). 
Hey presto, now my balls are all rolling the right way (fnar).

Like i said this is not documented for the dbodygetrotation call, which 
would've helped, after all, people who aren't good with physics are more likely 
to be using someone elses physics engine.

On 8 Oct 2003 at 21:19, Steve Baker wrote:

> Rob Ruck wrote:
> > Ive started to attach meshes, etc. to my physics objects, and I've noticed the 
> > objects seem to rotate mostly the wrong way, at least when I seem to add 
> > force to a ball rolling along a surface, it rolls with the bottom going to top, 
> > rather than vice versa (not a good description, but imagine a cars wheels 
> > rotating reverse direction when going forwards).
> 
> Could this be a case of 'temporal aliasing' in your graphics chain?
> 
> I'm not sure for certain - but I can tell you that on one occasion I searched
> for a problem like this for a week only to find that my wheel was doing the
> right thing - but that temproral aliasing was making it look wrong.
> 
> The canonical example is old cowboy movies where the wheels on the stage-coach
> alway seem to be going backwards.
> 
> Suppose we are looking at a wheel with (say) 12 spokes spaced 30 degrees apart.
> If the wheel rotates at 1 degree per graphics frame, you see all 12 spokes move
> forwards at tiny bit and the rotation looks OK.  However, if the wheel turns
> faster, odd things can happen.  If the wheel rotates at exactly 30 degrees per
> frame, then because it's a perfectly symmetrical wheel and one spoke looks much
> like another, it *looks* like the wheel didn't turn at all.  But if the wheel
> rotates 29 degrees forward, it looks exactly like it would if it had rotated
> one degree backwards...so instead of spinning rapidly forwards, it *looks* like
> it's spinning slowly backwards.
> 
> This nasty problem will happen any time this particular wheel rotates at 15 degrees
> per frame or faster.  In general, the limit is half of the rotational symmetry angle.
> 
> One way to help this is to paint one of the spokes a different colour.  Now, the
> wheel has no rotational symmetry (or the rotational symmetry angle is 360 degrees).
> In this case, the wheel will look OK so long as it spins no faster than 179.999
> degrees per frame.
> 
> Another way is to add motion blur...render your wheel so that it's smeared out over
> the duration of the frame...in this case, it may not help much since all it really
> does is make the motion of the wheel into a continuous blur above the magic angle
> at which motion would go wrong if you didn't blur the motion.
> 
> ---------------------------- Steve Baker -------------------------
> HomeEmail: <sjbaker1 at airmail.net>    WorkEmail: <sjbaker at link.com>
> HomePage : http://www.sjbaker.org
> Projects : http://plib.sf.net    http://tuxaqfh.sf.net
>             http://tuxkart.sf.net http://prettypoly.sf.net
> -----BEGIN GEEK CODE BLOCK-----
> GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M-
> V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++
> -----END GEEK CODE BLOCK-----
> 


--Rob Ruck
--ICQ#66577271
--mailto:bobruck at btinternet.com



More information about the ODE mailing list