Free planetarium

User avatar
Topic Author
Posts: 67
Joined: 22 Dec 2016
Location: Russia

Simple CubeMap instruction by Pluton

07 Mar 2017 17:24

The problem

It is a known fact that only a few people among the community are able to work with CubeMap. On the old forum there was a topic about planet geography creating, and there were only technical misunderstanding, couple of attempts and 0 successful results - for years that topic exists. New forum and Russian community in VK don't contain any examples of successful work either. The reason is there is no distinct instruction of use. User downloads CubeMap, presses the exe file and nothing occurs. "It is a command line program?" - he wonders - "Then what I supposed to write here?" Yes, there is an instruction by Engineer, but it is written so that only its author understands it, there is a lot of words about how it works, how it was created... but the user only needs to know how to use it! Press this, press that and get your result. I have aimed to get the full understanding and make a clear guide.

Simple instruction for maps creating and converting via CubeMap

1. Creating a map
In the beginning you must create a map in high resolution - at least 8192 x 4096. Yes, this big. Lower size will look poor on a planet, it will be a shame to land there.
If you have downloaded and want to use a map with jpeg-artifacts (squares or noise are visible), but don't know how to work in Photoshop qualitatively to restore the picture, then make at least 2 things:
Filter - Blur - Gausian Blur (value 0.6 or 0.7)
Filter - Sharpen - Unsharp Mask
Thus we at first have washed away the image, and then have made it accurate [color=#ffffff]again bu[/color]t without artifacts already. If you know a better technique of image improvement, it is excellent, use it.
If the downloaded map is less than 8192 x 4096 it is necessary to increase it in a special way. Simple stretching via Photoshop is not an option. Look for special programs, plug-ins, websites which enlarge images with detalization increase.

2. Saving
Save surface map as usual jpg or png (max quality of course). Before saving bump map need to be transfered to Grayscale. Upper Photoshop menu: Image - Mode - Grayscale, then save as png. If you don't transfer it to gray, then you get an awful bug on the planet.

3. Resaving to raw
Download IrfanView program from here
Two links - the program and plug-ins, links look this way:
FossHub - download IrfanView
FossHub - Download IrfanView plugins
Don't download 64-bit version. On my 64-bit system it doesn't work. 32 will be enough with no problems. Usual installation, no keys required, it is free.
We need the program to resave maps from png to raw format. Yes, Photoshop can save to raw too, but after this CubeMap doesn't accept the map for the obscure reasons, therefore Irfan is needed as the intermediary.
So launch Irfan, open the map and save it to raw. For surface maps it is important to save with Interleaved parameter, but for bump map you must save as Planar:
► Show Spoiler

if you save them another way you will also get a surface bug on planet.

4. CubeMap
Actually current version is 1.06, but it didn't launch on my system. But 1.03 did, download it here or any other place.
You don't have to write anything it the program window. All settings are specified in a notepad and after filling them we start exe only for automatic operation. I don't want you to suffer with filling of settings, so there are ready settings by DoctorOfSpace and me: download settings. Replace this file in the program folder.
You need to change only couple of things for yourself. Input and output files are written for me this way:
InputFile       F:\1.raw
OutFolder     F:\Games\SpaceEngine\export
It means that in Irfan I always save a map on F drive (not to go deeply every time) and I always name it "1" (not to write a new name every time). Possibly you need to change drive letter since few people have F drive. The second line is a folder where converted maps will drop, I set it as the game export folder, - you can renominate where you want, this is just a place where I often pick exported SE scripts.
Also there are such lines:
# Parameters for CubeMap: input file
InputWidth      8192
InputHeight     4096
As you can see, they are equal to the map size which I initially recommended. If intend to feed the program another size, you need to change the digits respectively.
And the last:
InputChannels   1
When converting bump it has to be set as 1 (means 1 channel, i.e. gray). When converting a surface map the digit has to be 3. If you convert a grayscale bump with parameter 3, you get a god damn planet bug again.
When the settings file is resaved, just press CubeMap.exe and if everything was done correctly, the program will complete in several seconds and will throw off 6 folders of maps into export folder. It is remarkable that the received tiles will be 258 x 258 instead of declared 256 x 256, be not surprised, this is normal. If converting hasn't happened, it means you had wrong size in the settings, wrong addresses or wrong file name or the raw file was saved incorrectly. We unite 6 folders of surface maps as "surface" folder, unite 6 folders of bumps as "bump" folder (for design not-satellite bumps it is accepted to write "bump-fake"). Also there must be one reduced original map - actually CubeMap must create it, but if for some reason it doesn't do it yourself in Photoshop, simply reduce the initial map to 512 width and save with the name "base". Thus ready files of the planet have to look this way:
► Show Spoiler

5. Usage
Pack textures into pak archive and put here:
Create planets scripts using your textures and put here:
I won't write about how to create a planet script since it is a simple task by the standards of SE community, and the person who began working with maps, already knows what to do with scripts for certain. But in brief I can tell you don't need to write everything from scratch, just take for example Earth script and change it for your own planet. You may also use my SE Atmospheres 2.0 mod for your planets.

That's all. At first it may seem there is a lot of information, but it is not. You already have Photoshop (otherwise how you were going to work with maps?), Irfan and CubeMap with settings need to be downloaded only once. So it goes this way: you saved map in Photoshop, resaved in Irfan, started CubeMap with already configured settings, taken away the ready maps from export folder, packed and created a planet script - everything is simple after you do it 1-2 times.
It would be pleasant to see your planets with self-made geography in this topic. Let already planet construction begin.
Last edited by Pluton on 16 Mar 2017 08:36, edited 2 times in total.
User avatar
Space Pilot
Posts: 91
Joined: 02 Nov 2016
Location: MinneSNOWta

Simple CubeMap instruction by Pluton

08 Mar 2017 23:49

Is there any way to force Gimp to save proper raw files that can be used by CubeMap?
Specs: Dell Inspiron 5547 (Laptop); 8 gigabytes of RAM; Processor: Intel® Core™ i5-4210U CPU @ 1.70GHz (4 CPUs), ~2.4GHz; Operating System: Windows 7 Home Premium 64-bit; Graphics: Intel® HD Graphics 4400 (That's all there is :( )
User avatar
Topic Author
Posts: 67
Joined: 22 Dec 2016
Location: Russia

Simple CubeMap instruction by Pluton

09 Mar 2017 08:05

First time hear about Gimp. Man, just use Irfan, it's a deal of couple seconds.
User avatar
Space Tourist
Posts: 31
Joined: 30 Dec 2016

Simple CubeMap instruction by Pluton

10 Mar 2017 00:53

IrfanView 64-bit works wonderfully for me. I think it might just be your setup.
Formerly known as "parameciumkid."
User avatar
Posts: 7
Joined: 17 Nov 2016

Simple CubeMap instruction by Pluton

10 Mar 2017 05:53

Thank you Pluton. Thank you a lot
User avatar
Topic Author
Posts: 67
Joined: 22 Dec 2016
Location: Russia

Simple CubeMap instruction by Pluton

10 Mar 2017 14:03

You are welcome )

Who is online

Users browsing this forum: No registered users and 2 guests