Jump to content
  • Advertisement
Sign in to follow this  
CuppoJava

How can I make my RBD engine faster?

This topic is 4948 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

Alright, after two months of research and coding, I'm at a major landmark now. My impulses-based rigid body dynamics engine handles concave objects, binary time-searching, and stacking. The only major feature that is still missing is friction. Special thanks to Mr.Rowl and Olli for their help in getting me this far. Anyway, I'm doing the above with a linear equation solver, not an LCP solver (which I still don't understand why it is necessary..my equation solver seems to work without problems). The major problem now is that it is SOOOOOO SLOOOWWWWWW. I think its in the binary time stepping routine. When a block is perfectly inelastic, it should come to a standstill when it hits the ground, nowhowever, it is constantly colliding with the ground as any infitesmal amount of time will lead to a negative relative velocity between the block and the ground, in these cases my binary time-search will just keep on cutting by half until it reaches my threshhold (which is really small), and the entire operation procedes with a timestep of my threshhold, which leads to 2000 calls per second on the collision detector. ..ookay..so did anyone understand what i just said....sorry, i'm not too good at explaining things. Does anyone know of any links that might help me with optimizing my engine? [Edited by - CuppoJava on November 27, 2004 10:24:33 AM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by CuppoJava
... I think its in the binary time stepping routine. ...


The first step in optimizing is to find out where the bottleneck is, otherwise you are just wasting your time.

Share this post


Link to post
Share on other sites
I think you need to implement a resting contact step or a deactivation step. Still busy myself and i noticed the same problem as you i think :)

Share this post


Link to post
Share on other sites
a) raise your thresholds. dont give me crap about instabilities: if your simulation isnt unconditionally stable its going to be able to crash no matter how small your tresholds. just focus on every part of your simulation being 100% stable. its the most important thing of all.

b) make it so that your binary timestepping works only locally, ie dont increase the precision of the whole simulation just because one object is in close contact.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The latest version of CodeAnalyst is loads better, sorting on the UI works now which was the main bug for a long time.

Share this post


Link to post
Share on other sites
Thx for your reply.

I think Eelco's reply was right on the target.
For raising the threshhold, my simulator is stable except that a higher threshhold leads to higher penetration, which isn't nice but still tolerable.

As for making the binary-time stepping local, I realized that problem when I was designing it, but didn't bother to fix it, so now I'm stuck here. Do you know any place where I can learn how to do this?

As for AMD's codeanalyst, does it work on Java applications?

Thx for the great help everyone, I hope at the end of all this, my engine's gonna be the fastest around. :)

PS: I'm crawling through Baraff's papers right now. Does anyone know a place where I can download the source for the demo's that he has screenshots of?

Share this post


Link to post
Share on other sites
Me again,
I was wondering if anybody has any links to 2D demos of Rigid body dynamics. Source code would be extremely invaluable to me. It has to be in 2D though, I'm not that good at physics to crawl through 3D code yet.

PS: How is contact usually handled for a high-speed simulator? I've fiddled with penalty forces but they get messy, and they require calculating penetration depths which is slow.

PPS: I'm wondering, after seeing so many incredible demos (with no source), how come there isn't a general accepted way of doing these things?

Share this post


Link to post
Share on other sites
Quote:
Original post by CuppoJava
PPS: I'm wondering, after seeing so many incredible demos (with no source), how come there isn't a general accepted way of doing these things?

because in the end they all have their weaknesses. so why isnt there a general accepted way of doing things? there just isnt a perfect solution yet. its an incredibly hard subject, and still very much evolving.

ive been studying RBD (not intensively tho) for something like 2 years now, yet i still feel like i know nothing.

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!