Blueprint Get Pixel Color at Texture Coordinate

I am using UE5-EA2 version, was not an option fr selection.

I am having extreme difficulty finding info on how to read the value of a given pixel in a texture from a blueprint.

The Situation:
A 10km 4061x4061 Landscape

Trying to Achieve:
Using x1 4061x4061 RGB or RGBA Texture to store and compute Data pertaining to Map features such as Slope, Terrain Type, and Flow Map

So far, I have several layers on a landscape master material each representing a various range of slope. Each layer is rendered as a seperate color/value and I then read in the texture to a material, using an If node to seperate the layer info from the red channel, i.e. A red value of 0-0.1 is Layer/SlopeRangeX, a value of .10-.20 is Layer/SlopeRangeY and etc. continuuing through all layers. (I am also curious if this is a bad method/expensive?) I have output the result as a 4061x4061 texture.

So that would leave me with the Green and Blue channels to store a 2D Flow Map for the map (To use for Unit Pathfinding Calculations). and then the Alpha channel to use for doing another series of If nodes to seperate the values for each terrain type (0-255 values = 255 terrain types, whichthen be tied into a DataTable with each terrain type ID storing terraintype data such as Viscosity and Friction values.

Problem:
I have not been able to find a way to take the world location of a line trace hit and using X,Y coords lookup that pixel value in an individual channel (RGB or RGBA channels) to retrieve the value in a variable in an actor blueprint.

hi,
Did you find a solution to this problem? I am using a BP Actor to spawn grid of meshes based on data in pixels and surrounding pixels at corresponding Co-ords, and I found a BP node plugin that works perfectly in 4.27 (Rama’s victory get pixel node) but I cant find anything that can do this in ue5.
I will keep working in 4.27 for now, but I really want to use Lumen on this.

1 Like