能否在SurfaceMeshRenderableSeries3D中显示数据点标记?
Let's break down your problem and the available solutions:
First, it's important to note that SurfaceMeshRenderableSeries3D is designed primarily to render continuous mesh surfaces, not discrete data point markers out of the box. The PointMarker and PointMarkerTemplate properties you tried are actually intended for marking the mesh's vertices—but they won't show up in the default solid mesh rendering mode.
Option 1: Show Vertex Markers Without Extra Series (Requires Wireframe/SolidWireframe Mode)
If you're okay with displaying the mesh alongside a wireframe, you can enable vertex markers by switching the mesh rendering mode to SolidWireframe (which shows both the solid surface and wireframe) or Wireframe (only wireframe), then configure the PointMarker:
<s3D:SurfaceMeshRenderableSeries3D DrawMeshAs="SolidWireframe" WireframeOpacity="0.2" <!-- Adjust wireframe visibility as needed --> ...> <s3D:SurfaceMeshRenderableSeries3D.PointMarker> <s3D:SpherePointMarker3D Size="0.5" Fill="Red" /> </s3D:SurfaceMeshRenderableSeries3D.PointMarker> </s3D:SurfaceMeshRenderableSeries3D>
This will render the solid surface, wireframe edges, and sphere markers at each mesh vertex—no extra scatter series required. If you don't want the wireframe, setting WireframeOpacity="0" might work, though note some rendering engines may still process the wireframe invisibly, which could have minor performance impacts.
Option 2: Solid Surface + Markers (With Shared Data Source to Minimize Complexity)
If you need a pure solid surface without wireframe, the only reliable way to show markers is using a ScatterRenderableSeries3D—but you can avoid doubling your data processing work by sharing the same data source with your surface mesh series.
Since both series can bind to the same UniformGridDataSeries3D or XyzDataSeries3D, any updates to the data will automatically propagate to both series. This eliminates the need to duplicate data handling logic. Here's how to set it up:
<!-- Define shared data series once --> <s3D:UniformGridDataSeries3D x:Key="sharedSurfaceData" XStart="0" XStep="1" ZStart="0" ZStep="1" ... /> <!-- Surface Mesh Series --> <s3D:SurfaceMeshRenderableSeries3D DataSeries="{StaticResource sharedSurfaceData}" ... /> <!-- Scatter Series using the same data --> <s3D:ScatterRenderableSeries3D DataSeries="{StaticResource sharedSurfaceData}" ...> <s3D:ScatterRenderableSeries3D.PointMarker> <s3D:SpherePointMarker3D Size="0.5" Fill="Red" /> </s3D:ScatterRenderableSeries3D.PointMarker> </s3D:ScatterRenderableSeries3D>
With this setup, you only need to update the single shared data series—both the surface mesh and markers will reflect changes automatically, keeping your data processing complexity low.
Quick Troubleshooting Note
If you still don't see markers in wireframe mode, double-check:
- The
Sizeof the marker is large enough for your 3D coordinate system (try increasing it to 1.0 temporarily to test) - The marker's
Fillcolor contrasts with the surface color (avoid matching colors that make markers invisible)
内容的提问来源于stack exchange,提问作者Silvester

