get pixel colors from image to generate a level

Hi!

I’m coming from Unity and trying to use a image to generate a map or level based on the pixel position and its color. The tutorial I used to learn this technique is this:

I’m trying to find the way in Unreal to do something similar searching the forums and googling but with no resullt. Maybe I’m the first to try to do something like this in Unreal?

Thanks for any help on how to do this :slight_smile:

1 Like

Hi, I’m trying to discover by myself. I havea “map” variable that is a “Texture2D”. The image created is assigned to “map”. Now I’m trying to call “getPixel” funcion in the BluePrint, but I can’t!

I’m doing something wrong? or Unreal doesn’t expose the getPixel API ??

Please help

Thanks in advance

1 Like

Up! I having the same problem

Hey, a while back I published a tutorial on how to read pixeldata from a videotexture. You could extrapolate the given values and say to unreal: Hey, if you detect RGB-255-255-233 - that means “coin”, I could imagine this being a starting point.

2 Likes

Hey Nils, many thanks! I just followed the tutorial and I think it’s what I need. Just need to work it a bit to create my algorithm. Also I think the performance problem should not be a problem for me since I just need to do the process at the start of the game to get the info.

Many thank! :slight_smile:

The process speed is dependent on the image size you are scanning. A fullHD 1920*1080 takes ages. You are better of using a smaller render target.

Yeah, I’m using verry small images of 100x100px :slight_smile:
Thanks!