[REL] Custom Skybox

Discussion in 'Released Mods' started by superouman, February 16, 2014.

  1. wpmarshall

    wpmarshall Planetary Moderator

    Messages:
    1,868
    Likes Received:
    2,989
    [​IMG]

    It can be a lot worse with obvious differences in colour and shading towards the edges.
  2. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    I tried the most ugly skybox I could imagine, and I'm not sure I see it:
    explosions.jpg

    Though I made this skybox with papatran instead of the texture editor. Or do you mean that the ball on the right in my image is so obviously a ball instead of something more smooth?
  3. wpmarshall

    wpmarshall Planetary Moderator

    Messages:
    1,868
    Likes Received:
    2,989
    It's not with the nuke explosion. Some building/unit explosions and planetary explosion.
  4. wpmarshall

    wpmarshall Planetary Moderator

    Messages:
    1,868
    Likes Received:
    2,989
    upload_2017-11-14_22-27-38.png
  5. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    I see what you mean there. Weirdly enough, I don't have that...
    explosions.jpg
    Do you have any mods that change the explosions maybe? Like Dark Nights or Bigger Explosions?
  6. lulamae

    lulamae Planetary Moderator

    Messages:
    796
    Likes Received:
    307

    I'm running on Windows.

    1. When I try to run papatran from the command prompt, I receive the error message
    'C:\Games\Planetary' is not recognized as an internal or external command,operable program or batch file.
    Is this because there is a space between 'Planetary' and 'Annihilation' ?


    2. Your command prompt instructions say:
    "where "pathtopa" has to be replaced by the Planetary Annihilation Installation Directory."

    My papatran.exe files are located deeper in that directory, so I adjusted the path to reflect this. (see screenshot)

    3. Do I not need to include the '.exe' extension for the paptran in the command prompt?

    [​IMG]
  7. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Oh, that's because of the spaces in the path. Try this (so with quotes):
    Code:
    "C:\Games\Planetary Annihilation\Planetary Annihilation\stable\bin_x64\papatran"
    And sorry about the exact location. I only know where it is on Linux, but yeah you are right. On Windows it's in bin_x64. Also you shouldn't need the .exe part.

    Also, great show on the AbleGamers tournament. :)
  8. lulamae

    lulamae Planetary Moderator

    Messages:
    796
    Likes Received:
    307
    Thanks!

    I made some dummy skybox files to make sure I was doing it right. I can't tell if I got the rotation correct, but I could read all the words :) Pretty cool to see them floating around.

    I got some skybox images from Space Engine so tomorrow I'll work on converting their naming convention to ours.

    [​IMG]
  9. lulamae

    lulamae Planetary Moderator

    Messages:
    796
    Likes Received:
    307
    Gah! I'm having a tough time getting the image oriented correctly.

    I started with using superouman's image to relate the skybox coordinates to plain the language position so I could reorient them according to your image. Then I noticed that you seemed to have relocated the images by "rolling" the boxes around, the flipping horizontally, then vertically.??

    [​IMG]

    [​IMG]



    At any rate, some of the images were mis-oriented once I went into the game and it's tough to tell what to do. One of my galaxies was split in such a way that I wasn't sure that just rotating/flipping the images could put it back together.

    Using superouman's directions even totalannihilation's (down thread) and still a mismatch.

    I think I'll export another skybox with loots of stuff in it and insert text in the images and color their borders so I can tell what I'm looking at.
  10. lulamae

    lulamae Planetary Moderator

    Messages:
    796
    Likes Received:
    307
    Since it looks like I'm going to be doing this multiple times, I created a .bat file in the com.pa.demo.mycustomskybox directory do create the .papa files. That's a big help.
  11. lulamae

    lulamae Planetary Moderator

    Messages:
    796
    Likes Received:
    307
    Yikes. I took a screen shot of the 'cube-view' from which I exported the skyboxes and when I matched up the images, the coordinates are different than superouman's. So I'm not sure what to call "left", "right", etc.

    [​IMG]

    [​IMG]
  12. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Yeah, it really tricky. Especially with the mirror images... Maybe this will help?
    skybox_01_back.png skybox_01_bottom.png skybox_01_front.png skybox_01_left.png skybox_01_right.png skybox_01_top.png
    lulamae likes this.
  13. lulamae

    lulamae Planetary Moderator

    Messages:
    796
    Likes Received:
    307
    I had to step away from the computer for awhile, but while I was out I decided to do something similar to the images that I'm uploading as well as outlining the borders of each square in the color shown in the cube view. That way I can load the game and make sense of what needs to happen.
    Last edited: November 28, 2017
  14. lulamae

    lulamae Planetary Moderator

    Messages:
    796
    Likes Received:
    307
    Huzzah! I finally got it.

    Here is the conversion map that works for me. The image is the exterior view if you folded it into a cube, but we play inside the cube. Since there is no text on my skyboxes, I didn't bother doing a horizontal flip. You can't tell that you are looking at the back side of the images and keeps it less complicated.

    @DeathByDenim , thanks for your help.

    [​IMG]
    Last edited: November 28, 2017
    DeathByDenim likes this.
  15. lulamae

    lulamae Planetary Moderator

    Messages:
    796
    Likes Received:
    307
    What is it that tells PA to use these .papa files instead of the ones in the installation files?
  16. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Mods use a shadowing technique, which just means that any file you put in your mod supersedes files from PA itself or any previously loaded mod. So basically, PA loads its files. Then it loads the mods. If any of the files in your mod have the same filename and path, then it loads that file instead. (I say load, but it's really loaded as needed of course)
  17. lulamae

    lulamae Planetary Moderator

    Messages:
    796
    Likes Received:
    307
    I understand that part. But what triggers that shadowing event? Or does PA automatically look for duplicate path/filenames in the Data files by default?

    I see that I have a lot of mod zip files in PA Data files/download directory. Is there a file someplace else that keeps track of what mods are installed/uninstalled and enabled/disabled?

    Where do those zip files get loaded to? That is, are they unzipped to my hard drive or just into memory?
  18. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    Both the PA client and server use a memory based file system with different mount points.

    The main ones are:
    • /pa/
    • /shaders/
    • /ui/
    Files are loaded into the memory filesystem in the following order:
    • filesystem
      • media/pa/
      • expansion content eg PAExpansion1 maps to /media/pa_ex1/
      • filesystem client mods from /client_mods/ based on priority
    • zip client mods via community mods based on priority
    • manual memory mounts eg Galactic War
    When creating a non GW game server mods are bundled into a remote mod collection:
    • filesystem server mods from /server_mods/ based on priority
    • zip server mods via community mods based on priority
    The remote mod collection is then uploaded to the server, mounted over the server memory file system and then downloaded by each client.

    In most cases server mods override client mods.

    The memory file system also allows watchers that can reload content while developing. Filesystem watchers are implemented on windows only and I have implemented the macOS File System Events API in my local build.

    Some of the details are covered in:
    The actual implementation is a little more complex ;)
  19. lulamae

    lulamae Planetary Moderator

    Messages:
    796
    Likes Received:
    307
    Thanks. I do not have an IT background but I am curious about the way things work.

    Tonight I expect that my best friend Google and I will be able to construct a batch file that will take the images in the Space Engine export directory, manipulate, rename and convert to .papa files in the correct place all at once.

    Probably peanuts to you pros, but pretty thrilling to me. :)

    If all goes well I may try learning how to publish custom skybox mods
  20. lulamae

    lulamae Planetary Moderator

    Messages:
    796
    Likes Received:
    307
    Reviewing the Client and Server mod examples:

    https://wiki.palobby.com/wiki/Example_Mod_Custom_Skybox
    https://wiki.palobby.com/wiki/Example_Mod_Bigger_Boom_Bot

    If I decide to publish a mod, for best practice, should the "identifier" in the modinfo.json file match the directory name that the file is located in?

    For instance, for the bigger boom bot mod the .json file ontains

    Code:
    "identifier": "com.pa.you.biggerbombbot"
    and is located in the file structure

    server_mods
    • com.pa.you.biggerbombbot
      • modinfo.json
      • pa
        • units
          • land
            • bot_bomb



    I ask because the client mod example doesn't quite follow that standard

    Code:
    "identifier": "com.pa.you.skybox.name"
    client_mods
    • com.pa.demo.mycustomskybox
      • modinfo.json
      • pa
        • terrain
          • sky
            • textures


    Or am I misunderstanding something? Is the identifier in this case just generic? I see that the author= "demo" so that would make sense to replace ".you"

    Or is there no real connection between the identifier and the directory containing the modinfo.json file?
    Last edited: November 29, 2017

Share This Page