# Get X,Y pixel coordinate values of Material as float 0.0-1.0

**URL:** <https://forums.unrealengine.com/t/get-x-y-pixel-coordinate-values-of-material-as-float-0-0-1-0/489212>\
**Category:** Rendering\
**Tags:** procedural-mesh-comp, unreal-engine, pixel, render-target, generation, question\
**Created:** [September 26, 2021, 10:11am UTC](https://forums.unrealengine.com/t/get-x-y-pixel-coordinate-values-of-material-as-float-0-0-1-0/489212 "2021-09-26T10:11:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fallschirmjag3R](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fallschirmjag3R](https://forums.unrealengine.com/u/Fallschirmjag3R)\
**Post date:** [September 26, 2021, 10:11am UTC](https://forums.unrealengine.com/t/get-x-y-pixel-coordinate-values-of-material-as-float-0-0-1-0/489212/1 "2021-09-26T10:11:31Z")

</div>

UE 4.26.2 (I can update)

I need to get the RGB value _(well, just one of them, since it’s a Noise-node material and it’s black and white)_ of specific pixels on the material to use for generating a heightmap on a procedural mesh. I know there is a way to get the pixel values using a Render Target 2D, but I don’t know how to set the Render Target 2D to the generated Material…

The end goal is to be able to set-up a seed into the Material, and then set the vertices of the procedural mesh to the 0-1 float value of the Material at specific points (as in, vert. x30,y40 has the value of Mat. pixel x30,y40) to create a continuous heightmap. (edit: however for now, I’m happy with just getting it to read the Material’s pixel coordinates properly)

---

<div class="post-metadata">

**Author:** ![Fallschirmjag3R](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fallschirmjag3R](https://forums.unrealengine.com/u/Fallschirmjag3R)\
**Post date:** [September 28, 2021, 2:44pm UTC](https://forums.unrealengine.com/t/get-x-y-pixel-coordinate-values-of-material-as-float-0-0-1-0/489212/2 "2021-09-28T14:44:08Z")

</div>

solved, use this [Introduction to Render Targets - Unreal Engine 4 Tech Art S03E02 - YouTube](https://www.youtube.com/watch?v=LXduG19JFWg)
