hello, I am looking to try and make a heat map on a 2d texture that changes based on input data, maybe in the form of an array. It would ideally be able to set the color of each pixel based off of values in said array. Any ideas?
How to make a heat map?
Hmm, I just seen this https://docs.godotengine.org/en/stable/tutorials/2d/custom_drawing_in_2d.html that may actually work better for me. Need to do more looking into on this
I’d recommend using the draw
functions if you can, as it should be a bit more performant and should give some additional flexibility that would be harder when setting pixels directly. If you need a texture from it, you could use a Viewport to make a texture from the draw
functions.
TwistedTwigleg Thank you! Do you know of any guides to use draw based upon a matrix?
- Best Answerset by bakerk98
bakerk98 Unfortunately, I do not. I would maybe suggest looking into some 2D voxel drawing stuff though, as that is similar to 2D pixel drawing, many just include textures. You could probably remove the textures part and get a fast, efficient way to place pixels (or pixel-like) elements on the screen.
A couple links that might be helpful: