Can I use a material to drive my terrain generation?

Hi,

I am wondering if there is a way to read the pixel from a given material, so i can use the vlaue to drive my procedural terrain. I currently have a simple material, that uses perlin nois to generate a heightmap. How can I access each pixel of the material to get the color value (which is between 0 and 1 in my case). Also, what would be a good way to randomize given material with a given seed? And last but not least: How do I control the size of a material? Let’s say I want my heightmap to be 6464 or 128128. How do I control it?