1

I'm writing a 3D globe control in WPF.

Most of it works good, but when I look at a mountain from too close (say, 10 meters or less), it becomes "wobbly" (meaning - every tiny movement of the camera changes the vertices of the mountain model, so it looks like jello.)

I tried playing with the near and far planes specifying ranges from 0.001 to 5 on the near plane, and 100 to 1000000 and even positive infinity on the far plane and it didn't help.

I also tried scaling the model from 1/10 of its size and to 10 times its size, and even rounding result of the Lat/Long/Alt to ECEF to centimeters, meters and 10-meters units.

Nothing helps, it still looks wobbly (although rounding to 10 meters units does help, and wobbling is very rare at this case, but it deforms the models so much it is unusable).

I guess this is a precision issue, mostly. Any idea how I can increase the precision or any other idea of how to fix it?

Itai.

UPDATE: I added a video demonstrating the artifact.

SOLVED I found there was the same problem with building models in World Wing, asked and answered here.

Generally the problem was, as I suspected, a precision issue. The way to solve it was to keep the actual camera at the origin (0,0,0) while allowing it to rotate, and move all the tiles in the opposite direction.

When generating each tile I subtract the tile's XYZ center from each of the tile's vertices, so the final tile is built around (0,0,0).

In the tile GeometryModel3D I set a translation transform so it is placed in the correct position.

Kai
  • 38,985
  • 14
  • 88
  • 103
Itai Bar-Haim
  • 1,686
  • 16
  • 40
  • Have you tried to adjusting the movement incrementations of your camera to the level of zooming? A little bit of code would help too i guess, though i am sure there is a lot of code involved here and wouldnt want to assist you finding the relevant code piece. –  Aug 30 '11 at 13:50
  • I don't understand what 'adjusting the movement incrementations of your camera to the level of zooming' means... The camera is controlled by the keyboard, mouse or by a manager code, usually given in Lat/Long/Alt format (with or without pitch). Then the location is translated to XYZ using the same method that is used to build the terrain models. – Itai Bar-Haim Aug 30 '11 at 15:18
  • I was suggesting to try to "make your camera move slower the more zoomed in you are". Or maybe i didnt understand what wobbly means. –  Aug 30 '11 at 15:24
  • I added a video demonstrating the artifact. The camera barely moves, and the entire model "wobbles". – Itai Bar-Haim Sep 01 '11 at 07:11
  • It looks like if the coordinates of the vertices "jump" around in little steps. But as you already have considered rounding problems and eliminated those, i fear, i am not able to help you, without having the code ;) But i am giving an upvote on this topic. –  Sep 01 '11 at 08:41

1 Answers1

1

I found there was the same problem with building models in World Wing, asked and answered here.

Generally the problem was, as I suspected, a precision issue. The way to solve it was to keep the actual camera at the origin (0,0,0) while allowing it to rotate, and move all the tiles in the opposite direction.

When generating each tile I subtract the tile's XYZ center from each of the tile's vertices, so the final tile is built around (0,0,0).

In the tile GeometryModel3D I set a translation transform so it is placed in the correct position.

Itai Bar-Haim
  • 1,686
  • 16
  • 40