+1 vote

I want to draw an overlay, think of a heatmap for instance. I've got quite a simple setup: A TileMap which I use to draw tiles. In addition i have a "LevelRunner" Script in the Scene root which manages the different contents of my tiles (like gases which have a pressure and a temp etc). Now I want to draw different overlays like a heatmap (so heat spreads from heat sources to nearby tiles and I want to visualize that).

Let's say I have the following structure/heat matrix:

contents = [

In the first step I don't want to be too detailed or fance, a simply overlay tile per base tile would be fine - something like the Basic Heatmap here (overlay every tile with a RGBA): https://plot.ly/python/heatmaps/

Note: This is not a question about how to calculate the color of a tempature or something, just a godot question, how to draw such an overlay over a TileMap.
What I tried: https://godotengine.org/qa/9602/color-modulate-tilemap

|-- Canvas Layer
|         - CanvasModulate
|         - Tilemap (Overlay)
|-- Tilemap (Normal)

With that I can only draw an overlay over specific parts, but not a different color over every tile. As far as I understood things the TileMap seems to be the wrong tool for drawing overlays. What should I use instead? What's the best approach, something like a CanvasLayer and drawing a lot of CanvasItems? It that a good idea considering performance?

in Engine by (13 points)

is it similar to tint ?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.