Object jittering Author Message
Houge
Member

 Post: #1 Object jittering Hello! I faced a problem: If we go to a far-far area, for example 2000x2000, we will see objects jittering when rolling or moving camera. More far we go, more jittering we get. Here is a small example, you can see jittering in upper left corner on an orientation cube. All fine on area like 1x1 or 100x100, but problems on area like 1000x1000+. You can also try to go to areas like 100x100, 1000x1000, 10000x1000, create terrain there and try to move or rotate camera.
09-19-2016 05:57 PM
Esenthel

 Post: #2 RE: Object jittering you're simply experiencing limits of floating point precision
09-20-2016 12:12 AM
Zervox
Member

 Post: #3 RE: Object jittering 9999 x 32(terrain size) you are at 319968 from 0 639936 for 64 and 1279872 for 128. so yeah as Esenthel said, floating point precision 5 digits floating point allows for 2 decimals(full range of centimeters) 6 digits will allow you only per 10 centimeter precision(1 decimal).7 digits being the max amount it can give you. doubles gives you 15-16 There are a few ways of getting around it, but none of them is built into the editor or world manager. game specific requirements would force you to make your own world manager to either move the world grid with you at the center. (This post was last modified: 09-20-2016 07:44 AM by Zervox.)
09-20-2016 07:43 AM
Houge
Member

 Post: #4 RE: Object jittering Quote:game specific requirements would force you to make your own world manager to either move the world grid with you at the center Yes, this works only if the whole world should not be calculated at the same time Thank you for your answers, I just wish there were workarounds with double precision classes for world or camera like MatrixD
09-20-2016 08:21 AM
Zervox
Member

 Post: #5 RE: Object jittering While that might make the precision error distance better, doubles are more costly to operate on than floats well that is in general, some things are actually faster to do with doubles, the other concern might rather be that you would double the memory footprint. - above is only regarding CPU if you do it on GPU you will very much cripple the performance. You could always convert all float you find related to this due to source access. as on the gpu everything usually atleast is converted to local space or replace it with template version which allows you to input it as double versions(still it is no small amount of work). (This post was last modified: 09-20-2016 09:09 AM by Zervox.)
09-20-2016 09:06 AM
 « Next Oldest | Next Newest »