Slow Physics Animations
5 posters
Slow Physics Animations
Hi,
I'm having quite a problem with the iPhone performance of rendering both sio2 and bullet and an acceptable framerate. Using provided template project.
Here is my profile:
glView.animationInterval = 1/30
sio2window->fps ~ (supposed to be 30) varies from 8+ to 28...
15600 faces, 7900 vertices
14 staticMesh, 2 dynamic Sphere, etc...?
FixedInternalTimestep = 1/60
Can anyone tell me why I still get motion like its "on the moon" (if I want it smooth)... Is there anything I'm missing in order to have "framerate independence", or at least have a workable game?
Any suggestions?
I'm having quite a problem with the iPhone performance of rendering both sio2 and bullet and an acceptable framerate. Using provided template project.
Here is my profile:
glView.animationInterval = 1/30
sio2window->fps ~ (supposed to be 30) varies from 8+ to 28...
15600 faces, 7900 vertices
14 staticMesh, 2 dynamic Sphere, etc...?
- Code:
http://physic.cc
void sio2PhysicRender( SIO2physic *_SIO2physic,
SIO2window *_SIO2window )
{
if( _SIO2physic->state == SIO2_PHYSIC_PLAY )
{ _SIO2physic->_btDiscreteDynamicsWorld->stepSimulation( (btScalar)( 1.0f / _SIO2window->fps ), 0 ); }
}
FixedInternalTimestep = 1/60
Can anyone tell me why I still get motion like its "on the moon" (if I want it smooth)... Is there anything I'm missing in order to have "framerate independence", or at least have a workable game?
Any suggestions?
jj- Posts : 77
Join date : 2008-09-24
Re: Slow Physics Animations
I may be wrong, but I think you need to drop your poly count. 15,600 faces is a LOT. Try reducing that to around 7,000 and you should be good to go.
uprise78- Posts : 228
Join date : 2008-10-31
Re: Slow Physics Animations
I'm not really sure.
It's frustrating to think that I have 10-12 item that are fairly simple meshes in construction, and any less vertices will lose any of the detail in the model whatsoever.
I'm attempting to throw a ball through space and can't get the glView/sio2 numbers and the bullet numbers in the stepping of the simulation and fps to work properly at all.
Seems to make the whole thing useless. A performance hinderance on the iPhone platform? It frustrates me to think of the apps out there that seem to have WAY more complex models than I'm using.
Any other suggestions from people who have run across the same issue. The game is unplayable...
Do the following (default) values make a game playable with < 7k faces? the window->fps NEVER gets up that high...
glView.animationInterval = 1/60
stepSimulation: timeStep = 1/window->fps, maxSubSteps 0
fixedTimeStep = 1/60
Why do I feel like I'm missing something else...
It's frustrating to think that I have 10-12 item that are fairly simple meshes in construction, and any less vertices will lose any of the detail in the model whatsoever.
I'm attempting to throw a ball through space and can't get the glView/sio2 numbers and the bullet numbers in the stepping of the simulation and fps to work properly at all.
Seems to make the whole thing useless. A performance hinderance on the iPhone platform? It frustrates me to think of the apps out there that seem to have WAY more complex models than I'm using.
Any other suggestions from people who have run across the same issue. The game is unplayable...
Do the following (default) values make a game playable with < 7k faces? the window->fps NEVER gets up that high...
glView.animationInterval = 1/60
stepSimulation: timeStep = 1/window->fps, maxSubSteps 0
fixedTimeStep = 1/60
Why do I feel like I'm missing something else...
Last edited by jj on Wed Dec 10, 2008 7:30 pm; edited 1 time in total
jj- Posts : 77
Join date : 2008-09-24
Re: Slow Physics Animations
Is this your first time modeling for a game?
Realtime rendering is not like software rendering. Even with today's powerful hardware, you still need to learn how to create low poly models.
If you're interested, google for "primitive up method"
best,
-joshua
Realtime rendering is not like software rendering. Even with today's powerful hardware, you still need to learn how to create low poly models.
If you're interested, google for "primitive up method"
best,
-joshua
meteors- Posts : 241
Join date : 2008-11-08
Location : Sunny Florida
Re: Slow Physics Animations
I guess a better question might be,
How do you control and maintain the FPS of the sio2 engine and game? and what are the most important determining factors to adjust the speed/accuracy of the animation/simulation?
Another note: when I "play" the ball, the window->fps goes no higher than 10, and then mid way through my simulation (falling to the ground) it jumps up to 21 fps. Whats up w/ this? I've tried changing just about every variable in the simulation and timing intervals...
How do you control and maintain the FPS of the sio2 engine and game? and what are the most important determining factors to adjust the speed/accuracy of the animation/simulation?
Another note: when I "play" the ball, the window->fps goes no higher than 10, and then mid way through my simulation (falling to the ground) it jumps up to 21 fps. Whats up w/ this? I've tried changing just about every variable in the simulation and timing intervals...
jj- Posts : 77
Join date : 2008-09-24
Re: Slow Physics Animations
You really wont be able to get a reasonable frame rate with that many polys. It's just not going to happen. Remember, this is running on a phone, not a computer. That being said, physics (Bullet) probably accounts for the biggest chunk of processor time.
uprise78- Posts : 228
Join date : 2008-10-31
Re: Slow Physics Animations
I actually discovered there was a problem (duplicate vertices or something) with my blender file.
I have tried a couple different poly counts (1200 faces up to 5500 faces) and I still cant seem to control the 1) sio2window->fps, or the resulting speed of my animation.
I'm getting a drop from 40fps (supposed to be 60) to 6 ! when I PLAYphysic.
And then near the end of the simulation (ball falling back to the ground) it jumps up to 21 fps.... just plain unusable...I really need to know what is causing the fps to drop so low at the beginning of the animation...
Any other suggestions? How do I maintain the sio2window->fps???
I have tried a couple different poly counts (1200 faces up to 5500 faces) and I still cant seem to control the 1) sio2window->fps, or the resulting speed of my animation.
I'm getting a drop from 40fps (supposed to be 60) to 6 ! when I PLAYphysic.
And then near the end of the simulation (ball falling back to the ground) it jumps up to 21 fps.... just plain unusable...I really need to know what is causing the fps to drop so low at the beginning of the animation...
Any other suggestions? How do I maintain the sio2window->fps???
jj- Posts : 77
Join date : 2008-09-24
Re: Slow Physics Animations
It's Bullet, plain and simple... the calculations are heavy... however what you can do is take a look at tutorial06_2 Im showing a technique about how to offload the physic calculation to another thread... that might help you... and forget to have a 60fps on the device... if you can control the FPS to be between 15 to 30 its ok...
Cheers,
Cheers,
Re: Slow Physics Animations
you should be thankful we even have bullet working.. i know many that hard a hard time getting it to work at all in thier engines.
drunknbass- Posts : 16
Join date : 2008-12-04
Re: Slow Physics Animations
sio2interactive wrote:take a look at tutorial06_2 Im showing a technique about how to offload the physic calculation to another thread... that might help you...
Looking, but I can't seem to get the callback
void templatePhysicCullingThread( void *_ptr ) to actually run, I placed an NSLog inside it, and it doesn't get called, nor does PhysicRender... missing something?
jj- Posts : 77
Join date : 2008-09-24
Re: Slow Physics Animations
Coudn't agree more... cuz also by default Bullet memory size is too big for the device, I had to tweak and found some workaround in order to make it work at a low memory cost...
![-](https://2img.net/i/empty.gif)
» Very slow with TRILINEAR and ANISOTROPIC_2X filters
» animations...
» Animations?
» Animations
» Scene Graph
» animations...
» Animations?
» Animations
» Scene Graph
Permissions in this forum:
You cannot reply to topics in this forum
|
|