Jump to content
  • Advertisement
Sign in to follow this  
ricekrispyw

Torque (and maybe NovodeX)

This topic is 4678 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been playing aroud with NovodeX a bit and I really like it. It's great. I have a question, though, and I'm not sure if it's my lack of NovodeX knowledge or my lack of physics knowledge that's making me wonder. I am applying various amounts of torque to a sphere in a frictionless environment. The "problem" is that the sphere will never spin faster than a certain amount, no matter how much torque is added to it. At a certain speed, it simply won't move any faster. The amount of torque certainly affects how fast it reaches that speed, but does not affect the speed itself. Like I said, this is a frictionless environment (the only material used is the scene's default, and it is set to have no friction, either static or dynamic). Again, this may be a physical principle I either don't know or have forgotten, or it could be a property or limitation (though there really don't seem to be any) of NovodeX. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by ricekrispyw
I've been playing aroud with NovodeX a bit and I really like it. It's great. I have a question, though, and I'm not sure if it's my lack of NovodeX knowledge or my lack of physics knowledge that's making me wonder.

I am applying various amounts of torque to a sphere in a frictionless environment. The "problem" is that the sphere will never spin faster than a certain amount, no matter how much torque is added to it. At a certain speed, it simply won't move any faster. The amount of torque certainly affects how fast it reaches that speed, but does not affect the speed itself. Like I said, this is a frictionless environment (the only material used is the scene's default, and it is set to have no friction, either static or dynamic).

Again, this may be a physical principle I either don't know or have forgotten, or it could be a property or limitation (though there really don't seem to be any) of NovodeX.

Thanks in advance.


NovodeX limits the maximum angular velocity by default for stability reasons (mentioned in the SDK docs: due to linearization/approximation issues).

From the SDK docs, section 5.2.10 Fast Rotation:

actor->setMaxAngularVelocity(maxAV);

Share this post


Link to post
Share on other sites
All physics method that use numerical integration has to limit the max angular velocity.
Reason being there is no know numerical integration method that can solves the rotational part of the equation exactly, so they all drift at some point.
Some methods are marginally better than others but they all are inexact, this also apply to the linear part of the motion, but the limits are higher.

So is that since there is not perfect solution to multisided body physics, because of the simple reason that there are not perfect numerical integration methods.

Share this post


Link to post
Share on other sites
Ahh. Thank you both. So, is it a huge performance slowdown to set the max angular velocity higher?

The reason I ask is, say you have a tennis game. If there's spin on the ball, it needs to react appropriately, and with the appropriate speed. When a tennis player slices a ball, that sucker's spinnin' pretty fast.

Could this perhaps be solved by making the court surface and/or the ball have a lot of friction?

Thanks for all your help.

Share this post


Link to post
Share on other sites
The problem won't be slowdown, but the introduction of inaccuracies into the simulation, so you could see unexpected/unrealistic behaviour. You can attempt to counter this by reducing the timestep/increasing the number of iterations (same thing) of your physics simulation, and that WILL have a negative impact on performance.

Share this post


Link to post
Share on other sites
Quote:
Original post by ricekrispyw
Ahh. Thank you both. So, is it a huge performance slowdown to set the max angular velocity higher?

The reason I ask is, say you have a tennis game. If there's spin on the ball, it needs to react appropriately, and with the appropriate speed. When a tennis player slices a ball, that sucker's spinnin' pretty fast.

Could this perhaps be solved by making the court surface and/or the ball have a lot of friction?

Thanks for all your help.


For an unconstrained sphere such as a tennis ball, high angular velocities should be possible without issue. I have found that high angular velocities are an issue for such objects when using a simple Euler integrator (and Verlet-style variants). However, when using RK2 or RK4 style variants, extremely high angular velocities can be used without major issue, including preservation of precessive motion (see the physics demo on my website for an example showing this behavior). It does not appear that the NovodeX integrator supports high-angular velocity with precession (from the last demo I tried). The trade-off is generality and stability for the more common cases.

From reading the NovodeX docs, it appears their issue is due to the generalization and linearization of motion equations (for a simultaneous iterative solver) to allow for general-case stability for all types of motion, including arbitrary constraints, etc. However, for the tennis ball (and perhaps car wheel) cases, the actor->setMaxAngularVelocity(maxAV) call should allow such objects to work OK.

Re: friction- set it for realistic behavior; it should not affect stability at high angular velocities.

Share this post


Link to post
Share on other sites
Quote:
Original post by ricekrispyw
OK. Thanks. How 'bout the increased friction thing. Do you think that would simulate the reaction effectively?


I wouldn't expect too much from general purpose physic engines when you are looking for accurate reproduction of a specific model. Most physic engine devs will for example recommand that you use rays to model a car so that you can handle tire/road interaction in a specific way.

Even people using solvers that are known to be very accurate will ressort to this kind of 'tricks' because both the physic models and the collision modeling are incomplete.

For your particular example since a tennis ball is not a rigid body it might prove very difficult to tweak the simulator so that it gives plausible output for a given set of input parameters (be it the terrain material, the ball material, wind etc)...

Share this post


Link to post
Share on other sites
Quote:
I have found that high angular velocities are an issue for such objects when using a simple Euler integrator (and Verlet-style variants). However, when using RK2 or RK4 style variants, extremely high angular velocities can be used without major issue, including preservation of precessive motion (see the physics demo on my website for an example showing this behavior). It does not appear that the NovodeX integrator supports high-angular velocity with precession (from the last demo I tried). The trade-off is generality and stability for the more common cases.

From reading the NovodeX docs, it appears their issue is due to the generalization and linearization of motion equations (for a simultaneous iterative solver) to allow for general-case stability for all types of motion, including arbitrary constraints, etc. However, for the tennis ball (and perhaps car wheel) cases, the actor->setMaxAngularVelocity(maxAV) call should allow such objects to work OK.

Wow you came up with an engine that can do exact numerical integration and preserve momentum. You must be congratulated, had you thought of publishing the result of your work? I bet lots of scientist and mathematicians will be very interested on your results.
So far no body has been able to do that, in fact I think it is considered imposible since there is not way to formulate an exact numerical integrator.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!