1. If you are going to register on XLNation, please make sure you do not use a proxy server.
    If you use a proxy server your registration will most likely get blocked due to spammers and hackers using proxy servers to hide their real IP address.

    If your using your home or work IP address and have not received your registration email, check your spam folder.
    PLEASE DO NOT ASK TO HAVE YOUR ACCOUNT DELETED IF YOU HAVE POSTED IN THE FORUM! If so we do not delete accounts due to the mess it can make on the forum.
    Dismiss Notice
  2. Please see the following thread for more information
    XLN's future is looking bad

(XXL)2015 Cube map transparency.

Discussion in 'Modding Help Quarter' started by ronrn, Aug 4, 2016.

  1. ronrn

    ronrn Governor

    Joined:
    Oct 31, 2014
    Messages:
    938
    Likes Received:
    1,262
    Can't seem to get the transparency in cube maps for a skybox to work.
    The image below demonstrates the settings I'm using in Gimp.
    Any help would be appreciated.
    midnight.jpg
     
  2. Monty

    Monty Governor

    Joined:
    Aug 20, 2014
    Messages:
    778
    Likes Received:
    3,097
    hey Rorn. I've never tried to use transparency in cubemaps, but I'm not sure if it actually works. Anyway, you have to choose one of the DDS types that support interpolated alpha channel, like DTX5. DTX1 may not support alpha channel, or when it does it only supports 1bit alpha channel (which means something is either fully opaque or fully transparent, like opacity maps in the game). Try DTX5 with interpolated alpha and see if it works. The downside of DTX 5 is that is compressed, so like a JPG losses a bit of quality when you save it (and more if you edit and re-save it several times). If DTX5 works, then you can experiment with other types of DDS that have no compression, but I'm not sure which one also supports interpolated alpha channel.

    BTW if you are interested in making cubemaps, I've made a 3ds max scene to render them from panoramic images and a Photoshop template to create the cubemap from the images rendered in 3ds max, if you are interested in it, let me know.

    EDIT: I'm not exactly sure if you want to blend a skybox with the default sky, or make the skybox completely transparent.
     
  3. ronrn

    ronrn Governor

    Joined:
    Oct 31, 2014
    Messages:
    938
    Likes Received:
    1,262
    First, thank you very much for your response. It actually helped clear up some of my confusion.

    I'm one of those dummies that didn't prepare too well for retirement and I don't have 3ds Max. Wish I did so I could mod buildings. I have a good photo editing app, an old (but newest) version of Jasc PSP, but not Photoshop. I generally understand the concept of "environmental mapping", as I have been 3d modeling/rendering since the late 90's. It's the game stuff that I don't fully understand.
    Gimp can build/export a skybox, easy enough, by just properly naming the 6 layers in an image.

    Anyways, back to topic:
    The numerical settings in the "xxx_env.xml" led me to think that the sun, stars, and moon were generated by the map editor/game and required transparency in the cube maps in order to "show through".:giggle::LOL::ROFLMAO:
    Now that I have found a small (free) CubeMapGen to view the default cubemaps, I realize that these 'objects' are simply included in the cubemap images. Which in turn, gives me a better understanding of the xxx_env.xml settings.

    I'm still trying to get my head around the purpose of 2 different types of cube maps. Again, my thinking is that the 512 "engine\skybox" maps sort of work inside the larger 1024 "gfx\sky\cubemaps" and require transparency.

    spoiler alert:censored:
    The idea for my first SkyBox features:
    -zero clouds
    -zero sky/sun color influence
    -zero ambient color influence
    -zero reflection of environmental colors/objects
    Buildings, roads, etc, textures will not be influenced by the environment, allowing their assigned textures to show as they were originally designed.
    Hopefully this SkyBox will aid those modders that complain (legitimately) about XXL altering the appearance their textures.
    Also, hopefully, this SkyBox might work in tandem with your SweetFX+Reshade+MasterEffect Preset for XXL, allowing users to create their own effects uninfluenced/unimpeded by any outside colors and/or reflections.
     
  4. Monty

    Monty Governor

    Joined:
    Aug 20, 2014
    Messages:
    778
    Likes Received:
    3,097
    If you want 3ds Max 2012 send me a PM. You can get the latest versions for free from Autodesk's educational website. The thing is that with the latest versions of 3ds Max you'll have to use XXL's Artist tool, which means your models will be only compatible with XXL.

    Back to the skyboxes.

    Indeed. There are two types of skies in XXL: The default physical sky/Atmospheric display (same as XL) and the skyboxes.
    The physical sky has the animated sun and the flickering stars. The skyboxes use textures so they aren't visible. Some of the sun's settings will only change its appearence while others change its physical proprierties.

    There are three types of cubemaps. The skybox which is the high resolution one that is the sky texture, including sun, moon and starts. So they aren't animated.

    The reflection cubemaps (street.dds I think it's the default) is the reflection you see on reflective surfaces, it doesn't affect the lighting but its colour is visible on the reflections) This cube map could be changed or desaturated to avoild that orange reflections, but keep in mind the reflections depend on it. Ideally, they should match the skybox's overal color, so you don't get orange reflections under a bright blue sky :p

    Ambient cubemaps these cubemaps are the ones responsible for the ambient lighting color and its intensity. They illuminate the scene globally and provide light where the sun doesn't. Trees can use a different ambient map.

    So for your project could choose if you want to create a new skybox (which will be independent and selectable from the dropdown menu) and only compatible with XXL, or change the settings for the atmopheric display, the old sky which will replace the default atmospheric display, but it will be compatible with XL too.

    Either way, you basically want the level to be completely lighted by white light.

    Change the sun color to white, (or different shades of grey, it will lower its intensity).

    Use a desaturated/grey to white gradient or solid desaturated color cubemap as ambient (general and trees)


    Keep in mind that pure white lighting will not look realistic at any time other than noon. (even at noon sunlight is not 100% white, though is quite close being slightly on the warm side).

    [​IMG]
     
  5. ronrn

    ronrn Governor

    Joined:
    Oct 31, 2014
    Messages:
    938
    Likes Received:
    1,262
    An independent Skybox that is selectable from the dropdown menu is what I had in mind.
    I have not really thought about the compatibility with XL. It's been a long time since I used XL Platinum, I really don't remember if or how different atmospheres can be applied. Compatibility would be considerate to a lot more users.
    Just to clarify:
    The default physical sky = ...\data\engine\skybox\xxx.dds ...with 512 x 512 res and cubemap images of 48 layers.
    The skyboxes = ...\data\gfx\sky\xxx.dds ...with1024 x 1024 res and cubemap images of 6 layers.
    ..note: from what I can tell in Gimp, the ...\data\engine\skybox\xxx.dds has transparency/alpha channel applied.
    Unless I'm wrong, I can also use these cubemaps as templates. I only need to edit their layer's images and file names to correspond with a newly edited xxx_Env.xml file.
    By this you mean how the sun is presented (positioned) on the cubemap image which needs to correspond with the effects of game animated light direction which is controled by settings in the xxx_Env.xml file?
    Flickering stars would be sort of a varying intensity effect on white colors (spots/stars) on the 'night' cubemap image, also controlled with the xxx_Env.xml file settings.
    These are the sun settings/colors I have experimented with.
    sun colors.jpg
    ..desaturated.. I think I know the definition, and the context in which it's used, but I actually haven't thought about it. Thanks for bringing it to my attention.
     
  6. Monty

    Monty Governor

    Joined:
    Aug 20, 2014
    Messages:
    778
    Likes Received:
    3,097
    The physical sky, which is called Atmospheric Display in the game is based on physical propierties like light scattering, rayleigh, etc. It doesn't use any texture. This is the default sky in XL and it's still available from the drop down menu in XXL. The sun/moon transitioning across the sky and starts flickering will be only available with this type of sky.

    The name of the folder data/engine/skybox is misleading. Since it doesn't contain skybox textures, but cubemaps used for ambient light and reflections.

    The skyboxes they added in XXL are based on a textured dome. Cubemaps to texture this dome should have the sun positioned on the right side North-South and East-West. Since the sun is still on the image you can never match its actual position, but at least should be on the same side as the lightsource.

    Reflection and ambient cubemaps work the same in both types of skies.

    The actual textures used by skyboxes (textured dome) are located in data\gfx\sky\cubemaps. They don't affect the lighting in the scene in any way, they are used just as a background.

    Reflection maps, ambient maps, skybox textures and the physical sky are completely independent one of the other. But each one is limited to a specific task.

    The skybox textures are just a backdrop. They do nothing other than that.

    The reflection maps only affect the reflections on objects/buildings and water.

    The ambient cubemaps contribute to the general lighting of the level.


    So if you want to make a selectable skybox, you can either use some of the cubemaps in data\gfx\sky\cubemaps to associate to your own env.xml file, or you can change the settings of the defaultevironment file, which controls the physical sky. I'm not sure if you can make a custom env.xlm that doesn't use a skybox but the physical sky instead. I've never tried.

    This is an example from my blue hour skybox mod:

    Skybox texture (actual size 1024x1024 each side)
    [​IMG]

    Reflection Map (actual size 512x512 each side) Note the position is different.
    [​IMG]

    Ambient map (actual size 128x128 each side) This one gets several blur passes, so its details don't matter.
    [​IMG]

    To achieve white lighting you would only have to desaturate the ambient cubemap and keep your sun settings as you show above. If you desaturate the reflection cubemap you'll get grey reflections. The skybox texture will not make any difference.
     
  7. ronrn

    ronrn Governor

    Joined:
    Oct 31, 2014
    Messages:
    938
    Likes Received:
    1,262
    Many, many thanks Monty.
    Well said and very informative. Got me fired up and ready to start having some more fun experimenting.
    Your words are now permanently inscribed in pdf format.(y)
    I'm sure there will be more questions down the line.
    About 3ds Max. I'll download the student version and see what I can do with it. I always thought this version had water marked images and/or would not save project files. O'boy, another user interface to learn.:)
     
  8. Monty

    Monty Governor

    Joined:
    Aug 20, 2014
    Messages:
    778
    Likes Received:
    3,097
    I'm glad to help :)

    The only limitation in the student version is that you're not allowed to use it for commercial purposes. The software works exaclty as the paid version, it will pop up a message about the files created with a student version whenever the file is opened in another installation of 3ds max, but other than that, it's it's the same.
     

Share This Page