CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.39k stars 3.38k forks source link

Fix aliasing on thin models #8228

Closed OmarShehata closed 1 year ago

OmarShehata commented 4 years ago

For 3d models that have thin parts (think the frames around a window of a building), when you zoom out or look at them at an angle such that the line occupies a very small area of the screen, you get some very noticable artifacts in CesiumJS.

Model: lines.gltf.zip

How it looks in Blender:

blender

Now if we look at it at an extreme angle:

CesiumJS: lines_cesium BabylonJS: lines_babylon ThreeJS: three_lines

I think this is because the other two engines are using MSAA to get the lines to still look decent even when they may be sub-pixel thick.

mramato commented 4 years ago

This is easy to see on the Cesium hot air balloon as well, just zoom out slightly while looking at the ropes holding the basket to the balloon. https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=3D%20Models.html

OmarShehata commented 4 years ago

Came up again on the forum here.

OmarShehata commented 4 years ago

Came up again in https://github.com/CesiumGS/cesium/issues/8642.

Here's a Sandcastle reproducing essentially the same effect but on a texture. This should be easier to fix because having mipmaps for this texture could help.

weiyinggh commented 4 years ago

I also encountered the same problem, hope to solve it quickly, thank you!

blueRaining commented 1 year ago

Came up again in #8642.

Here's a Sandcastle reproducing essentially the same effect but on a texture. This should be easier to fix because having mipmaps for this texture could help.

image This still looks problematic

ggetz commented 1 year ago

This should be fixed given MSAA has been implemented - https://github.com/CesiumGS/cesium/issues/9900.