Introduction:
I am working on a heat map made by Perlin Noise with the next result:
*(Red means really hot and light blue is colder)*
The algorithm identifies that mountains are colder at their top and plains vary between warm and hot(randomly, there is no physics behind).
QUESTION:
How can i do so that heat map i generated with Perlin Noise looks like this example:
where the temperature variations follows something like Earths equator.
My Ideas:
I thought about divide the map manually (from height to height2 is hot and so on...) but i do not like that idea as i want something more dynamic (temperatures may vary so does the heat map)
What i am asking?
Is there any better solution to this idea i had?
Thanks for your interest in this question.
EDIT:
With the code below i made possible the next thing:
public static Texture2D GetAirTemperature(int width, int height, Tiles[,] tiles)
{
var texture = new Texture2D(width, height);
var pixels = new Color[width * height];
for (var x = 0; x < width; x++)
{
for (var y = 0; y < height; y++)
{
if (y <= 5 || y >= 95)
{
pixels[x + y * width] = Coldest;
}
else if (y <= 15 || y >= 85)
{
pixels[x + y * width] = Colder;
}
else if (y <= 30 || y >= 70)
{
pixels[x + y * width] = Warm;
}
else if (y <= 45 || y >= 55)
{
pixels[x + y * width] = Warmer;
}
else { pixels[x + y * width] = Warmest; }
}
}
texture.SetPixels(pixels);
texture.wrapMode = TextureWrapMode.Clamp;
texture.Apply();
return texture;
}
and obtaining the next result:
How i could multiply/modulate/something it by my Perlin noise so i get something irregular but looks a like Earths Equator?
Because you cannot do like Texture2D * Texture2D (multiply textures)
EDIT2:
What if, instead of using noise, i create my own 2D air temperature map as a starting point? I mean, my own matrix [width*height].
Temperature will have the input given at the center of matrix (equator) and then, when update the temperature map (a cycle).
A cycle will go once in a while (periodically) to simulate temperature changes.
The input from the sun at the equator [(width/2)x(height/2)] will move outwards from the center into "north and south the matrix" (North is x, y < 50 && south is x,y > 50)
That means i have to check each row and number above and under the equator while maintaining energy conservation and other factors.
It is nice on paper but a hell in coding. Do you have any other idea to accomplish something similar to figure 3?