PDA

View Full Version : I'm having trouble with speed of bullet physics



dyls_E
01-15-2015, 08:58 PM
Hi,
I have been playing with bullet physics for an animation im working on, just having some trouble i hope someone can point me in the right direction.

Sometimes i work with it, and it all happens instantly frame 0-90, and i can play with settings and get results as soon as i change a value, other times even with the same scene reloaded it can take several minutes to do the calculations.
and that is even for real simple tests, here is a link to one i've been having problems with


http://vimeo.com/116929026

so sometimes, i work on this scene and i don't see it calculate at all, and other times all it seems to do is calculate, just wondering if there is a setting, or something to avoid doing to prevent it from being slow. I can't think of what i could be doing to cause the difference. i tried a few things like resetting dynamics. Sometimes completely removing all bullet items and applying them with the same values gets them back to working at the instant speed if that helps, but looking for an easier more consistent solution? I looked at my cpu usage when its been slow, and it is only using 13% of cpu which is frustrating to see haha

Thanks for your help.

ernpchan
01-15-2015, 09:36 PM
What version of LightWave are you running? I know in 11.6.3 there was a problem with Bullet not refreshing properly when geo was updated. It would make Bullet perform very slowly. This should be fixed in 2015.

dyls_E
01-15-2015, 10:30 PM
What version of LightWave are you running? I'm using the current version, 2015. im getting the same problem if i'm working with deforming, hinges, or cone twist, so i figure its just bullet dynamics in general. Bullet is so lovely when it's working fast, but driving me nuts when it does the slow thing. :)

dyls_E
01-15-2015, 10:38 PM
126571

here is the scene if it helps see if i did anything wrong :S (it is my first time using bullet and i didn't understand the manual too well about bullet, so massive possibility)

jboudreau
01-16-2015, 01:14 AM
126571

here is the scene if it helps see if i did anything wrong :S (it is my first time using bullet and i didn't understand the manual too well about bullet, so massive possibility)

Hi

Try setting your lion objects subdivision order to first. It hardly changes the deformations of your lion object and speeds up the simulation 2-3 times faster

This is great for testing out simulations, Once you have all the simulation settings the way you want them you can put your subdivision order for the lion back to last

Hope this helps
Thanks
Jason

dyls_E
01-16-2015, 02:24 AM
Try setting your lion objects subdivision order to first.

Hey! thanks! that is a great tip, it does calculate almost instantly like that. That will be an easy solution to my problem in most cases thankyou!

I noticed when i was testing the curtains for the window that you can't see deforming body with it set to first, but that stuff is a bit more predictable and only needs a few tweeks :)

Ryan Roye
01-16-2015, 08:50 AM
Rule of thumb: Lower the FPS setting (in the bullet UI) as much as possible and increase it gradually as you get clipping errors or lack of detail in your collisions. The FPS setting is one of the largest contributors to Bullet performance.

dyls_E
01-16-2015, 06:03 PM
it's weird tho, it originally starts working without any calculating time, even with the high fps and subpatch last, then if i reload the scene and work on it after that it becomes a slug. i'm starting to think its just an unavoidable bug at the moment, but these suggestions will help working with the bug, which is good

jboudreau
01-16-2015, 08:22 PM
it's weird tho, it originally starts working without any calculating time, even with the high fps and subpatch last, then if i reload the scene and work on it after that it becomes a slug. i'm starting to think its just an unavoidable bug at the moment, but these suggestions will help working with the bug, which is good

It sounds like it could be a ram issue. Sounds like after you have been working on the project for a certain amount of time it gets slow because maybe your system is running out of ram. Do you just clear the scene when you reload your project or do you shut down layout all together and restart it. You could try this and see if you still have the same issue.

That would be the reason why it so fast calculating at the start. How much ram do you have in your system?

Hope this helps

Jason

dyls_E
01-20-2015, 04:11 PM
thanks, gave that a go, seems to happen no matter what, closed completely or just clear scene, once i open the scene again its slow. i have a fair bit of ram, both my computers are win 8 with 8 core amd, with 16gig each, one with a quadro k4000, and one a k4200 both doing the same thing.

think im stuck with the prob, but advice has helped anyways :)

jboudreau
01-20-2015, 06:09 PM
thanks, gave that a go, seems to happen no matter what, closed completely or just clear scene, once i open the scene again its slow. i have a fair bit of ram, both my computers are win 8 with 8 core amd, with 16gig each, one with a quadro k4000, and one a k4200 both doing the same thing.

think im stuck with the prob, but advice has helped anyways :)

Hi

Can you provide us with the whole scene just in case something else in the scene is causing this? I have a Quadro K5000 and a K5100M. Wondering if it's a windows 8 issue

What exactly is happening, are you able to create a screen capture video of what's happening?

Thanks,
Jason

prometheus
01-21-2015, 04:33 AM
What version of LightWave are you running? I know in 11.6.3 there was a problem with Bullet not refreshing properly when geo was updated. It would make Bullet perform very slowly. This should be fixed in 2015.

Didnīt know that, thanks for the heads up on that, though I will probably not engage in 2015 until a couple of versions have gone by.

dyls_E
01-22-2015, 05:02 PM
Hi

Can you provide us with the whole scene just in case something else in the scene is causing this?

i don't have screen capture abilities :S. the scene i provided is my working scene, the video is just a comp of that scene. not much is happening, just that calculating bar up on screen for ages, (up to probably 3-4 minutes for the scene i provided) while when i first apply the bullet dynamics, that calculate bar pretty much just flicks up on screen and doesn't really slow down at all, just shows all the changes pretty much live.

I guess i was just hoping there was something i could do when it starts going slow for no apparent reason just to make it restore back to when it was working fast. The only way i have been able to do that is to remove all the bullet items, and reapply them from scratch, which is time consuming, but kinda necessary to be able to work in a way where i can see the changes straight away.

hope i'm describing this right, basically, works great when i first apply, but the next time i load the scene (the same unchanged scene), it works super slow

dyls_E
01-22-2015, 05:28 PM
though I will probably not engage in 2015 until a couple of versions have gone by.

I wouldn't let my little problem put you off 2015, i am absolutely loving it, especially the time saving with the new radiosity condensed samples, new genoma and dynamic parenting (and although im having a bit of trouble with it, the new bullet hinges and other joints are soooo nice)

jboudreau
01-22-2015, 06:41 PM
Hey! thanks! that is a great tip, it does calculate almost instantly like that. That will be an easy solution to my problem in most cases thankyou!

I noticed when i was testing the curtains for the window that you can't see deforming body with it set to first, but that stuff is a bit more predictable and only needs a few tweeks :)


Hi dyls_E

Regarding the curtains, Try the tips I posted in this thread below:

http://forums.newtek.com/showthread.php?140174-Possible-Tip-for-faster-Dynamic-Bullet-Calculations&highlight=

Another tip when your object is sub patched you won't be able to see the simulation if you want to see the simulation just go into the bullet dynamics properties under the world tab and turn on draw collision shapes.

Hope this helps

Thanks
Jason

jboudreau
01-22-2015, 07:20 PM
i don't have screen capture abilities :S. the scene i provided is my working scene, the video is just a comp of that scene. not much is happening, just that calculating bar up on screen for ages, (up to probably 3-4 minutes for the scene i provided) while when i first apply the bullet dynamics, that calculate bar pretty much just flicks up on screen and doesn't really slow down at all, just shows all the changes pretty much live.

I guess i was just hoping there was something i could do when it starts going slow for no apparent reason just to make it restore back to when it was working fast. The only way i have been able to do that is to remove all the bullet items, and reapply them from scratch, which is time consuming, but kinda necessary to be able to work in a way where i can see the changes straight away.

hope i'm describing this right, basically, works great when i first apply, but the next time i load the scene (the same unchanged scene), it works super slow


I just played around with your scene again and reproduced the same issues you were having. I opened up the scene and the bullet dynamics simulated really fast but once I made some changes in the bullet dynamics items properties or clicked on the reset button to reset the bullet simulation the simulation was really slow playing back and when I click on the last key frame the progress bar was calculation really slow, around 1% every second. So the simulation took around 1min 1/2 to complete.

The trick to fix this issue is change your lion object subdivision level from last to first, then run the simulation it will be extremely fast now, almost instant. The simulation took about 1 sec to complete. Once you are done change it back to last and the simulation
still calculates really fast.

What I would suggest is leave your lion object subdivision to first and make all your bullet dynamic changes, with it set to first you can make changes to the simulation in real-time once you are done making the changes and you get the results you are looking for just change it back to last and you're done

Hope this helps

Thanks,
Jason