1

I hope this is the right community to ask. With which free tools could I create a cubemap PNG from six individual PNGs, each being the texture of a cube's side?

enter image description here

enter image description here

The cubemap would have to have a resolution of 512x512 pixels (= a square) so that I can load it into Blender and other software. However, after searching for hours for a tool (preferably for Linux), I can't even find a single one!

_(Note: I'm not looking forward to generate files with different formats than PNG or JPG. Also, I've created that cubemap above with GIMP, but doing so is really exhausting since I have to place all the faces in their right positions).

3
  • 1
    imagemagic, imagemagic and imagemagic
    – joojaa
    Commented May 26, 2020 at 11:17
  • :) Thanks, but I've also checked for that one. I didn't find any information on what command to use. Maybe you can help me?
    – fameman
    Commented May 26, 2020 at 11:26
  • The bottom texture is wrong, it should be only brown.
    – Rafael
    Commented May 26, 2020 at 15:57

2 Answers 2

3

This task is simply done using ImageMagick montage function.

Assuming that you have 6 tiles (map_tile01.png, map_tile02.png, ..., map_tile06.png) and an empty image of the same size of the tiles (empty_tile.png):

tiles example

You can use the following command:

montage.exe empty_tile.png map_tile01.png empty_tile.png map_tile02.png map_tile03.png map_tile04.png empty_tile.png map_tile05.png empty_tile.png empty_tile.png map_tile06.png empty_tile.png -tile 3x4 -geometry +0+0 -background none cubemap.png

Obtaining the final image:

cubemap obtained from tiles

The parameters of montage are simple:

  • The list of all the the tiles, in the sequential order to be used (empty_tile.png map_tile01.png empty_tile.png ... empty_tile.png)
  • How the tiles should be arranged (-tile 3x4)
  • Spacing between the tiles (-geometry +0+0)
  • Color of the background (-background none for the transparency)
  • Name of the final image (cubemap.png)

Please note that also the picture with the example of the tiles was produced using ImageMagick:

montage.exe -label '%f' map_tile01.png map_tile02.png map_tile04.png empty_tile.png -tile x1 -shadow -geometry +4+4 -background none sample_tiles.png

2

If you have the individual PNGs already created, you could use Inkscape (free, Open Source, works on Linux, Windows and Mac). It has some nice snapping and alignment features which would make placing the PNGs very easy.

You could create it using linked images and clones in Inkscape, to make a kind of template. Then all you'd need to do is change the links to the images to create a new design.

The final stage would be to export the image as PNG. In the export dialog you can set a specific size in pixels.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.