开发者

WPF 3D close items seems "wobbly"

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜