Is it possible to apply a "user image" to a mesh in-game?

I’m working on Android.

tl;dr

  • Is there a way to display the android’s secondary camera output in-app?
  • Is it possible to take a screenshot/capture of the android device and access that screenshot in-app?

I have a character with a separate face.texture.
I can swap out this face texture in the editor, and I know I can change it in real-time…

I’d like to know how I might go about allowing the user to change the character’s face texture with one of their own. That is, to take a picture of their self (via secondary camera on the android/smartphone) and use that picture as the face texture.

Example:

  • User launches game and accesses “Set Face” menu.
  • (“Set face” menu contains saved face textures and a “Take Picture” option) User selects “Take picture” option
  • Outline of face texture dimensions is displayed over secondary camera output. (Here the user can adjust distance and angle to get their face to fit in the outline.)
  • Take the picture (texture will be saved to the phone as normal, or perhaps a screenshot is taken and cropped to the size of the outline) and then the texture will be applied to the mesh.
  • Player confirms picture. Retake the the picture by selecting “no”, or “yes” to confirm. (“yes” saves it to the phone photo dir or game dir)

I dare ask, would such a thing be possible using blueprint alone?

Thanks for any info!

Here is a link to a possible solution.

Hope this helps,

Inc.

Ah sweet, thanks for this, jayice! This solves half the problem. Now I just gotta figure out how I can access a smartphone’s data folder in-game.

If I can figure it out, I’ll be sure to come back here and update this with how I did it.

Much appreciated for taking the time to give me that link. I couldn’t find anything like it before I posted.

1 Like

Have you found out a solution for this?