So I’ve been trying to make a image that will be shown in the hud as a example of how a randomly generated map will look but cant find a simple way of doing it.
currently I have a array of positions I would like to draw a white pixel in and a variable for the size of the image.
The image it self would only have to be drawn once the map itself is generated. I know it would be possible to spawn the geometry and show that as a top down view but would rather it just shown as a image.
Found one tutorial for how i could do it but that only shows the generated image in a Canvas Render Target but cant find a way to display it in a widget.
There’s no reason to call begin draw and end draw on every inner loop, that is wildly inefficient. If you call them once it’s a big performance gain, especially in larger image dimensions:
The fact that this is in blueprint is also an important factor in the speed of this function, for loops, and especially nested for loops with many iterations are very slow in BP
PS: Kind of irrelevant, but I was curious how much faster it would be in C++, so I tried: