Hello all,
I'm making a quite standard racing game, and I'm facing this jitter problem I don't really know why, thun I cannot fix it.
The game runs quite well in most time, however occasionally the racing objects have small jitter through the game.
By "occasional", I mean it seems depends on the startup, after I start the game, if everything runs smooth, then it will be good all the time, but if it's jittering, then no matter what I do (e.g. delete the rigid object and create it again), the problem remains.
Can anyone help on this?
Thanks,
-Yi
occasional jitter of dynamic object
-
- Posts: 149
- Joined: Fri Jun 24, 2011 8:53 am
Re: occasional jitter of dynamic object
I am investigating a similar problem right now. My current speculation is the ground they slide on might have small imperfections, thus causing them to hang on those. I'll hopefully be able to fix this in a couple of days, maybe the solution will give you some ideas.
Do you have this issue when on ground or also when flying?
Do you have this issue when on ground or also when flying?
-
- Posts: 9
- Joined: Mon Aug 27, 2012 8:10 am
Re: occasional jitter of dynamic object
No I don't think my problem roots from ground. Actually I don't even have a ground at all.MaxDZ8 wrote:I am investigating a similar problem right now. My current speculation is the ground they slide on might have small imperfections, thus causing them to hang on those. I'll hopefully be able to fix this in a couple of days, maybe the solution will give you some ideas.
Do you have this issue when on ground or also when flying?
I disable the velocity factor on y axis. And I disable the angular factor on x and z axis.
Any other thoughts?
-
- Posts: 9
- Joined: Mon Aug 27, 2012 8:10 am
Re: occasional jitter of dynamic object
No one?
Please, I'm dying here
Please, I'm dying here
-
- Posts: 31
- Joined: Tue Apr 26, 2011 5:52 pm
Re: occasional jitter of dynamic object
I have a similar problem on my raycast vehicle test. The chassis is floating in the air but jitter sometimes (little hickups) while the rest of the scene is smooth.
I do not know what causes it. I wonder if it could be caused by single-precision usage. Maybe testing with double precision might be worth it.
I do not know what causes it. I wonder if it could be caused by single-precision usage. Maybe testing with double precision might be worth it.
-
- Posts: 9
- Joined: Mon Aug 27, 2012 8:10 am
Re: occasional jitter of dynamic object
I tried double precision, doesn't work outzarlox wrote:I have a similar problem on my raycast vehicle test. The chassis is floating in the air but jitter sometimes (little hickups) while the rest of the scene is smooth.
I do not know what causes it. I wonder if it could be caused by single-precision usage. Maybe testing with double precision might be worth it.
-
- Posts: 31
- Joined: Tue Apr 26, 2011 5:52 pm
Re: occasional jitter of dynamic object
Just by curiosity,
What is your simulation step rate and substep settings?
Where do you update the jittering body? Pre-Tick, Post-Tick, UpdateAction()?
What is your simulation step rate and substep settings?
Where do you update the jittering body? Pre-Tick, Post-Tick, UpdateAction()?
-
- Posts: 9
- Joined: Mon Aug 27, 2012 8:10 am
Re: occasional jitter of dynamic object
1. My simulation step rate is around 30 fps, my game is on ios and that's the best I can do. My substep setting is fixed rating at 60fps, and max sub step is 1.zarlox wrote:Just by curiosity,
What is your simulation step rate and substep settings?
Where do you update the jittering body? Pre-Tick, Post-Tick, UpdateAction()?
2. When do I update the jitter body? I use impulse to make my object move. And I use OgreBullet as the bridge between bullet and ogre, which I believe use straight Motion to get transform from bullet.
Any idea where can causes the jitter?
Thanks,
-zy
-
- Posts: 9
- Joined: Mon Aug 27, 2012 8:10 am
Re: occasional jitter of dynamic object
OK, I may have found a solution, I move the stepSimulation of bullet to frameEnded event, and put all logical update to frameStarted event, that looks promising up to now. I will keep updating if I find jitter comes back.zyzyandzyzy wrote:Hello all,
I'm making a quite standard racing game, and I'm facing this jitter problem I don't really know why, thun I cannot fix it.
The game runs quite well in most time, however occasionally the racing objects have small jitter through the game.
By "occasional", I mean it seems depends on the startup, after I start the game, if everything runs smooth, then it will be good all the time, but if it's jittering, then no matter what I do (e.g. delete the rigid object and create it again), the problem remains.
Can anyone help on this?
Thanks,
-Yi
-
- Posts: 31
- Joined: Tue Apr 26, 2011 5:52 pm
Re: occasional jitter of dynamic object
Good point.
I am also using Ogre for the rendering but i do my updates and call StepSimulation() in the FrameRenderingQueued() so right after the previous frame data is sent to the GPU.
However, you say that StepSimulation is in FrameEnded() while you updates your objects and apply forces in frameStarted? That would mean you do not use the stepSimulation() constant step update rate? I think you should try to keep the forces update in the simulation tick callback as much as possible.
I'll try calling my stepSimulation in frameEnded() to see if it reduce the jitter for me too.
Thanks
I am also using Ogre for the rendering but i do my updates and call StepSimulation() in the FrameRenderingQueued() so right after the previous frame data is sent to the GPU.
However, you say that StepSimulation is in FrameEnded() while you updates your objects and apply forces in frameStarted? That would mean you do not use the stepSimulation() constant step update rate? I think you should try to keep the forces update in the simulation tick callback as much as possible.
I'll try calling my stepSimulation in frameEnded() to see if it reduce the jitter for me too.
Thanks
-
- Posts: 9
- Joined: Mon Aug 27, 2012 8:10 am
Re: occasional jitter of dynamic object
Finally, I think I know the reason of jitter, Ogre uses a set to store all the frame listeners, which means the calling order is not static. That explains why the jitter depends on the startup, I have created my own frame listener manager to control the calling order myself, that should resolve everything.zarlox wrote:Good point.
I am also using Ogre for the rendering but i do my updates and call StepSimulation() in the FrameRenderingQueued() so right after the previous frame data is sent to the GPU.
However, you say that StepSimulation is in FrameEnded() while you updates your objects and apply forces in frameStarted? That would mean you do not use the stepSimulation() constant step update rate? I think you should try to keep the forces update in the simulation tick callback as much as possible.
I'll try calling my stepSimulation in frameEnded() to see if it reduce the jitter for me too.
Thanks
Thank you, all.