Search code examples
c#.netwpf3dmodelvisual3d

How to hide "cracks" between GeometryModel3Ds in one ModelVisual3D?


I am writing a geoscience visualization application that uses wpf 3d. The user needs to be able to zoom deep into detail and out quick with minimum resources taken. I've decided to divide my slice (ModelVisual3D) into subrectangles (GeometryModel3D), so that each has it's own texture that changes when the camera zooms in (similar to Google maps).

The problem is that "cracks" are appearing between subrectangles, even though they actually have no empty space between them.

enter image description here

How to hide these? or is there any other way to assign multiple materials with different sizes to one ModelVisual3D?

PS I've tried making the background gray, light-gray, silver and white-smoke. It helps a little, but it's not acceptable. I've also tried overlapping the subrectangles, with no result.


Solution

  • Seems like changing ImageBrush's stretch to Stretch.None and using textures larger than the subsquare helps. Although now I need more precise control over texture coordinates for the surface.