right now I’m developing an engineering simulation which takes data from a data table object and draws a function graph made of single value pairs. Currently, this is done by a HUD object. Since I want that project to go VR (where HUD objects are a bit of a problem) I want those function graphs to be drawn in real time (roughly one new pair of values per 1/3 second) on a 3D object (in this case, it is a whiteboard).
I have currently no clue where I should start. My thoughts were about a texture or a 3D canvas which gets updated over time but Google couldn’t tell me where to start.
There are a number of ways to approach this, but I think that what may work the best for you might be some kind of procedural mesh placement or generation.
If you just want a scatterplot of dots, make up a static mesh that is just a single quad with its origin at 0,0. Texture it like a dot or a square or whatever.
Reference that mesh in your scatter plot making blueprint.
Define the axis scale of your plot area with a 2d vector in the blueprint. This will be CM per Graph unit.
Then just loop through your data array, spawn a new static mesh instance at each XY location in the data table, scaled by your plot area scale factor mentioned above.
Add a delay node to the end of the loop cycle.
Place the graph drawing blueprint close to, or on your drawing surface in the game world. It will appear that the dots are being drawn on the surface of it.
xnihil0zer0, your solution works great! Except for the error I get while running it:
“Blueprint Runtime Error: Accessed None trying to read property K2Node_DynamicCast_AsScatterplot_RT from function: 'ExectueUbergraph_ScatterPlotBP from node: Branch in graph: EventGraph in object: ScatterPlotBP …]”
Unfortunately I can’t find the error. Are there maybe any default values missing?
Hello! I know this topic is 6 years old, but maybe you still here and can help. I passed all steps except last one - there is not proper image for section “Set up the event graph like this.” - actually it shows graph setup for gridmat (GridMat.png). Unfortutally I don’t have enough experience to solve this myself (I guess that it’s all about “init” step where we have to kickstart event to update canvas and render to texture and also we have to provide data table for point array).