View Full Version : Steppy effect

rakeshthp

05-26-2014, 11:31 AM

Hello,

I am facing a very strange problem in my application. I display a 2D traingular grid in OpenGL using vertex arrays. Everything works very well, until I came across a case, where a grid to be displayed covered a large area 3500 sq. km. With this grid loaded, when I keep zooming in, I reach at a point where the smooth zooming stops, and the grid node point starts jumping. Basically, the value of the node remains same, but it appears to shift at consecutive zoom steps (steppy effect). I am not sure what is the actual term used for that, but probably, it may be related to the precision or format where there is no further division of pixels.

Can anyone guide me how to overcome this problem? Any links to solve this problem?

Thanks

Regards

Rakesh Patil

Aleksandar

05-27-2014, 10:03 AM

That is a precision problem. The coordinates of your vertices are represented with single-precision floating-point numbers. That means only cca 6 decimal digits are correct. The most elegant solution is to use local coordinate system located at the viewer's position, not the grand fixed one.

rakeshthp

05-30-2014, 02:58 AM

Hi Aleksandar,

That is a precision problem. The coordinates of your vertices are represented with single-precision floating-point numbers. That means only cca 6 decimal digits are correct. The most elegant solution is to use local coordinate system located at the viewer's position, not the grand fixed one.

Thanks for your reply. How can I distinguish local coordinate and grand fixed one? Because, I do not do any transformation in model view. So i guess, my coordinates are local itself. Isn't it?

Thanks

Aleksandar

05-31-2014, 09:38 AM

First, let's determine whether the grid is geometric or it is a texture-overlay. If it is a geometry, then the problem is in precision. If it is a texture then the problem is in resolution.

If you draw it as a geometry, where is the origin of the grid? Assuming it is in the lower left corner, you have an error of 1dm on the upper right corner of 60km long grid. That error cannot be seen until you zoom scene to proximately 100x50m on the full HD screen. If you zoom even further a jitter is becoming more apparent. In order to avoid jitter, you should generate grid from your focal point (where you are actually looking at), or to be more precise, snapped to the closest grid point.

rakeshthp

06-10-2014, 11:32 PM

If you draw it as a geometry, where is the origin of the grid? Assuming it is in the lower left corner, you have an error of 1dm on the upper right corner of 60km long grid. That error cannot be seen until you zoom scene to proximately 100x50m on the full HD screen. If you zoom even further a jitter is becoming more apparent. In order to avoid jitter, you should generate grid from your focal point (where you are actually looking at), or to be more precise, snapped to the closest grid point.

Hi,

Yes, I am drawing grid as a geometry. And the origin lies at the lower left corner. Well, I forgot to write one more thing. This problem comes not only for grid, but also when I display a set of points. If the points are very close to each other, then at the beginning it self I observe the steppy effect. I checked the coordinates, and as you said, only 6 decimal digits are considered.

You also mentioned in your post to generate grid from the focal point. I wonder, how to do this, because every time I do not generate a grid. Some times grid data is loaded from a file which can come from other source. Can you point me out to some literature or article to overcome this issue?

Thanks

Regards

Aleksandar

06-12-2014, 02:25 AM

The problem of precision is common for all objects, not only your grid. :)

You also mentioned in your post to generate grid from the focal point. I wonder, how to do this, because every time I do not generate a grid. Some times grid data is loaded from a file which can come from other source. Can you point me out to some literature or article to overcome this issue?

Yes, you need to regenerate the grid on each viewer's motion (on translation only, not rotation) on such way that the vertex closest to the viewer have coordinates (0,0,0). It shouldn't be an expensive operation.

Some useful remarks and references on rendering relative-to-eye (RTE) can be found in chapter 5 of the "3D Engine Design for Virtual Globes" book.

Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.