01-22-2020, 04:47 AM
Hello,
I am looking at using the Ab3d.DXEngine for an application displaying point cloud data.
The ShadedPointCloudSample example is great and using that within my application is giving some great results.
In my application, I need to display multiple point clouds. So I've adapted the example to create additional OptimizedPointMesh objects and for each adding a SceneNodeVisual3D created from a CustomRenderableNode.
I set the color of each point cloud when creating the CustomRenderableNode, by using a particular effect, e.g...
However, I want to be able to show each separate point cloud highlighted or not. To achieve this, I need to change the display color of each individual OptimizedPointMesh as required.
My question is, how can I change the effect used for a particular CustomRenderableNode at a later time, so the point cloud color is changed.
I can't just change the DiffuseColor for the effect as that will change all other CustomRenderableNode's using that effect.
I have tried to solve this by removing the SceneNodeVisual3D and re-creating a new CustomRenderableNode using a different effect. This does work, I just don't know if this is the best way?
I am looking at using the Ab3d.DXEngine for an application displaying point cloud data.
The ShadedPointCloudSample example is great and using that within my application is giving some great results.
In my application, I need to display multiple point clouds. So I've adapted the example to create additional OptimizedPointMesh objects and for each adding a SceneNodeVisual3D created from a CustomRenderableNode.
I set the color of each point cloud when creating the CustomRenderableNode, by using a particular effect, e.g...
Code:
var customRenderableNode = new CustomRenderableNode(RenderAction, new Bounds(boundingBox), optimizedPointMesh, ScanEffectMaterial);
However, I want to be able to show each separate point cloud highlighted or not. To achieve this, I need to change the display color of each individual OptimizedPointMesh as required.
My question is, how can I change the effect used for a particular CustomRenderableNode at a later time, so the point cloud color is changed.
I can't just change the DiffuseColor for the effect as that will change all other CustomRenderableNode's using that effect.
I have tried to solve this by removing the SceneNodeVisual3D and re-creating a new CustomRenderableNode using a different effect. This does work, I just don't know if this is the best way?