Articles on: Tutorials

Workflow Tutorial: Filling Maps and Tiles in the Canvas

Workflow Tutorial: Filling Maps and Tiles in the Canvas



In this tutorial we will walk through one method of creating 2D game map tiles, or a broad world map, in our Canvas. The Canvas is a dynamic tool that supports pixel perfect inpainting and outpainting while retaining a custom generators style.

Step 1: Creating your Background


Note: Make sure to download your work while you use the Canvas, as the microchanges are not automatically backed up.

As you will see in other articles, you do not need to generate your base image directly into the canvas. There are many situations where the Canvas should be the last step in your generation journey. For the sake of this article we will assume you are starting from scratch in the Canvas.

You will find all the normal prompting window features on the Canvas, as well as a yellow square. This square can be moved around, and is of a fixed aspect ratio. However, if you would like to change the aspect ratio, you can move the square out of its original section, which we will review at the end of this tutorial.

We have also prepared two separate generators for this task. One is trained entirely on background images, and the other on environmental props and buildings. It would have also been possible to train on both simultaneously - however we have found that we have more control in canvas by switching between a small number of generators.



As you can see, we prompted a desert background. The generator we use for backgrounds is style specific, so we only need a simple prompt to achieve our desired result.



Step 2: Generate Buildings


Next, click the name of the model you are currently using. It will pop up your original generator selection menu. Without disturbing your work, you can simply toggle to another generator. We will be using the building and environment generator we prepared.



Next, it is time to mask out the area that we want filled in. We recommend adding one distinct element at a time. For example, we are going to add a hut here.

First we mask out the area.



And then once our prompt is adjusted, we generate our images. You may notice that this takes longer than normal image generation. Much like Composition Control, this is impacted by the complexity of the processing. The smaller the area that is masked out, the less time it will take.



Step 3: Adding Additional Elements


Next we will go through the same process for additional elements. You will see that larger finely detailed area, when masked out, follows the logic of the AI. Smaller the area targeted, the more exact you can make an output.



As you can see, it’s filled in the fence details that were prompted above, partially. We can continue filling in the areas between the gaps with additional masks. However, in this case, we are going to explore following this line of exploration.



In one open area we can add another building, creating further dynamic contrast in the image.





And we can even mask out around the fence entirely, and add a more vibrant background. In all cases, a well trained generator will only need a few words.



Step 4: Outpainting the World


Lastly, we will show you outpainting. The above examples are excellent for creating tiles in 2D games. However, what if we want to do a full world map?

Just as before, the generator and canvas will retain style consistently. It is recommended that your original image take up at least half of the generation box. Then you can go ahead and mask out the edges of your image, and continue generating.



And there you have it, more background in a consistent style. You can continue creating in several directions, moving your image around in the center of the map.



Thank you for reading our tutorial! Make sure to check out our other documentation, and don’t forget to download your work throughout your Canvas session!

Updated on: 23/05/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!