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?
Toastmaster 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:
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.
Fermin Thank you! Do you know of any guides to use draw based upon a matrix?
Toastmaster 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:
© 2022 - 2024 — McMap. All rights reserved.