[Guide] Export a skybox from Space Engine and import it to PA

Discussion in 'Mod Discussions' started by superouman, February 17, 2014.

  1. superouman

    superouman Post Master General

    Messages:
    1,007
    Likes Received:
    1,139
    Export and assemble a skybox from Space Engine to Planetary Annihilation

    [​IMG]
    Now i released the Custom Skybox mod, the second step is to pour as many skyboxes as possible and I need all of you to do so. Space Engine is a space simulator using real data and creates celestial bodies procedurally if there isn't any data available. It also allows users to export a skybox from their current position in space, very handy isn't it. However, you don't simply export the skybox and put in PA, this guide will teach you how to make a PA-ready skybox from Space Engine.

    • Download Space Engine, it's free and only weights 880Mb
    • Download DeathByDenim's Papa Texture Editor
    • Download the Custom Skybox mod in PAMM
    • Find a nice spot where you want to make a skybox. Don't get too close to a planet or a star otherwhile it won't make any sensefor the solar system in PA
    • The face you will be looking at in Space Engine will be placed here in PA
    [​IMG]
    • Press Esc > Editor > Export skybox
    • Export the skybox with a 2048 or 4096 resolution
    • Your exported skybox will be here C:\Games\SpaceEngine 0.971\export
    • You will have 6 targa files labeled like on the picture below
    [​IMG]
    • The words in capital letter indicate their position in PA's skybox
    • Convert the pictures to the png format and scale them down to 1024 to perform a pseudo-antialiasing. This guy says so. I automate this step on Photofiltre.
    • You now need to rotate each picture accordingly
      • sky_neg_x rotate 180°
      • sky_neg_y rotate 90° counter clockwise
      • sky_neg_z rotate 90° counter clockwise
      • sky_pos_x do nothing
      • sky_pos_y rotate 90° counter clockwise
      • sky_pos_z rotate 90° clockwise
    • Go to *Your Planetary Annihilation folder*\PA\media\pa\terrain\sky\textures, copy the skybox_01_xxx papa files (except skybox_01_ref) and paste them elsewhere in your computer
    • Open Papa Texture Editor
      • File > Open directly > select the folder with your copied skybox_01_xxx papa files
      • File > Import > select the correct skybox face with the png format (look at the previous picture)
      • Save each picture or Save As if you want to save elsewhere, it shouldn't be written in red
    • Copy paste the edited papa files to C:\Users\*Your user name*\AppData\Local\Uber Entertainment\Planetary Annihilation\mods\CustomSkybox\pa\terrain\sky\textures don't forget to keep a backup
    • Add your skybox to the Custom Skybox mod on Github or share it here so someone else will add it
    Go my pretties, go make beautiful skyboxes.



    I hope i didn't forget a step in the guide.
    Last edited: February 17, 2014
    Quitch, tasbot, archmagecarn and 4 others like this.
  2. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Nice!
    Minor note: You can also choose "Save as..." instead of "Save..." so you won't overwrite the originals.
  3. superouman

    superouman Post Master General

    Messages:
    1,007
    Likes Received:
    1,139
    You are right, i edited that step.
  4. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
  5. totalannihilation

    totalannihilation Active Member

    Messages:
    215
    Likes Received:
    168
    I followed all the steps, but the skybox I created didn't fit right
    After that,for some unknown reason, I decided to flip horizontal everything, and then the sides did fit correct, except for front and back
    do you know what is causing this and how to fix it?
    Last edited: October 18, 2014
  6. superouman

    superouman Post Master General

    Messages:
    1,007
    Likes Received:
    1,139
    That may be the reason. Do it really how i wrote.
  7. totalannihilation

    totalannihilation Active Member

    Messages:
    215
    Likes Received:
    168
    Well, at first I did follow all the steps, but it did not work
    So I decided to flip horizontal everything, and it worked,
    but to make the front and back to fit correctly, I also had to rotate 180 both of them
  8. totalannihilation

    totalannihilation Active Member

    Messages:
    215
    Likes Received:
    168
    I decided to write it down here so I won't forget, and others may want to try it as well

    Follow Superouman's steps
    if you did everything like he said and yet the skybox did not fit correctly, proceed to these steps (use the already modified images, don't go back to ground zero):
    • sky_neg_x: flip horizontal and rotate 180
    • sky_neg_y: flip horizontal
    • sky_neg_z: flip horizontal
    • sky_pos_x: flip horizontal and rotate 180
    • sky_pos_y: flip horizontal
    • sky_pos_z: flip horizontal

    On the other hand, if you are starting from ground zero, follow these steps:
    • sky_neg_x: flip horizontal
    • sky_neg_y: rotate 90° counter clockwise (90° left) and then flip horizontal
    • sky_neg_z: rotate 90° counter clockwise (90° left) and then flip horizontal
    • sky_pos_x: rotate 180° and flip horizontal
    • sky_pos_y: rotate 90° counter clockwise (90° left) and then flip horizontal
    • sky_pos_z: rotate 90° clockwise (90° right) and then flip horizontal

    Things may change with the latest version of Space Engine. Posted for v0.9.7.1 beta
    EDIT: maybe @ZaphodX can finally fix his custom skybox :D :D :D
  9. Sleeser

    Sleeser Active Member

    Messages:
    123
    Likes Received:
    31
    i cant hmmm open papa texture editor... i mean i dont know how to mmm i little help?
  10. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    That's because @superouman is linking to the entirely wrong place. :)
    The link pointed to the source code and you probably just want the executables. This is where you need to go.
  11. Sleeser

    Sleeser Active Member

    Messages:
    123
    Likes Received:
    31
    ok i'll try
  12. Sleeser

    Sleeser Active Member

    Messages:
    123
    Likes Received:
    31
    alright! :p thx for the help :)
  13. Sleeser

    Sleeser Active Member

    Messages:
    123
    Likes Received:
    31
    ok i got everything working but i should tell you that i followed everything u said correctly but in the end the skybox didnt fit right in the game but then i saw that the bottom and the top are switched so i switched between them and bam everything is good now :p but you should check if your orders a right or maybe it was an one time thing who knows... lol cant believe im playing inside a box XD and there i thought that games started rounding things but its all an illusion XD
  14. wpmarshall

    wpmarshall Planetary Moderator

    Messages:
    1,868
    Likes Received:
    2,989
    @DeathByDenim I can't seem to 'Import' - I have the copied PAPA files from the source code directory but all options other than file and quit are greyed out - what might I be doing wrong?
  15. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    @wpmarshall
    I'm only very vaguely remembering using this a while ago, but try clicking on one of the items in the list before going to file, or right clicking an item on the list or something. Did I mention I only vaguely remember getting confused at around that point :p
  16. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Import only works on the A8R8G8B8 and X8R8G8B8 file formats (which is what the Skyboxes are). It won't work on DXT3 or DXT5, since I never wrote an encoder for those. You'll need the papatran tool that comes with PA for those formats. I should finish that at some point. :)
  17. lulamae

    lulamae Planetary Moderator

    Messages:
    797
    Likes Received:
    307
    Here is a conversion map I made for myself based on exporting skyboxes from Space Engine v.0.9.8.0 .

    Note that while the left/right/top/bottom/front/back locations are the same, the skybox coordinates are located in different positions compared to those in the original post. I developed/used this map while following DeathByDenim's tutorial for creating custom skyboxes. You can find it here: https://wiki.palobby.com/wiki/Example_Mod_Custom_Skybox

    [​IMG]
  18. lulamae

    lulamae Planetary Moderator

    Messages:
    797
    Likes Received:
    307
    Here is the difference between exporting at 1024p from Space Engine and exporting at higher resolutions then resizing to 1024p before creating the .papa files.

    These are in-game screenshots from a 2560 x 1440p display

    [​IMG]
    Last edited: July 10, 2019

Share This Page