@anonymous_user_3148a182. Sure. For example:
First, in any actor blueprint, you could collect lots of line trace hit results into an vector array variable each tick. You can’t get away with tons, cause CPUs are kinda slow but you could probably add a couple hundred per tick without significantly degrading performance.
Create a CanvasRenderTarget2D blueprint with a vector array variable to accept points from your main blueprint, and a vector2D variable to store the coordinate of the next empty pixel on the render target.
In the canvas blueprint, On EventRecieveUpdate perform a ForEachLoop with it’s array, use DrawLine(the version where the target is Canvas), make both position A and B the next empty pixel coordinate, use a thickness of 1. Convert the current vector to a linear color for the line color. Update the next empty pixel coordinate.
Create your point cloud material, have a TextureSamplerParameter2D for the lookup table.
In your actor blueprint, on EventBeginPlay, CreateCanvasRenderTarger2D of the class you just created. CreateDynamicMaterialInstance of the point cloud material. SetTextureParameterValue on the DynamicMaterialInstance using the CanvasRenderTarget2D.
On tick, collect your trace results to an array. Use CastToCanvasRenderTarget2D, to set the vector array in created canvas with the vector array from your actor blueprint. UpdateResource targeting the canvas, and it will draw all the pixels to the render target, which will offset the points of the cloud. Finally, clear the actor’s vector array so it’s fresh for the next tick.
There are ways to add points faster with SceneCapture2Ds, but you won’t be able to discriminate the points as easily(like if you only want the hit results from a specific object)