K3D-tools / K3D-jupyter

K3D lets you create 3D plots backed by WebGL with high-level API (surfaces, isosurfaces, voxels, mesh, cloud points, vtk objects, volume renderer, colormaps, etc). The primary aim of K3D-jupyter is to be easy for use as stand alone package like matplotlib, but also to allow interoperation with existing libraries as VTK.
MIT License
942 stars 123 forks source link

z-fighting #319

Closed esalehim closed 2 years ago

esalehim commented 2 years ago

Is there a solution to mitigate z-fighting in k3d? I have some mesh faces very close together which leads to z-fighting in some areas Moving the camera closer to the mesh fixed the issue, but is there a way to fix it in all camera positions/angles?

image

artur-trzesiok commented 2 years ago

Hi!

Can you share a current plot as *.k3d file?

data = plot.get_binary_snapshot()
with open('binary_snapshot.k3d', 'wb') as f:
    f.write(data)

I will try use a "- logarithmicDepthBuffer: true if the logarithmicDepthBuffer was set to true in the constructor and the context supports the EXT_frag_depth extension." on it.