FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login
    The current pre-release of the client ("pioneer" in the version) is only compatible to itself. So you can only play with other testers. Please be aware!

    About water: Introduction

    Scheduled Pinned Locked Moved Tutorials
    mapping
    1 Posts 1 Posters 430 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JipJ Offline
      Jip
      last edited by Jip

      This article is an overview to allow you to quickly see what it is that you can expect in the parts of the series.

      Parts

      • Introduction
      • Settings from a practical perspective
      • Settings from a theoretical perspective
      • Wave generation
      • Brushes
      • Ramp
      • Environment maps
      • Wave normal maps
      • Pixelated water

      Introduction

      There is a frequently asked questions (FAQ) below. Make sure you've seen it before asking questions in any of the topics below.

      Water settings

      <todo>

      Water wave generation

      We'll look into how we can generate waves for our maps using the old GPG editor.
      waves.png

      Water brushes

      We'll look into how we can change the behavior of the water for aesthetical flattened.png

      Water ramps

      We'll look into what water ramps are, which ones are available to use and how we can switch between them. We'll also look at completely custom water ramps but be warned: they are prone to errors that may not be visible to you as a developer, but your players will be very aware of them.

      changed.png

      Water environment maps

      We'll look into what environment maps are, where we can find them and how we can switch between them. We'll also look at completely custom water environment maps but be warned: they are prone to errors that may not be visible to you as a developer, but your players will be very aware of them.

      result.png

      Water wave normal maps

      We'll look into how the actual water surface itself such as the slowly animating waves on the water is defined and how we can switch it all up. We'll also look at completely custom water normal maps but be warned: they are prone to errors that may not be visible to you as a developer, but your players will be very aware of them.

      example-2.PNG

      Pixelated water

      This article covers various graphical glitches surrounding water and proposes their solutions if available. As an example when you zoom out with levels that have water on them they change from high fidelity to low fidelity when you zoom out sufficiently.

      alt text

      Case studies

      In order to inspire you on what can be accomplished with water we'll go through a few case studies. We'll look at what settings have been chosen to achieve the effect we can see on the water.

      I assume that you've read every other article in the series - I will not go in depth as to what something means anymore.

      Lava

      lava.png
      Lava as seen in the fifth mission in the Nomad campaign

      Essentially for this water all of its water features are stripped off. There is no surface color, reflections or specular light on its surface. The surface is as clean as it can be - besides the refractions being applied. The color of the water is completely determined by the lava stratum texture underneath. The water normal maps cause the lava to appear to disperse hot air from its surface and generate large waves, as one would expect with lava.

      Foam

      foam.png
      Foam as seen in the GPG map Paradise

      Foam is a tricky concept. It heavily relies on the alpha channel of the water normal maps. The alpha channels are combined and if the final value of a pixel is more than white we see foam. The foam color is fixed in the shader, which is white.

      waves001.png
      waves001.dds

      The map Paradise achieves this effect by using the 'waves001.dds' texture twice at different frequencies. The map that is more frequent moves faster causing the foam effect to quickly come and disappear on the edges.

      Electric water

      electric.png
      Electric water as seen in the map Adaptive Crateria

      Commonly we use foam with natural shapes. On this map however a different approach was taken: we combine it with unnatural shapes of the Cybran build effect.

      CybranBuildSpecular.png
      CybranBuildSpecular.dds

      Both the normals and the alpha channel are very unnatural, producing water that appears unnatural. Especially the foam used on the map cause it to have an electric feeling to it - something one wouldn't expect from water.

      Frequently asked Questions (FAQ)

      Path variables

      Throughout the series various path variables are used. These are typically between the symbol '%'.

      %UserProfile%
      This points to where your current user profile is stored. An example path with the user being 'w.b.wijnia' is:

      C:\Users\w.b.wijnia

      %InstallationFolder%
      This points to where you have your Supreme Commander installed. Read that carefully: not the expansion Forged Alliance, but the base game. An example path is:

      C:/Steam/steamapps/common/Supreme Commander/gamedata

      %MapFolder%
      This points to where your map is stored. Depending on the editor you use it can be at either of these locations:

      %InstallationFolder%/maps
      %UserProfile%/Documents/My Games/Gas Powered Games/Supreme Commander Forged Alliance/maps

      Missing assets

      Not all of the assets required for the GPG editor are part of the default Steam installation of Supreme Commander or Supreme Commander: Forged Alliance. An example are the assets that allow you to generate waves for your map. You can download these assets at:

      • https://github.com/Garanas/Map-development-guides/tree/master/assets

      You can store these two files in:

      %InstallationFolder%/gamedata

      This is the installation folder for the base game Supreme Commander and not Supreme Commander: Forged Alliance.

      Access to the game files

      You have full access to all the game files that Supreme Commander has to offer. This includes its textures, blueprint information and a lot of the code.

      The game files that we are interested in for the series on water are:

      • %InstallationFolder%/gamedata/env.scd
      • %InstallationFolder%/gamedata/textures.scd

      Copy these files and change the extension of the copied files from '.scd' to '.zip' you can freely unpack them with any rar / zip software available to you. Make sure that they are unpacked into the parent folder and not into the current or a new folder of some kind. Ensure that the following paths are valid:

      • %InstallationFolder%/env/Evergreen2/layers
      • %InstallationFolder%/textures/engine

      If you have additional folders in between those paths then the paths are not valid when you publish your map. Remove the additional folders. Once they are valid the GPG editor will be able to generate a local path to these files such that the game knows where to find them too.

      About you

      If you have interesting sources, approaches, opinions or ideas that aren't listed yet but may be valuable to the article: feel free to leave a message down below or contact me on Discord. The idea is to create a bunch of resources to share our knowledge surrounding development in Supreme Commander.

      If you've used this resource for one of your maps feel free to make a post below: I'd love to know about it!

      A work of art is never finished, merely abandoned

      1 Reply Last reply Reply Quote 1
      • JipJ Jip referenced this topic on
      • MadMaxM MadMax referenced this topic on
      • First post
        Last post