How to render an actor to a RenderTexture and copy it to RAM using C++

hi friends, I’d like to render an actor(with static mesh) to a rendertexture, and copy the result to cpu-readable format(like a 2d array). Then do some analysis.

All the answers I can find are all about blueprint. but how to do it in C++?

I’ve already do it once in Unity3d, like this, really wonder how to do it UE4 :slight_smile:

221330-qq截图20171124204206.png