+1 vote

I'm working on the character creation scene for my game. I have designed some controls to let the user customize the character avatar a little bit:
https://gyazo.com/dc1f1ef0aa65f1c080442e3753dd2c9b

The 4 controls load images from 3 different PNG files (loaded as atlas textures, since each file has 160 images). I want to store the player selection and I think the most efficient way would be to combine what they can see (including the frame, which I'm loading as a TextureRect) and save it into a PNG file that I can then load into the level scene.

This is the Node structure:

MarginContainer
  CenterContainer
    CharacterBanner (TextureRect)
    Control
      CharacterBg (TextureRect)
      CharacterFrame (TextureRect)
      CharacterFace (Sprite)
      CharacterEyes (Sprite)
      CharacterHair (Sprite)

The question is: how can I combine the images?

I've seen how to save a Texture as a PNG file, but I need to save several textures and I need them to work like layers in a PSD file.

PS: It seems that images are not working here, that's why I posted the link directly...

Godot version 3.3.2
in Engine by (21 points)

1 Answer

0 votes

Click on the Editor and the click Toogle Screenshot while having open the scene with the textures. You can also use the shortcut Control+F12. Then the screenshot will open on another window. Now you can crop it! If the image isn't .PNG, you can convert it online!

by (86 points)

That's not what I want...

What I want is, once the game is running and someone is playing it, and they choose the appearance they want for their character, I want to be able to combine all of those images into a single PNG file, so that it's easier and more efficient to show later in the game.

Convert the scene to tileset. Then you can use Tilemaps for your character's appearance. Try to change the visibility of tilemaps, as you change the character's appearance!

That's an interesting idea, but I don't see a way to get the texture from the TileMap, which is what I want in the end: to save the whole image to a PNG file.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.